From 751b3d544d8eba07cee56502cabae90ac5afe2ef Mon Sep 17 00:00:00 2001 From: logikonline Date: Sat, 24 Jan 2026 03:17:48 +0000 Subject: [PATCH] Flyout fixes --- ShellDemo/AppShell.xaml | 60 +++++++++++--------- ShellDemo/AppShell.xaml.cs | 9 +++ ShellDemo/Pages/AboutPage.xaml | 54 +++++++++--------- ShellDemo/Pages/AboutPage.xaml.cs | 12 ++++ ShellDemo/Pages/HomePage.xaml | 17 +++++- ShellDemo/Pages/HomePage.xaml.cs | 50 +++++++++++++--- ShellDemo/Resources/Images/logo_only.svg | 44 ++++++++++++++ ShellDemo/Resources/Images/openmaui_logo.svg | 10 ++++ ShellDemo/ShellDemo.csproj | 1 + TodoApp/Pages/TodoDetailPage.xaml | 2 + 10 files changed, 193 insertions(+), 66 deletions(-) create mode 100644 ShellDemo/Resources/Images/logo_only.svg create mode 100644 ShellDemo/Resources/Images/openmaui_logo.svg diff --git a/ShellDemo/AppShell.xaml b/ShellDemo/AppShell.xaml index 8d65f2d..f2fab69 100644 --- a/ShellDemo/AppShell.xaml +++ b/ShellDemo/AppShell.xaml @@ -12,37 +12,41 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/ShellDemo/AppShell.xaml.cs b/ShellDemo/AppShell.xaml.cs index 014b9d8..a013f4e 100644 --- a/ShellDemo/AppShell.xaml.cs +++ b/ShellDemo/AppShell.xaml.cs @@ -1,13 +1,22 @@ // AppShell - Shell navigation with flyout menu +using System.Reflection; using Microsoft.Maui.Controls; namespace ShellDemo; public partial class AppShell : Shell { + public string AppVersion { get; } + public AppShell() { + // Get app version from assembly + var version = Assembly.GetExecutingAssembly().GetName().Version; + AppVersion = $"OpenMaui v{version?.Major ?? 1}.{version?.Minor ?? 0}.{version?.Build ?? 0}"; + + BindingContext = this; + InitializeComponent(); // Register routes for push navigation (pages not in flyout) diff --git a/ShellDemo/Pages/AboutPage.xaml b/ShellDemo/Pages/AboutPage.xaml index ea820b7..8ffe61b 100644 --- a/ShellDemo/Pages/AboutPage.xaml +++ b/ShellDemo/Pages/AboutPage.xaml @@ -29,38 +29,34 @@ - + - + - + - + @@ -73,47 +69,49 @@ TextColor="{AppThemeBinding Light={StaticResource TextPrimaryLight}, Dark={StaticResource TextPrimaryDark}}" /> - - - - - - - diff --git a/ShellDemo/Pages/AboutPage.xaml.cs b/ShellDemo/Pages/AboutPage.xaml.cs index 051ef75..cbc6c86 100644 --- a/ShellDemo/Pages/AboutPage.xaml.cs +++ b/ShellDemo/Pages/AboutPage.xaml.cs @@ -10,4 +10,16 @@ public partial class AboutPage : ContentPage { InitializeComponent(); } + + private async void OnWebsiteLinkTapped(object? sender, TappedEventArgs e) + { + try + { + await Microsoft.Maui.Platform.Linux.Services.Browser.OpenAsync("https://www.openmaui.net", BrowserLaunchMode.SystemPreferred); + } + catch (Exception ex) + { + Console.WriteLine($"Failed to open URL: {ex.Message}"); + } + } } diff --git a/ShellDemo/Pages/HomePage.xaml b/ShellDemo/Pages/HomePage.xaml index b0eea19..238e773 100644 --- a/ShellDemo/Pages/HomePage.xaml +++ b/ShellDemo/Pages/HomePage.xaml @@ -5,7 +5,7 @@ Title="Home" BackgroundColor="{AppThemeBinding Light={StaticResource PageBackgroundLight}, Dark={StaticResource PageBackgroundDark}}"> - + @@ -20,6 +20,21 @@ HorizontalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource TextSecondaryLight}, Dark={StaticResource TextSecondaryDark}}" /> + + + +