ButtonSpinnerPage.xaml 1.3 KB

123456789101112131415161718192021222324
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <StackPanel Orientation="Vertical" Gap="4">
  4. <TextBlock Classes="h1">ButtonSpinner</TextBlock>
  5. <TextBlock Classes="h2">The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element.</TextBlock>
  6. <StackPanel Orientation="Vertical" Gap="8" Width="200" Margin="0,20,0,0">
  7. <CheckBox Name="allowSpinCheck" IsChecked="True">AllowSpin</CheckBox>
  8. <CheckBox Name="showSpinCheck" IsChecked="True">ShowButtonSpinner</CheckBox>
  9. <ButtonSpinner Spin="OnSpin" Height="30"
  10. AllowSpin="{Binding #allowSpinCheck.IsChecked}"
  11. ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
  12. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
  13. </ButtonSpinner>
  14. <ButtonSpinner Spin="OnSpin" Height="30" ButtonSpinnerLocation="Left"
  15. AllowSpin="{Binding #allowSpinCheck.IsChecked}"
  16. ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
  17. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
  18. </ButtonSpinner>
  19. </StackPanel>
  20. </StackPanel>
  21. </UserControl>