2022-12-09 01:14:49 +08:00
|
|
|
<UserControl
|
|
|
|
x:Class="Semi.Avalonia.Demo.Pages.CheckBoxDemo"
|
|
|
|
xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
d:DesignHeight="450"
|
|
|
|
d:DesignWidth="800"
|
|
|
|
mc:Ignorable="d">
|
2023-03-17 23:20:39 +08:00
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto">
|
2023-06-06 16:43:45 +08:00
|
|
|
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
2023-03-27 16:00:27 +08:00
|
|
|
<TextBlock Text="CheckBox" />
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<CheckBox>Unchecked</CheckBox>
|
|
|
|
<CheckBox IsChecked="True">Checked</CheckBox>
|
|
|
|
<CheckBox IsChecked="{x:Null}" IsThreeState="True">Indeterminate</CheckBox>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<CheckBox IsEnabled="False">Unchecked</CheckBox>
|
|
|
|
<CheckBox IsChecked="True" IsEnabled="False">Checked</CheckBox>
|
|
|
|
<CheckBox
|
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsEnabled="False"
|
|
|
|
IsThreeState="True">
|
|
|
|
Indeterminate
|
|
|
|
</CheckBox>
|
|
|
|
</StackPanel>
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox Width="120" HorizontalAlignment="Left">Checkbox should wrap its text</CheckBox>
|
2023-06-06 16:43:45 +08:00
|
|
|
<TextBlock Text="SimpleCheckBox" />
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<CheckBox Theme="{StaticResource SimpleCheckBox}" />
|
2023-06-07 22:07:55 +08:00
|
|
|
<CheckBox IsChecked="True" Theme="{StaticResource SimpleCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsThreeState="True"
|
|
|
|
Theme="{StaticResource SimpleCheckBox}" />
|
2023-06-06 16:43:45 +08:00
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
2023-06-07 22:07:55 +08:00
|
|
|
<CheckBox IsEnabled="False" Theme="{StaticResource SimpleCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
IsChecked="True"
|
|
|
|
IsEnabled="False"
|
|
|
|
Theme="{StaticResource SimpleCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsEnabled="False"
|
|
|
|
IsThreeState="True"
|
|
|
|
Theme="{StaticResource SimpleCheckBox}" />
|
2023-06-06 16:43:45 +08:00
|
|
|
</StackPanel>
|
2023-07-25 13:35:58 +08:00
|
|
|
<TextBlock Text="CardCheckBox" />
|
2023-03-27 16:00:27 +08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2023-07-25 13:35:58 +08:00
|
|
|
<StackPanel.Styles>
|
|
|
|
<Style Selector="CheckBox">
|
|
|
|
<Setter Property="Width" Value="150" />
|
|
|
|
<Setter Property="Margin" Value="8" />
|
|
|
|
</Style>
|
|
|
|
</StackPanel.Styles>
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="Windows"
|
2023-03-17 23:20:39 +08:00
|
|
|
IsChecked="True"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource CardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="macOS"
|
|
|
|
IsChecked="True"
|
2023-03-17 23:20:39 +08:00
|
|
|
IsEnabled="False"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource CardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="Linux"
|
2023-03-27 16:00:27 +08:00
|
|
|
IsChecked="True"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource CardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="iOS"
|
2023-03-17 23:20:39 +08:00
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsThreeState="True"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource CardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="Android"
|
2023-03-27 16:00:27 +08:00
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsThreeState="True"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource CardCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
Content="Wasm"
|
|
|
|
IsChecked="False"
|
|
|
|
IsThreeState="True"
|
|
|
|
Theme="{DynamicResource CardCheckBox}" />
|
2023-03-27 16:00:27 +08:00
|
|
|
</StackPanel>
|
2023-07-25 13:35:58 +08:00
|
|
|
<TextBlock Text="PureCardCheckBox" />
|
2023-03-27 16:00:27 +08:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2023-07-25 13:35:58 +08:00
|
|
|
<StackPanel.Styles>
|
|
|
|
<Style Selector="CheckBox">
|
|
|
|
<Setter Property="Width" Value="150" />
|
|
|
|
<Setter Property="Margin" Value="8" />
|
|
|
|
</Style>
|
|
|
|
</StackPanel.Styles>
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="Windows"
|
|
|
|
IsChecked="True"
|
|
|
|
Theme="{DynamicResource PureCardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="macOS"
|
2023-03-27 16:00:27 +08:00
|
|
|
IsChecked="True"
|
|
|
|
IsEnabled="False"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource PureCardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
<CheckBox
|
2023-07-25 13:35:58 +08:00
|
|
|
Content="Linux"
|
|
|
|
IsChecked="True"
|
|
|
|
Theme="{DynamicResource PureCardCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
Content="iOS"
|
2023-03-17 23:20:39 +08:00
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsThreeState="True"
|
2023-07-25 13:35:58 +08:00
|
|
|
Theme="{DynamicResource PureCardCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
Content="Android"
|
|
|
|
IsChecked="{x:Null}"
|
|
|
|
IsThreeState="True"
|
|
|
|
Theme="{DynamicResource PureCardCheckBox}" />
|
|
|
|
<CheckBox
|
|
|
|
Content="Wasm"
|
|
|
|
IsChecked="False"
|
|
|
|
IsThreeState="True"
|
|
|
|
Theme="{DynamicResource PureCardCheckBox}" />
|
2023-03-17 23:20:39 +08:00
|
|
|
</StackPanel>
|
2023-03-17 23:12:24 +08:00
|
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
2023-03-27 16:00:27 +08:00
|
|
|
</UserControl>
|