NavigationPageAttachedMethodsPage.xaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.NavigationPageAttachedMethodsPage">
  4. <DockPanel>
  5. <ScrollViewer DockPanel.Dock="Right" Width="270">
  6. <StackPanel Margin="12" Spacing="8">
  7. <!-- SetHasNavigationBar -->
  8. <TextBlock Text="SetHasNavigationBar" FontWeight="SemiBold" FontSize="13" />
  9. <TextBlock Text="Controls whether the navigation bar is visible for a specific page. Does not affect other pages in the stack."
  10. FontSize="11"
  11. Opacity="0.6"
  12. TextWrapping="Wrap" />
  13. <CheckBox x:Name="HasNavBarCheck"
  14. Content="Show navigation bar"
  15. IsChecked="True" />
  16. <Separator />
  17. <!-- SetHasBackButton -->
  18. <TextBlock Text="SetHasBackButton" FontWeight="SemiBold" FontSize="13" />
  19. <TextBlock Text="Shows or hides the back button for a specific page, regardless of the global IsBackButtonVisible setting."
  20. FontSize="11"
  21. Opacity="0.6"
  22. TextWrapping="Wrap" />
  23. <CheckBox x:Name="HasBackButtonCheck"
  24. Content="Show back button"
  25. IsChecked="True" />
  26. <Separator />
  27. <!-- SetBackButtonContent -->
  28. <TextBlock Text="SetBackButtonContent" FontWeight="SemiBold" FontSize="13" />
  29. <TextBlock Text="Sets custom content for the back button on a page. Accepts any string or Control. Leave blank to use the default arrow icon."
  30. FontSize="11"
  31. Opacity="0.6"
  32. TextWrapping="Wrap" />
  33. <ComboBox x:Name="BackButtonCombo"
  34. SelectedIndex="0"
  35. HorizontalAlignment="Stretch">
  36. <ComboBoxItem Content="Default icon" />
  37. <ComboBoxItem Content="← Back" />
  38. <ComboBoxItem Content="Cancel" />
  39. <ComboBoxItem Content="✓ Done" />
  40. </ComboBox>
  41. <Separator />
  42. <!-- SetHeader -->
  43. <TextBlock Text="SetHeader" FontWeight="SemiBold" FontSize="13" />
  44. <TextBlock Text="Sets the page header displayed in the navigation bar. Accepts any string or Control."
  45. FontSize="11"
  46. Opacity="0.6"
  47. TextWrapping="Wrap" />
  48. <ComboBox x:Name="HeaderCombo"
  49. SelectedIndex="0"
  50. HorizontalAlignment="Stretch">
  51. <ComboBoxItem Content="String: page title" />
  52. <ComboBoxItem Content="Title + Subtitle" />
  53. <ComboBoxItem Content="Search box" />
  54. <ComboBoxItem Content="None (hidden)" />
  55. </ComboBox>
  56. <Separator />
  57. <TextBlock Text="Navigation" FontWeight="SemiBold" FontSize="13" />
  58. <Button Content="Push Page with Above Settings"
  59. HorizontalAlignment="Stretch"
  60. Click="OnPush" />
  61. <Button Content="Pop"
  62. HorizontalAlignment="Stretch"
  63. Click="OnPop" />
  64. <Button Content="Pop to Root"
  65. HorizontalAlignment="Stretch"
  66. Click="OnPopToRoot" />
  67. </StackPanel>
  68. </ScrollViewer>
  69. <Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  70. <Border Margin="12"
  71. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  72. BorderThickness="1"
  73. CornerRadius="6"
  74. ClipToBounds="True">
  75. <NavigationPage x:Name="DemoNav" />
  76. </Border>
  77. </DockPanel>
  78. </UserControl>