2026-03-15 03:37:50 +08:00
|
|
|
<UserControl
|
|
|
|
|
x:Class="Semi.Avalonia.Demo.Pages.NavigationPageDemo"
|
|
|
|
|
xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
d:DesignHeight="700"
|
|
|
|
|
d:DesignWidth="800"
|
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
<ScrollViewer>
|
|
|
|
|
<DockPanel>
|
|
|
|
|
<ScrollViewer DockPanel.Dock="Right" Width="260">
|
|
|
|
|
<StackPanel Margin="12" Spacing="8">
|
|
|
|
|
<TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16" />
|
2026-04-14 23:39:41 +08:00
|
|
|
<TextBlock Text="Navigation" FontWeight="SemiBold" FontSize="14" />
|
2026-03-15 03:37:50 +08:00
|
|
|
|
|
|
|
|
<Button Content="Push Page"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Click="OnPush" />
|
|
|
|
|
<Button Content="Pop"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Click="OnPop" />
|
|
|
|
|
<Button Content="Pop to Root"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Click="OnPopToRoot" />
|
|
|
|
|
|
|
|
|
|
<Separator />
|
|
|
|
|
|
2026-04-14 23:39:41 +08:00
|
|
|
<TextBlock Text="Modal Actions" FontWeight="SemiBold" FontSize="14" />
|
2026-04-15 01:23:54 +08:00
|
|
|
<Button Name="PushModalButton"
|
2026-04-14 23:39:41 +08:00
|
|
|
Content="Push Modal"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Click="OnPushModal" />
|
2026-04-15 01:23:54 +08:00
|
|
|
<Button Name="PopModalButton"
|
2026-04-14 23:39:41 +08:00
|
|
|
Content="Pop Modal"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Click="OnPopModal" />
|
2026-04-15 01:23:54 +08:00
|
|
|
<Button Name="PopAllModalsButton"
|
2026-04-14 23:39:41 +08:00
|
|
|
Content="Pop All Modals"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Click="OnPopAllModals" />
|
|
|
|
|
|
2026-03-15 03:37:50 +08:00
|
|
|
<TextBlock Text="Options" FontWeight="SemiBold" FontSize="14" />
|
|
|
|
|
|
|
|
|
|
<CheckBox Name="HasNavBarCheck"
|
|
|
|
|
Content="Has Navigation Bar"
|
|
|
|
|
IsChecked="True"
|
|
|
|
|
IsCheckedChanged="OnHasNavBarChanged" />
|
|
|
|
|
<CheckBox Name="HasBackButtonCheck"
|
|
|
|
|
Content="Has Back Button"
|
2026-04-14 23:39:41 +08:00
|
|
|
IsChecked="True"
|
|
|
|
|
IsCheckedChanged="OnHasBackButtonChanged" />
|
|
|
|
|
<CheckBox Name="HasShadowCheck"
|
|
|
|
|
Content="Has Shadow"
|
|
|
|
|
IsChecked="True"
|
|
|
|
|
IsCheckedChanged="OnHasShadowChanged" />
|
|
|
|
|
<CheckBox Name="large" Content="Large" />
|
|
|
|
|
|
|
|
|
|
<Separator />
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Modal Transition" FontWeight="SemiBold" FontSize="14" />
|
|
|
|
|
<ComboBox Name="TransitionCombo"
|
|
|
|
|
SelectedIndex="0"
|
|
|
|
|
SelectionChanged="OnTransitionChanged">
|
|
|
|
|
<ComboBoxItem Content="Slide from Bottom" />
|
|
|
|
|
<ComboBoxItem Content="CrossFade" />
|
|
|
|
|
<ComboBoxItem Content="None" />
|
|
|
|
|
</ComboBox>
|
2026-03-15 03:37:50 +08:00
|
|
|
|
|
|
|
|
<Separator />
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="Status" FontWeight="SemiBold" FontSize="14" />
|
|
|
|
|
<TextBlock Name="StatusText"
|
|
|
|
|
Text="Depth: 1"
|
|
|
|
|
TextWrapping="Wrap" />
|
|
|
|
|
<TextBlock Name="HeaderText"
|
|
|
|
|
Text="Current: Home"
|
|
|
|
|
TextWrapping="Wrap" />
|
2026-04-14 23:39:41 +08:00
|
|
|
<TextBlock Name="ModalText"
|
|
|
|
|
Text="Modals: 0"
|
|
|
|
|
TextWrapping="Wrap" />
|
|
|
|
|
|
2026-03-15 03:37:50 +08:00
|
|
|
</StackPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
<Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SemiColorBackground0}" />
|
|
|
|
|
|
|
|
|
|
<Border Margin="12"
|
|
|
|
|
BorderBrush="{DynamicResource SemiColorBorder}"
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
CornerRadius="6"
|
|
|
|
|
ClipToBounds="True">
|
2026-04-14 23:39:41 +08:00
|
|
|
<NavigationPage
|
|
|
|
|
Name="DemoNav"
|
2026-04-07 23:53:11 +08:00
|
|
|
Classes.Large="{Binding #large.IsChecked}" />
|
2026-03-15 03:37:50 +08:00
|
|
|
</Border>
|
|
|
|
|
</DockPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</UserControl>
|