TabbedPageEventsPage.xaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.TabbedPageEventsPage">
  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="Actions" FontWeight="SemiBold" FontSize="13" />
  10. <Button Content="Select Next Tab" HorizontalAlignment="Stretch" Click="OnSelectNext" />
  11. <Button Content="Select Previous Tab" HorizontalAlignment="Stretch" Click="OnSelectPrevious" />
  12. <Separator />
  13. <DockPanel>
  14. <TextBlock DockPanel.Dock="Left" Text="Event Log" FontWeight="SemiBold" FontSize="13"
  15. VerticalAlignment="Center" />
  16. <Button DockPanel.Dock="Right" Content="Clear" Click="OnClearLog"
  17. HorizontalAlignment="Right" Padding="8,2" FontSize="11" />
  18. </DockPanel>
  19. <Border Background="{DynamicResource SystemControlBackgroundBaseLowBrush}"
  20. CornerRadius="4" Padding="8" MinHeight="120" MaxHeight="300">
  21. <ScrollViewer x:Name="LogScrollViewer" VerticalScrollBarVisibility="Auto">
  22. <TextBlock x:Name="EventLog"
  23. Text=""
  24. FontFamily="Cascadia Code,Consolas,Menlo,monospace"
  25. FontSize="11"
  26. TextWrapping="Wrap" />
  27. </ScrollViewer>
  28. </Border>
  29. <Separator />
  30. <TextBlock TextWrapping="Wrap" FontSize="12" Opacity="0.7"
  31. Text="SelectionChanged fires when the selected tab changes. NavigatedTo/NavigatedFrom are page lifecycle events that fire on the outgoing and incoming pages." />
  32. </StackPanel>
  33. </ScrollViewer>
  34. <Border DockPanel.Dock="Right" Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  35. <Border Margin="12"
  36. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  37. BorderThickness="1"
  38. CornerRadius="6"
  39. ClipToBounds="True">
  40. <!-- Pages configured in code-behind so lifecycle events are subscribed before NavigatedTo fires. -->
  41. <TabbedPage x:Name="DemoTabs" TabPlacement="Bottom" />
  42. </Border>
  43. </DockPanel>
  44. </UserControl>