TabbedPageFirstLookPage.xaml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.TabbedPageFirstLookPage">
  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="Tab Management" FontWeight="SemiBold" FontSize="13" />
  10. <StackPanel Spacing="6">
  11. <Button Content="Add Tab" Click="OnAddTab" HorizontalAlignment="Stretch" />
  12. <Button Content="Remove Latest Tab" Click="OnRemoveTab" HorizontalAlignment="Stretch" />
  13. </StackPanel>
  14. <Separator />
  15. <TextBlock Text="Tab Placement" FontWeight="SemiBold" FontSize="13" />
  16. <ComboBox x:Name="PlacementCombo" SelectedIndex="0"
  17. SelectionChanged="OnPlacementChanged" HorizontalAlignment="Stretch">
  18. <ComboBoxItem Content="Top" />
  19. <ComboBoxItem Content="Bottom" />
  20. <ComboBoxItem Content="Left" />
  21. <ComboBoxItem Content="Right" />
  22. </ComboBox>
  23. <Separator />
  24. <TextBlock Text="Status" FontWeight="SemiBold" FontSize="14" />
  25. <TextBlock x:Name="StatusText"
  26. Text="3 tabs | Selected: Home (0)"
  27. Opacity="0.7"
  28. TextWrapping="Wrap" />
  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. <TabbedPage x:Name="DemoTabs"
  38. TabPlacement="Top"
  39. SelectionChanged="OnSelectionChanged">
  40. <ContentPage Header="Home">
  41. <StackPanel Margin="16" Spacing="8">
  42. <TextBlock Text="Home Tab" FontSize="24" FontWeight="Bold" />
  43. <TextBlock Text="Welcome to the Home tab. This is a TabbedPage sample."
  44. TextWrapping="Wrap" />
  45. <TextBlock Text="Use the panel on the right to add or remove tabs dynamically."
  46. TextWrapping="Wrap" Opacity="0.7" />
  47. </StackPanel>
  48. </ContentPage>
  49. <ContentPage Header="Search">
  50. <StackPanel Margin="16" Spacing="8">
  51. <TextBlock Text="Search Tab" FontSize="24" FontWeight="Bold" />
  52. <TextBox PlaceholderText="Type to search..." />
  53. <TextBlock Text="Search results will appear here." Opacity="0.7" />
  54. </StackPanel>
  55. </ContentPage>
  56. <ContentPage Header="Settings">
  57. <StackPanel Margin="16" Spacing="8">
  58. <TextBlock Text="Settings Tab" FontSize="24" FontWeight="Bold" />
  59. <CheckBox Content="Enable notifications" />
  60. <CheckBox Content="Dark mode" />
  61. <CheckBox Content="Auto-save" IsChecked="True" />
  62. </StackPanel>
  63. </ContentPage>
  64. </TabbedPage>
  65. </Border>
  66. </DockPanel>
  67. </UserControl>