CarouselPageCustomizationPage.xaml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.CarouselPageCustomizationPage">
  4. <DockPanel>
  5. <ScrollViewer DockPanel.Dock="Right" Width="220">
  6. <StackPanel Margin="12" Spacing="8">
  7. <TextBlock Text="Configuration" FontWeight="SemiBold" FontSize="16"
  8. Foreground="{DynamicResource SystemControlHighlightAccentBrush}" />
  9. <TextBlock Text="Slide Direction" FontWeight="SemiBold" FontSize="13" />
  10. <ComboBox x:Name="OrientationCombo" SelectedIndex="0"
  11. SelectionChanged="OnOrientationChanged"
  12. HorizontalAlignment="Stretch">
  13. <ComboBoxItem Content="Horizontal" />
  14. <ComboBoxItem Content="Vertical" />
  15. </ComboBox>
  16. <Separator />
  17. <TextBlock Text="Navigate" FontWeight="SemiBold" FontSize="13" />
  18. <StackPanel Spacing="6">
  19. <Button Content="Previous" Click="OnPrevious" HorizontalAlignment="Stretch" />
  20. <Button Content="Next" Click="OnNext" HorizontalAlignment="Stretch" />
  21. </StackPanel>
  22. <Separator />
  23. <TextBlock Text="Status" FontWeight="SemiBold" FontSize="13" />
  24. <TextBlock x:Name="StatusText" Text="—" Opacity="0.7" TextWrapping="Wrap" />
  25. </StackPanel>
  26. </ScrollViewer>
  27. <Border DockPanel.Dock="Right" Width="1"
  28. Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  29. <Border Margin="12"
  30. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  31. BorderThickness="1"
  32. CornerRadius="6"
  33. ClipToBounds="True">
  34. <Panel>
  35. <CarouselPage x:Name="DemoCarousel">
  36. <ContentPage Header="Sunrise"
  37. Background="#FFFDE68A"
  38. HorizontalContentAlignment="Stretch"
  39. VerticalContentAlignment="Stretch">
  40. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="8">
  41. <Border Width="64" Height="64" CornerRadius="32"
  42. Background="#F59E0B" />
  43. <TextBlock Text="Sunrise" FontSize="28" FontWeight="Bold"
  44. Foreground="#92400E" HorizontalAlignment="Center" />
  45. <TextBlock Text="A new day begins. Warm golden hues fill the horizon."
  46. FontSize="13" Foreground="#92400E" Opacity="0.8"
  47. TextWrapping="Wrap" TextAlignment="Center" MaxWidth="240" />
  48. </StackPanel>
  49. </ContentPage>
  50. <ContentPage Header="Ocean"
  51. Background="#FFBFDBFE"
  52. HorizontalContentAlignment="Stretch"
  53. VerticalContentAlignment="Stretch">
  54. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="8">
  55. <Border Width="64" Height="64" CornerRadius="32"
  56. Background="#3B82F6" />
  57. <TextBlock Text="Ocean" FontSize="28" FontWeight="Bold"
  58. Foreground="#1E3A5F" HorizontalAlignment="Center" />
  59. <TextBlock Text="Vast blue waters stretch beyond what the eye can see."
  60. FontSize="13" Foreground="#1E3A5F" Opacity="0.8"
  61. TextWrapping="Wrap" TextAlignment="Center" MaxWidth="240" />
  62. </StackPanel>
  63. </ContentPage>
  64. <ContentPage Header="Forest"
  65. Background="#FFBBF7D0"
  66. HorizontalContentAlignment="Stretch"
  67. VerticalContentAlignment="Stretch">
  68. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="8">
  69. <Border Width="64" Height="64" CornerRadius="32"
  70. Background="#22C55E" />
  71. <TextBlock Text="Forest" FontSize="28" FontWeight="Bold"
  72. Foreground="#14532D" HorizontalAlignment="Center" />
  73. <TextBlock Text="Ancient trees whisper in the quiet woodland breeze."
  74. FontSize="13" Foreground="#14532D" Opacity="0.8"
  75. TextWrapping="Wrap" TextAlignment="Center" MaxWidth="240" />
  76. </StackPanel>
  77. </ContentPage>
  78. <ContentPage Header="Night"
  79. Background="#1E1B4B"
  80. HorizontalContentAlignment="Stretch"
  81. VerticalContentAlignment="Stretch">
  82. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="8">
  83. <Border Width="64" Height="64" CornerRadius="32"
  84. Background="#6366F1" />
  85. <TextBlock Text="Night" FontSize="28" FontWeight="Bold"
  86. Foreground="#C7D2FE" HorizontalAlignment="Center" />
  87. <TextBlock Text="Stars emerge as the world quiets into peaceful darkness."
  88. FontSize="13" Foreground="#C7D2FE" Opacity="0.8"
  89. TextWrapping="Wrap" TextAlignment="Center" MaxWidth="240" />
  90. </StackPanel>
  91. </ContentPage>
  92. </CarouselPage>
  93. <!-- Page indicator dots -->
  94. <Border VerticalAlignment="Bottom" HorizontalAlignment="Center"
  95. Margin="0,0,0,12" CornerRadius="8" Background="#44000000"
  96. Padding="10,4">
  97. <StackPanel Orientation="Horizontal" Spacing="6">
  98. <Ellipse x:Name="Dot0" Width="8" Height="8" Fill="White" />
  99. <Ellipse x:Name="Dot1" Width="8" Height="8" Fill="White" Opacity="0.4" />
  100. <Ellipse x:Name="Dot2" Width="8" Height="8" Fill="White" Opacity="0.4" />
  101. <Ellipse x:Name="Dot3" Width="8" Height="8" Fill="White" Opacity="0.4" />
  102. </StackPanel>
  103. </Border>
  104. </Panel>
  105. </Border>
  106. </DockPanel>
  107. </UserControl>