Add ShellDemo sample with comprehensive XAML controls showcase
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 <noreply@anthropic.com>
This commit is contained in:
34
samples/ShellDemo/Pages/DetailPage.xaml.cs
Normal file
34
samples/ShellDemo/Pages/DetailPage.xaml.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using Microsoft.Maui.Controls;
|
||||
|
||||
namespace ShellDemo.Pages;
|
||||
|
||||
[QueryProperty(nameof(ItemName), "item")]
|
||||
public partial class DetailPage : ContentPage
|
||||
{
|
||||
private string _itemName = "Detail Item";
|
||||
|
||||
public string ItemName
|
||||
{
|
||||
get => _itemName;
|
||||
set
|
||||
{
|
||||
_itemName = value;
|
||||
Title = $"Detail: {value}";
|
||||
if (ItemLabel != null)
|
||||
{
|
||||
ItemLabel.Text = $"You navigated to: {value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public DetailPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void OnGoBackClicked(object? sender, EventArgs e)
|
||||
{
|
||||
await Shell.Current.GoToAsync("..");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user