NavigationPageStackPage.xaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.NavigationPageStackPage">
  4. <DockPanel>
  5. <ScrollViewer DockPanel.Dock="Right" Width="260">
  6. <StackPanel Margin="12" Spacing="8">
  7. <TextBlock Text="Stack Inspector" FontSize="16" FontWeight="SemiBold"
  8. Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
  9. <Button Content="Push New Page"
  10. HorizontalAlignment="Stretch"
  11. Click="OnPush" />
  12. <Button Content="Insert Before Current"
  13. HorizontalAlignment="Stretch"
  14. ToolTip.Tip="Inserts a new page so navigating back from the current page lands on it."
  15. Click="OnInsert" />
  16. <Separator />
  17. <DockPanel>
  18. <TextBlock DockPanel.Dock="Left" Text="Stack" FontSize="13" FontWeight="SemiBold" />
  19. <TextBlock x:Name="DepthLabel" DockPanel.Dock="Right"
  20. HorizontalAlignment="Right" FontSize="12" Opacity="0.5" />
  21. </DockPanel>
  22. <TextBlock Text="▲ Current (top)"
  23. FontSize="11" Opacity="0.45" Margin="0,-6,0,0" />
  24. <StackPanel x:Name="StackDisplay" Spacing="4" Margin="0,4,0,4" />
  25. <TextBlock Text="▼ Root (bottom)"
  26. FontSize="11" Opacity="0.45" Margin="0,4,0,0" />
  27. </StackPanel>
  28. </ScrollViewer>
  29. <Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  30. <Border Margin="12"
  31. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  32. BorderThickness="1"
  33. CornerRadius="6"
  34. ClipToBounds="True">
  35. <NavigationPage x:Name="DemoNav" />
  36. </Border>
  37. </DockPanel>
  38. </UserControl>