Files
maui-linux/samples/ShellDemo/App.cs
logikonline 1d55ac672a Preview 3: Complete control implementation with XAML data binding
Major milestone adding full control functionality:

Controls Enhanced:
- Entry/Editor: Full keyboard input, cursor navigation, selection, clipboard
- CollectionView: Data binding, selection highlighting, scrolling
- CheckBox/Switch/Slider: Interactive state management
- Picker/DatePicker/TimePicker: Dropdown selection with popup overlays
- ProgressBar/ActivityIndicator: Animated progress display
- Button: Press/release visual states
- Border/Frame: Rounded corners, stroke styling
- Label: Text wrapping, alignment, decorations
- Grid/StackLayout: Margin and padding support

Features Added:
- DisplayAlert dialogs with button actions
- NavigationPage with toolbar and back navigation
- Shell with flyout menu navigation
- XAML value converters for data binding
- Margin support in all layout containers
- Popup overlay system for pickers

New Samples:
- TodoApp: Full CRUD task manager with NavigationPage
- ShellDemo: Comprehensive control showcase

Removed:
- ControlGallery (replaced by ShellDemo)
- LinuxDemo (replaced by TodoApp)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 13:26:56 -05:00

79 lines
2.0 KiB
C#

// ShellDemo App - Comprehensive Control Demo
using Microsoft.Maui.Controls;
namespace ShellDemo;
/// <summary>
/// Main application class with Shell navigation.
/// </summary>
public class App : Application
{
public App()
{
MainPage = new AppShell();
}
}
/// <summary>
/// Shell definition with flyout menu - comprehensive control demo.
/// </summary>
public class AppShell : Shell
{
public AppShell()
{
FlyoutBehavior = FlyoutBehavior.Flyout;
Title = "OpenMaui Controls Demo";
// Register routes for push navigation (pages not in flyout)
Routing.RegisterRoute("detail", typeof(DetailPage));
// Home
Items.Add(CreateFlyoutItem("Home", typeof(HomePage)));
// Buttons Demo
Items.Add(CreateFlyoutItem("Buttons", typeof(ButtonsPage)));
// Text Input Demo
Items.Add(CreateFlyoutItem("Text Input", typeof(TextInputPage)));
// Selection Controls Demo
Items.Add(CreateFlyoutItem("Selection", typeof(SelectionPage)));
// Pickers Demo
Items.Add(CreateFlyoutItem("Pickers", typeof(PickersPage)));
// Lists Demo
Items.Add(CreateFlyoutItem("Lists", typeof(ListsPage)));
// Progress Demo
Items.Add(CreateFlyoutItem("Progress", typeof(ProgressPage)));
// Grids Demo
Items.Add(CreateFlyoutItem("Grids", typeof(GridsPage)));
// About
Items.Add(CreateFlyoutItem("About", typeof(AboutPage)));
}
private FlyoutItem CreateFlyoutItem(string title, Type pageType)
{
// Route is required for Shell.GoToAsync navigation to work
var route = title.Replace(" ", "");
return new FlyoutItem
{
Title = title,
Route = route,
Items =
{
new ShellContent
{
Title = title,
Route = route,
ContentTemplate = new DataTemplate(pageType)
}
}
};
}
}