Files
maui-linux/samples/ShellDemo/Pages/DetailPage.xaml.cs
Dave Friedel 01270c6938 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>
2026-01-01 20:02:24 -05:00

35 lines
701 B
C#

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("..");
}
}