2023-03-17 23:12:24 +08:00

83 lines
3.9 KiB
XML

<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">
<ScrollViewer>
<StackPanel HorizontalAlignment="Left">
<CheckBox>Unchecked</CheckBox>
<CheckBox IsEnabled="False">Unchecked</CheckBox>
<CheckBox IsChecked="True">Checked</CheckBox>
<CheckBox IsChecked="True" IsEnabled="False">Checked</CheckBox>
<CheckBox IsChecked="{x:Null}" IsThreeState="True">Indeterminate</CheckBox>
<CheckBox
IsChecked="{x:Null}"
IsEnabled="False"
IsThreeState="True">
Indeterminate
</CheckBox>
<CheckBox Width="120">Checkbox should wrap its text</CheckBox>
<CheckBox Width="300" Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Width="300"
IsChecked="True"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Width="300"
IsEnabled="False"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Width="300"
IsChecked="True"
IsEnabled="False"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Width="300"
IsChecked="{x:Null}"
IsEnabled="True"
IsThreeState="True"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
<CheckBox
Width="300"
IsChecked="{x:Null}"
IsEnabled="False"
IsThreeState="True"
Theme="{DynamicResource CardCheckBox}">
<StackPanel>
<TextBlock FontWeight="Bold">复选框标题</TextBlock>
<TextBlock TextWrapping="Wrap">Semi Design 是由互娱社区前端团队与 UED 团队共同设计开发并维护的设计系统</TextBlock>
</StackPanel>
</CheckBox>
</StackPanel>
</ScrollViewer>
</UserControl>