CarouselPage.xaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <UserControl xmlns="https://github.com/avaloniaui">
  2. <StackPanel Orientation="Vertical" Spacing="4">
  3. <TextBlock Classes="h1">Carousel</TextBlock>
  4. <TextBlock Classes="h2">An items control that displays its items as pages that fill the control.</TextBlock>
  5. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 16 0 0" Spacing="8">
  6. <Button Name="left" VerticalAlignment="Center" Padding="20">
  7. <Path Data="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" Fill="Black"/>
  8. </Button>
  9. <Carousel Name="carousel">
  10. <Carousel.PageTransition>
  11. <PageSlide Duration="0.25" Orientation="Vertical" />
  12. </Carousel.PageTransition>
  13. <Image Source="resm:ControlCatalog.Assets.delicate-arch-896885_640.jpg"/>
  14. <Image Source="resm:ControlCatalog.Assets.hirsch-899118_640.jpg"/>
  15. <Image Source="resm:ControlCatalog.Assets.maple-leaf-888807_640.jpg"/>
  16. </Carousel>
  17. <Button Name="right" VerticalAlignment="Center" Padding="20">
  18. <Path Data="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z" Fill="Black"/>
  19. </Button>
  20. </StackPanel>
  21. <StackPanel Orientation="Horizontal" Spacing="4">
  22. <TextBlock VerticalAlignment="Center">Transition</TextBlock>
  23. <DropDown Name="transition" SelectedIndex="1" VerticalAlignment="Center">
  24. <DropDownItem>None</DropDownItem>
  25. <DropDownItem>Slide</DropDownItem>
  26. <DropDownItem>Crossfade</DropDownItem>
  27. </DropDown>
  28. </StackPanel>
  29. <StackPanel Orientation="Horizontal" Spacing="4">
  30. <TextBlock VerticalAlignment="Center">Orientation</TextBlock>
  31. <DropDown Name="orientation" SelectedIndex="1" VerticalAlignment="Center">
  32. <DropDownItem>Horizontal</DropDownItem>
  33. <DropDownItem>Vertical</DropDownItem>
  34. </DropDown>
  35. </StackPanel>
  36. </StackPanel>
  37. </UserControl>