This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="Collections.Views.VerticalListPage" | |
Title="Gallery of Art"> | |
<ContentPage.Content> | |
<CollectionView ItemsSource="{Binding Pictures}" | |
ItemsLayout="VerticalList"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="Collections.Views.HorizontalListPage" | |
Title="Gallery of Art"> | |
<StackLayout> | |
<StackLayout Orientation="Horizontal"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="Collections.Views.VerticalGridPage" | |
Title="Gallery of Art"> | |
<StackLayout> | |
<StackLayout Orientation="Horizontal" Margin="6,6,6,8"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="Collections.Views.HorizontalGridPage" | |
Title="HorizontalGridPage"> | |
<ContentPage.Content> | |
<StackLayout> | |
<StackLayout Orientation="Horizontal"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void AppActions_OnAppAction(object sender, AppActionEventArgs e) | |
{ | |
// Don't handle events fired for old application instances | |
// and cleanup the old instance's event handler | |
if (Application.Current != this && Application.Current is App app) | |
{ | |
AppActions.OnAppAction -= app.AppActions_OnAppAction; | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Subscribe to an event | |
AppActions.OnAppAction += AppActions_OnAppAction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override async void OnStart() | |
{ | |
try | |
{ | |
await AppActions.SetAsync( | |
new AppAction(id: Helpers.ActionType.AddNote, title: "Add new note", icon: "icon.png"), | |
new AppAction(id: Helpers.ActionType.ViewFavourites, title: "View favourites", icon: "icon.png")); | |
} | |
catch (FeatureNotSupportedException ex) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Other code | |
// ... | |
public override void PerformActionForShortcutItem(UIApplication application, UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler) | |
=> Xamarin.Essentials.Platform.PerformActionForShortcutItem(application, shortcutItem, completionHandler); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Other code | |
// ... | |
protected override void OnResume() | |
{ | |
base.OnResume(); | |
Xamarin.Essentials.Platform.OnResume(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="XF.EmbeddedFonts.MainPage"> | |
<StackLayout> | |
<Label Text="Welcome to Xamarin.Forms... with custom font setup, easier than ever!" | |
FontFamily="LibreBaskerville-Regular" | |
VerticalOptions="CenterAndExpand" | |
HorizontalTextAlignment="Center" |
NewerOlder