ButtonSpinnerPage.xaml 1.9 KB

12345678910111213141516171819202122232425262728293031323334
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.ButtonSpinnerPage"
  4. xmlns:sys="clr-namespace:System;assembly=netstandard">
  5. <StackPanel Orientation="Vertical" Spacing="4">
  6. <TextBlock Classes="h1">ButtonSpinner</TextBlock>
  7. <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>
  8. <StackPanel Orientation="Vertical" Spacing="8" Width="200" Margin="0,20,0,0">
  9. <CheckBox Name="allowSpinCheck" IsChecked="True">AllowSpin</CheckBox>
  10. <CheckBox Name="showSpinCheck" IsChecked="True">ShowButtonSpinner</CheckBox>
  11. <ButtonSpinner Spin="OnSpin" Height="30"
  12. AllowSpin="{Binding #allowSpinCheck.IsChecked}"
  13. ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
  14. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
  15. </ButtonSpinner>
  16. <ButtonSpinner Spin="OnSpin" Height="30" ButtonSpinnerLocation="Left"
  17. AllowSpin="{Binding #allowSpinCheck.IsChecked}"
  18. ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
  19. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
  20. </ButtonSpinner>
  21. <ButtonSpinner MinHeight="30" Spin="OnSpin" ButtonSpinnerLocation="Left"
  22. AllowSpin="{Binding #allowSpinCheck.IsChecked}"
  23. ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
  24. <DataValidationErrors.Error>
  25. <sys:Exception />
  26. </DataValidationErrors.Error>
  27. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
  28. </ButtonSpinner>
  29. </StackPanel>
  30. </StackPanel>
  31. </UserControl>