CarouselPageFirstLookPage.xaml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.CarouselPageFirstLookPage">
  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="Navigation" FontWeight="SemiBold" FontSize="13" />
  10. <StackPanel Spacing="6">
  11. <Button Content="Previous" Click="OnPrevious" HorizontalAlignment="Stretch" />
  12. <Button Content="Next" Click="OnNext" HorizontalAlignment="Stretch" />
  13. </StackPanel>
  14. <Separator />
  15. <TextBlock Text="Status" FontWeight="SemiBold" FontSize="13" />
  16. <TextBlock x:Name="StatusText" Text="Page 1 of 3" Opacity="0.7" TextWrapping="Wrap" />
  17. </StackPanel>
  18. </ScrollViewer>
  19. <Border DockPanel.Dock="Right" Width="1"
  20. Background="{DynamicResource SystemControlForegroundBaseMediumLowBrush}" />
  21. <Border Margin="12"
  22. BorderBrush="{DynamicResource SystemControlForegroundBaseMediumLowBrush}"
  23. BorderThickness="1" CornerRadius="6" ClipToBounds="True">
  24. <CarouselPage x:Name="DemoCarousel"
  25. SelectionChanged="OnSelectionChanged">
  26. <ContentPage Header="Welcome">
  27. <StackPanel Margin="24" Spacing="12"
  28. HorizontalAlignment="Center" VerticalAlignment="Center">
  29. <TextBlock Text="Welcome" FontSize="28" FontWeight="Bold"
  30. HorizontalAlignment="Center" />
  31. <TextBlock Text="Swipe left or use the buttons to navigate."
  32. TextWrapping="Wrap" Opacity="0.7" TextAlignment="Center" MaxWidth="280" />
  33. </StackPanel>
  34. </ContentPage>
  35. <ContentPage Header="Explore">
  36. <StackPanel Margin="24" Spacing="12"
  37. HorizontalAlignment="Center" VerticalAlignment="Center">
  38. <TextBlock Text="Explore" FontSize="28" FontWeight="Bold"
  39. HorizontalAlignment="Center" />
  40. <TextBlock Text="CarouselPage supports scroll-based and transition-based navigation modes."
  41. TextWrapping="Wrap" Opacity="0.7" TextAlignment="Center" MaxWidth="280" />
  42. </StackPanel>
  43. </ContentPage>
  44. <ContentPage Header="Get Started">
  45. <StackPanel Margin="24" Spacing="12"
  46. HorizontalAlignment="Center" VerticalAlignment="Center">
  47. <TextBlock Text="Get Started" FontSize="28" FontWeight="Bold"
  48. HorizontalAlignment="Center" />
  49. <TextBlock Text="Use SelectedIndex to jump to any page, or assign a PageTransition for animated switching."
  50. TextWrapping="Wrap" Opacity="0.7" TextAlignment="Center" MaxWidth="280" />
  51. </StackPanel>
  52. </ContentPage>
  53. </CarouselPage>
  54. </Border>
  55. </DockPanel>
  56. </UserControl>