From 01270c693858a95e2c28f796c689ebb019f052bb Mon Sep 17 00:00:00 2001 From: Dave Friedel Date: Thu, 1 Jan 2026 20:02:24 -0500 Subject: [PATCH] Add ShellDemo sample with comprehensive XAML controls showcase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Complete ShellDemo application demonstrating all MAUI controls: - App/AppShell: Shell navigation with flyout menu - HomePage: Feature cards, theme toggle, quick actions - ButtonsPage: Button styles, states, variations, event logging - TextInputPage: Entry, Editor, SearchBar with keyboard shortcuts - SelectionPage: CheckBox, Switch, Slider with colored variants - PickersPage: Picker, DatePicker, TimePicker demos - ListsPage: CollectionView with fruits, colors, contacts - ProgressPage: ProgressBar, ActivityIndicator, interactive demo - GridsPage: Grid layouts - auto/star/absolute sizing, spans, nesting - AboutPage: OpenMaui Linux information - DetailPage: Push/pop navigation demo All pages use proper XAML with code-behind following MAUI patterns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- samples/ShellDemo/App.xaml | 31 +++ samples/ShellDemo/App.xaml.cs | 12 + samples/ShellDemo/AppShell.xaml | 48 ++++ samples/ShellDemo/AppShell.xaml.cs | 12 + samples/ShellDemo/MauiProgram.cs | 24 ++ samples/ShellDemo/Pages/AboutPage.xaml | 115 ++++++++ samples/ShellDemo/Pages/AboutPage.xaml.cs | 11 + samples/ShellDemo/Pages/ButtonsPage.xaml | 176 ++++++++++++ samples/ShellDemo/Pages/ButtonsPage.xaml.cs | 93 +++++++ samples/ShellDemo/Pages/DetailPage.xaml | 47 ++++ samples/ShellDemo/Pages/DetailPage.xaml.cs | 34 +++ samples/ShellDemo/Pages/GridsPage.xaml | 195 +++++++++++++ samples/ShellDemo/Pages/GridsPage.xaml.cs | 11 + samples/ShellDemo/Pages/HomePage.xaml | 257 ++++++++++++++++++ samples/ShellDemo/Pages/HomePage.xaml.cs | 62 +++++ samples/ShellDemo/Pages/ListsPage.xaml | 98 +++++++ samples/ShellDemo/Pages/ListsPage.xaml.cs | 116 ++++++++ samples/ShellDemo/Pages/PickersPage.xaml | 142 ++++++++++ samples/ShellDemo/Pages/PickersPage.xaml.cs | 92 +++++++ samples/ShellDemo/Pages/ProgressPage.xaml | 136 +++++++++ samples/ShellDemo/Pages/ProgressPage.xaml.cs | 84 ++++++ samples/ShellDemo/Pages/SelectionPage.xaml | 130 +++++++++ samples/ShellDemo/Pages/SelectionPage.xaml.cs | 70 +++++ samples/ShellDemo/Pages/TextInputPage.xaml | 91 +++++++ samples/ShellDemo/Pages/TextInputPage.xaml.cs | 33 +++ samples/ShellDemo/Program.cs | 12 + samples/ShellDemo/ShellDemo.csproj | 20 ++ 27 files changed, 2152 insertions(+) create mode 100644 samples/ShellDemo/App.xaml create mode 100644 samples/ShellDemo/App.xaml.cs create mode 100644 samples/ShellDemo/AppShell.xaml create mode 100644 samples/ShellDemo/AppShell.xaml.cs create mode 100644 samples/ShellDemo/MauiProgram.cs create mode 100644 samples/ShellDemo/Pages/AboutPage.xaml create mode 100644 samples/ShellDemo/Pages/AboutPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/ButtonsPage.xaml create mode 100644 samples/ShellDemo/Pages/ButtonsPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/DetailPage.xaml create mode 100644 samples/ShellDemo/Pages/DetailPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/GridsPage.xaml create mode 100644 samples/ShellDemo/Pages/GridsPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/HomePage.xaml create mode 100644 samples/ShellDemo/Pages/HomePage.xaml.cs create mode 100644 samples/ShellDemo/Pages/ListsPage.xaml create mode 100644 samples/ShellDemo/Pages/ListsPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/PickersPage.xaml create mode 100644 samples/ShellDemo/Pages/PickersPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/ProgressPage.xaml create mode 100644 samples/ShellDemo/Pages/ProgressPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/SelectionPage.xaml create mode 100644 samples/ShellDemo/Pages/SelectionPage.xaml.cs create mode 100644 samples/ShellDemo/Pages/TextInputPage.xaml create mode 100644 samples/ShellDemo/Pages/TextInputPage.xaml.cs create mode 100644 samples/ShellDemo/Program.cs create mode 100644 samples/ShellDemo/ShellDemo.csproj diff --git a/samples/ShellDemo/App.xaml b/samples/ShellDemo/App.xaml new file mode 100644 index 0000000..bfb7819 --- /dev/null +++ b/samples/ShellDemo/App.xaml @@ -0,0 +1,31 @@ + + + + + + #03A9F4 + #0288D1 + + + #4CAF50 + #FF9800 + #F44336 + #9C27B0 + #673AB7 + + + #F5F5F5 + #FFFFFF + #E1F5FE + + + #212121 + #757575 + + + #E0E0E0 + + + diff --git a/samples/ShellDemo/App.xaml.cs b/samples/ShellDemo/App.xaml.cs new file mode 100644 index 0000000..f909838 --- /dev/null +++ b/samples/ShellDemo/App.xaml.cs @@ -0,0 +1,12 @@ +using Microsoft.Maui.Controls; + +namespace ShellDemo; + +public partial class App : Application +{ + public App() + { + InitializeComponent(); + MainPage = new AppShell(); + } +} diff --git a/samples/ShellDemo/AppShell.xaml b/samples/ShellDemo/AppShell.xaml new file mode 100644 index 0000000..797f8b1 --- /dev/null +++ b/samples/ShellDemo/AppShell.xaml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ShellDemo/AppShell.xaml.cs b/samples/ShellDemo/AppShell.xaml.cs new file mode 100644 index 0000000..70345c2 --- /dev/null +++ b/samples/ShellDemo/AppShell.xaml.cs @@ -0,0 +1,12 @@ +using Microsoft.Maui.Controls; + +namespace ShellDemo; + +public partial class AppShell : Shell +{ + public AppShell() + { + InitializeComponent(); + Routing.RegisterRoute("detail", typeof(Pages.DetailPage)); + } +} diff --git a/samples/ShellDemo/MauiProgram.cs b/samples/ShellDemo/MauiProgram.cs new file mode 100644 index 0000000..396b6d6 --- /dev/null +++ b/samples/ShellDemo/MauiProgram.cs @@ -0,0 +1,24 @@ +using Microsoft.Maui; +using Microsoft.Maui.Controls.Hosting; +using Microsoft.Maui.Hosting; +using Microsoft.Maui.Platform.Linux.Hosting; + +namespace ShellDemo; + +public static class MauiProgram +{ + public static MauiApp CreateMauiApp() + { + var builder = MauiApp.CreateBuilder(); + builder + .UseMauiApp() + .UseLinuxPlatform() + .ConfigureFonts(fonts => + { + fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); + fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); + }); + + return builder.Build(); + } +} diff --git a/samples/ShellDemo/Pages/AboutPage.xaml b/samples/ShellDemo/Pages/AboutPage.xaml new file mode 100644 index 0000000..56e8e2b --- /dev/null +++ b/samples/ShellDemo/Pages/AboutPage.xaml @@ -0,0 +1,115 @@ + + + + + + + + + diff --git a/samples/ShellDemo/Pages/AboutPage.xaml.cs b/samples/ShellDemo/Pages/AboutPage.xaml.cs new file mode 100644 index 0000000..c769347 --- /dev/null +++ b/samples/ShellDemo/Pages/AboutPage.xaml.cs @@ -0,0 +1,11 @@ +using Microsoft.Maui.Controls; + +namespace ShellDemo.Pages; + +public partial class AboutPage : ContentPage +{ + public AboutPage() + { + InitializeComponent(); + } +} diff --git a/samples/ShellDemo/Pages/ButtonsPage.xaml b/samples/ShellDemo/Pages/ButtonsPage.xaml new file mode 100644 index 0000000..334b191 --- /dev/null +++ b/samples/ShellDemo/Pages/ButtonsPage.xaml @@ -0,0 +1,176 @@ + + + + + + + + +