A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

63 lines
2.6 KiB

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ControlCatalog.Pages.NavigationPageModalPage">
<DockPanel>
<ScrollViewer DockPanel.Dock="Right" Width="280">
<StackPanel Margin="12" Spacing="16">
<TextBlock Text="Configuration" FontSize="16" FontWeight="SemiBold"
Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
<!-- Modal Actions -->
<TextBlock Text="Modal Actions" FontSize="13" FontWeight="SemiBold" />
<StackPanel Spacing="6">
<Button x:Name="PushModalButton"
Content="Push Modal"
HorizontalAlignment="Stretch"
Click="OnPushModal" />
<Button x:Name="PopModalButton"
Content="Pop Modal"
HorizontalAlignment="Stretch"
Click="OnPopModal" />
<Button x:Name="PopAllModalsButton"
Content="Pop All Modals"
HorizontalAlignment="Stretch"
Click="OnPopAllModals" />
</StackPanel>
<Separator />
<!-- Modal Transition -->
<TextBlock Text="Modal Transition" FontSize="13" FontWeight="SemiBold" />
<ComboBox x:Name="TransitionCombo"
SelectedIndex="0"
HorizontalAlignment="Stretch"
SelectionChanged="OnTransitionChanged">
<ComboBoxItem Content="Slide from Bottom" />
<ComboBoxItem Content="CrossFade" />
<ComboBoxItem Content="None" />
</ComboBox>
<Separator />
<TextBlock Text="Modal pages slide up from the bottom and dismiss by sliding back down. The ModalTransition property controls this animation independently from the stack PageTransition."
TextWrapping="Wrap" FontSize="12" Opacity="0.7" />
<Separator />
<TextBlock Text="Status" FontWeight="SemiBold" FontSize="13" />
<TextBlock x:Name="StatusText"
Text="Modals: 0"
Opacity="0.7"
TextWrapping="Wrap" />
</StackPanel>
</ScrollViewer>
<Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
<Border Margin="12"
BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
BorderThickness="1"
CornerRadius="6"
ClipToBounds="True">
<NavigationPage x:Name="DemoNav" />
</Border>
</DockPanel>
</UserControl>