1
0

ContentPageFirstLookPage.xaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.ContentPageFirstLookPage">
  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="ContentPage is the fundamental page type. It hosts a single piece of content and integrates with NavigationPage, TabbedPage, and CarouselPage. The Header property sets the navigation bar title."
  10. FontSize="12" Opacity="0.7" TextWrapping="Wrap" />
  11. <Separator />
  12. <TextBlock Text="Navigation" FontWeight="SemiBold" />
  13. <Button Content="Push Page" HorizontalAlignment="Stretch" Click="OnPush" />
  14. <Button Content="Pop Page" HorizontalAlignment="Stretch" Click="OnPop" />
  15. <Button Content="Pop to Root" HorizontalAlignment="Stretch" Click="OnPopToRoot" />
  16. <Separator />
  17. <TextBlock Text="Key Properties" FontWeight="SemiBold" />
  18. <TextBlock Text="• Header: nav bar title (string or Control)" FontSize="12" Opacity="0.8" TextWrapping="Wrap" />
  19. <TextBlock Text="• Content: any Avalonia control" FontSize="12" Opacity="0.8" TextWrapping="Wrap" />
  20. <TextBlock Text="• Background: page background brush" FontSize="12" Opacity="0.8" TextWrapping="Wrap" />
  21. <TextBlock Text="• HorizontalContentAlignment" FontSize="12" Opacity="0.8" />
  22. <TextBlock Text="• VerticalContentAlignment" FontSize="12" Opacity="0.8" />
  23. <TextBlock Text="• AutomaticallyApplySafeAreaPadding" FontSize="12" Opacity="0.8" />
  24. <Separator />
  25. <TextBlock x:Name="StatusText"
  26. Text="Depth: 1 | Current: Root Page"
  27. FontSize="11"
  28. Opacity="0.7" />
  29. </StackPanel>
  30. </ScrollViewer>
  31. <Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  32. <Border Margin="12"
  33. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  34. BorderThickness="1"
  35. CornerRadius="6"
  36. ClipToBounds="True">
  37. <NavigationPage x:Name="DemoNav" />
  38. </Border>
  39. </DockPanel>
  40. </UserControl>