RadioButtonPage.xaml 1.3 KB

123456789101112131415161718192021222324252627
  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">RadioButton</TextBlock>
  5. <TextBlock Classes="h2">Allows the selection of a single option of many</TextBlock>
  6. <StackPanel Orientation="Horizontal"
  7. Margin="0,16,0,0"
  8. HorizontalAlignment="Center"
  9. Gap="16">
  10. <StackPanel Orientation="Vertical"
  11. Gap="16">
  12. <RadioButton IsChecked="True">Option 1</RadioButton>
  13. <RadioButton>Option 2</RadioButton>
  14. <RadioButton IsChecked="{x:Null}">Option 3</RadioButton>
  15. <RadioButton IsEnabled="False">Disabled</RadioButton>
  16. </StackPanel>
  17. <StackPanel Orientation="Vertical"
  18. Gap="16">
  19. <RadioButton IsChecked="True" IsThreeState="True">Three States: Option 1</RadioButton>
  20. <RadioButton IsChecked="False" IsThreeState="True">Three States: Option 2</RadioButton>
  21. <RadioButton IsChecked="{x:Null}" IsThreeState="True">Three States: Option 3</RadioButton>
  22. <RadioButton IsChecked="{x:Null}" IsThreeState="True" IsEnabled="False">Disabled</RadioButton>
  23. </StackPanel>
  24. </StackPanel>
  25. </StackPanel>
  26. </UserControl>