NavigationPageAppearancePage.xaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.NavigationPageAppearancePage">
  4. <DockPanel>
  5. <ScrollViewer DockPanel.Dock="Right" Width="260">
  6. <StackPanel Margin="12" Spacing="8">
  7. <TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16"
  8. Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
  9. <TextBlock Text="Visibility" FontWeight="SemiBold" FontSize="13" />
  10. <CheckBox x:Name="HasNavBarCheck"
  11. Content="Has Navigation Bar"
  12. IsChecked="True"
  13. IsCheckedChanged="OnHasNavBarChanged" />
  14. <CheckBox x:Name="HasShadowCheck"
  15. Content="Has Shadow"
  16. IsCheckedChanged="OnHasShadowChanged" />
  17. <Separator />
  18. <TextBlock Text="Bar Background" FontWeight="SemiBold" FontSize="14" />
  19. <ComboBox x:Name="BarBgCombo"
  20. SelectedIndex="0"
  21. HorizontalAlignment="Stretch"
  22. SelectionChanged="OnBarBgChanged">
  23. <ComboBoxItem Content="Default" />
  24. <ComboBoxItem Content="DodgerBlue" />
  25. <ComboBoxItem Content="DarkSlateGray" />
  26. <ComboBoxItem Content="Indigo" />
  27. <ComboBoxItem Content="Crimson" />
  28. <ComboBoxItem Content="Transparent" />
  29. <ComboBoxItem Content="Semi-transparent dark" />
  30. </ComboBox>
  31. <Separator />
  32. <TextBlock Text="Bar Foreground" FontWeight="SemiBold" FontSize="14" />
  33. <ComboBox x:Name="BarFgCombo"
  34. SelectedIndex="0"
  35. HorizontalAlignment="Stretch"
  36. SelectionChanged="OnBarFgChanged">
  37. <ComboBoxItem Content="Default" />
  38. <ComboBoxItem Content="White" />
  39. <ComboBoxItem Content="Black" />
  40. <ComboBoxItem Content="Yellow" />
  41. </ComboBox>
  42. <Separator />
  43. <TextBlock Text="Bar Height" FontWeight="SemiBold" FontSize="14" />
  44. <DockPanel>
  45. <TextBlock x:Name="BarHeightLabel"
  46. DockPanel.Dock="Right"
  47. Text="48"
  48. FontSize="12"
  49. Opacity="0.6"
  50. VerticalAlignment="Center"
  51. Width="28"
  52. TextAlignment="Right" />
  53. <Slider x:Name="BarHeightSlider"
  54. Minimum="30"
  55. Maximum="80"
  56. Value="48"
  57. TickFrequency="1"
  58. IsSnapToTickEnabled="True"
  59. ValueChanged="OnBarHeightChanged" />
  60. </DockPanel>
  61. <Separator />
  62. <TextBlock Text="Per-Page Bar Height" FontWeight="SemiBold" FontSize="14" />
  63. <ComboBox x:Name="PerPageBarHeightCombo"
  64. SelectedIndex="0"
  65. HorizontalAlignment="Stretch"
  66. SelectionChanged="OnPerPageBarHeightChanged">
  67. <ComboBoxItem Content="Inherit global" />
  68. <ComboBoxItem Content="Small (32px)" />
  69. <ComboBoxItem Content="Large (72px)" />
  70. </ComboBox>
  71. <TextBlock Text="Overrides bar height on the current page only. Push a detail page to see it change per page."
  72. FontSize="11"
  73. Opacity="0.6"
  74. TextWrapping="Wrap" />
  75. <Separator />
  76. <TextBlock Text="Title Style" FontWeight="SemiBold" FontSize="14" />
  77. <ComboBox x:Name="TitleStyleCombo"
  78. SelectedIndex="0"
  79. HorizontalAlignment="Stretch"
  80. SelectionChanged="OnTitleStyleChanged">
  81. <ComboBoxItem Content="Default (string)" />
  82. <ComboBoxItem Content="Bold + Large" />
  83. <ComboBoxItem Content="Title + Subtitle" />
  84. </ComboBox>
  85. <Separator />
  86. <TextBlock Text="Bar Layout Behavior" FontWeight="SemiBold" FontSize="14" />
  87. <ComboBox x:Name="BarLayoutCombo"
  88. SelectedIndex="0"
  89. HorizontalAlignment="Stretch"
  90. SelectionChanged="OnBarLayoutChanged">
  91. <ComboBoxItem Content="Inset (default)" />
  92. <ComboBoxItem Content="Overlay" />
  93. </ComboBox>
  94. <TextBlock Text="Overlay: content extends behind the bar. Combine with Transparent background to see it."
  95. FontSize="11"
  96. Opacity="0.6"
  97. TextWrapping="Wrap" />
  98. <Separator />
  99. <TextBlock Text="Back Button Style" FontWeight="SemiBold" FontSize="14" />
  100. <ComboBox x:Name="BackButtonStyleCombo"
  101. SelectedIndex="0"
  102. HorizontalAlignment="Stretch"
  103. SelectionChanged="OnBackButtonStyleChanged">
  104. <ComboBoxItem Content="Default icon" />
  105. <ComboBoxItem Content="Text: ← Back" />
  106. <ComboBoxItem Content="Text: Cancel" />
  107. </ComboBox>
  108. <TextBlock Text="Push a detail page to see the styled back button."
  109. FontSize="11"
  110. Opacity="0.6"
  111. TextWrapping="Wrap" />
  112. <Separator />
  113. <Button Content="Push Page"
  114. HorizontalAlignment="Stretch"
  115. Click="OnPush" />
  116. <Button Content="Pop"
  117. HorizontalAlignment="Stretch"
  118. Click="OnPop" />
  119. </StackPanel>
  120. </ScrollViewer>
  121. <Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  122. <Border Margin="12"
  123. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  124. BorderThickness="1"
  125. CornerRadius="6"
  126. ClipToBounds="True">
  127. <NavigationPage x:Name="DemoNav" />
  128. </Border>
  129. </DockPanel>
  130. </UserControl>