NavigationPageModalTransitionsPage.xaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.NavigationPageModalTransitionsPage">
  4. <DockPanel>
  5. <ScrollViewer DockPanel.Dock="Right" Width="260">
  6. <StackPanel Margin="12" Spacing="8">
  7. <TextBlock Text="Configuration" FontSize="16" FontWeight="SemiBold"
  8. Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
  9. <TextBlock Text="Modal Transition" />
  10. <ComboBox x:Name="TransitionCombo"
  11. SelectedIndex="0"
  12. HorizontalAlignment="Stretch"
  13. SelectionChanged="OnTransitionChanged">
  14. <ComboBoxItem Content="Slide from Bottom" />
  15. <ComboBoxItem Content="Cross Fade" />
  16. <ComboBoxItem Content="None" />
  17. </ComboBox>
  18. <TextBlock Text="Duration (ms)" />
  19. <DockPanel>
  20. <TextBlock x:Name="DurationLabel" DockPanel.Dock="Right"
  21. Text="300 ms"
  22. FontSize="12" Opacity="0.7"
  23. VerticalAlignment="Center"
  24. Width="50" TextAlignment="Right" />
  25. <Slider x:Name="DurationSlider"
  26. Minimum="100"
  27. Maximum="1000"
  28. Value="300"
  29. TickFrequency="100"
  30. IsSnapToTickEnabled="True"
  31. ValueChanged="OnDurationChanged" />
  32. </DockPanel>
  33. <Separator />
  34. <Button Content="Open Modal"
  35. HorizontalAlignment="Stretch"
  36. Click="OnOpenModal" />
  37. <Button Content="Pop Modal"
  38. HorizontalAlignment="Stretch"
  39. Click="OnPopModal" />
  40. <TextBlock x:Name="StatusText"
  41. Text="Modals: 0"
  42. Opacity="0.7" />
  43. </StackPanel>
  44. </ScrollViewer>
  45. <Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  46. <Border Margin="12"
  47. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  48. BorderThickness="1"
  49. CornerRadius="6"
  50. ClipToBounds="True">
  51. <NavigationPage x:Name="DemoNav" />
  52. </Border>
  53. </DockPanel>
  54. </UserControl>