CursorPage.xaml 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.CursorPage">
  4. <Grid ColumnDefinitions="*,*" RowDefinitions="Auto,*">
  5. <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Spacing="4">
  6. <TextBlock Classes="h1">Cursor</TextBlock>
  7. <TextBlock Classes="h2">Defines a cursor (mouse pointer)</TextBlock>
  8. </StackPanel>
  9. <ListBox Grid.Row="1" Items="{Binding StandardCursors}" Margin="0 8 8 8">
  10. <ListBox.Styles>
  11. <Style Selector="ListBoxItem">
  12. <Setter Property="Cursor" Value="{Binding Cursor}"/>
  13. </Style>
  14. </ListBox.Styles>
  15. <ListBox.ItemTemplate>
  16. <DataTemplate>
  17. <TextBlock Text="{Binding Type}"/>
  18. </DataTemplate>
  19. </ListBox.ItemTemplate>
  20. </ListBox>
  21. <StackPanel Grid.Column="1" Grid.Row="1" Margin="8 8 0 8">
  22. <Button Cursor="{Binding CustomCursor}" Margin="0 8" Padding="16">
  23. <TextBlock>Custom Cursor</TextBlock>
  24. </Button>
  25. </StackPanel>
  26. </Grid>
  27. </UserControl>