106 lines
6.2 KiB
XML
106 lines
6.2 KiB
XML
<UserControl x:Class="AntdWpfDemo.Views.RadioButtonView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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"
|
|
xmlns:antd="https://github.com/ShrlAlgo/AntdWpf"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="600"
|
|
d:DesignWidth="930">
|
|
|
|
<ScrollViewer>
|
|
<Grid Margin="16 0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel>
|
|
<Label Style="{StaticResource Ant.H1}" Content="Radio" />
|
|
<TextBlock Style="{StaticResource Ant.P}" Text="Radio." />
|
|
|
|
<Label Style="{StaticResource Ant.H2}" Content="When To Use" />
|
|
<TextBlock Style="{StaticResource Ant.P}"
|
|
TextWrapping="Wrap"
|
|
Text="Used to select a single state in multiple options.
The difference between Select is that Radio is visible to user and can facilitate the comparison of choice, which makes there shouldn't be too many of them." />
|
|
|
|
<Label Style="{StaticResource Ant.H2}" Content="Examples" />
|
|
</StackPanel>
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Margin="8 0">
|
|
<antd:CodeBox Title="Basic">
|
|
<antd:CodeBox.Description>
|
|
The simplest use.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<RadioButton Content="Radio" />
|
|
</antd:CodeBox.Content>
|
|
<antd:CodeBox.Code>
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
|
<RadioButton Content="Radio" />
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
<antd:CodeBox Title="Radio Group">
|
|
<antd:CodeBox.Description>
|
|
A group of radio components.
|
|
</antd:CodeBox.Description>
|
|
<!--<antd:CodeBox.Content>
|
|
<antd:RadioButtonGroup Orientation="Vertical">
|
|
<RadioButton Content="A" />
|
|
<RadioButton Content="B" GroupName="A" />
|
|
<RadioButton Content="C" GroupName="A" />
|
|
<RadioButton Content="D" />
|
|
</antd:RadioButtonGroup>
|
|
</antd:CodeBox.Content>-->
|
|
<antd:CodeBox.Code>
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
|
<RadioButton Content="Radio" />
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
<antd:CodeBox Title="RadioGroup group - ItemsSource">
|
|
<antd:CodeBox.Description>
|
|
Render radios by configuring `ItemsSource`.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<antd:RadioButtonGroup ItemsSource="{Binding Items}" DisplayMemberPath="Label" Orientation="Vertical" />
|
|
</antd:CodeBox.Content>
|
|
<antd:CodeBox.Code>
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
|
<RadioButton Content="Radio" />
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
</StackPanel>
|
|
<StackPanel Grid.Column="1" Margin="8 0">
|
|
<antd:CodeBox Title="Disabled">
|
|
<antd:CodeBox.Description>
|
|
Radio unavailable.
|
|
</antd:CodeBox.Description>
|
|
<antd:CodeBox.Content>
|
|
<StackPanel>
|
|
<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" Margin="0 0 0 8" />
|
|
<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" IsChecked="True" />
|
|
<antd:AntButton x:Name="Toggle" Type="Primary" Content="Toggle disabled" Margin="0 20 0 0" />
|
|
</StackPanel>
|
|
</antd:CodeBox.Content>
|
|
<antd:CodeBox.Code>
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Themes/Theme.xaml" />\n
|
|
<ResourceDictionary Source="pack://application:,,,/AntdWpf;component/Styles/antd.xaml" />\n\n
|
|
<StackPanel>\n
|
|
\t<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" Margin="0 0 0 8" />\n
|
|
\t<RadioButton Content="Radio" IsEnabled="{Binding IsEnabled}" IsChecked="True" />\n
|
|
\t<antd:Button x:Name="Toggle" Type="Primary" Content="Toggle disabled" Margin="0 20 0 0" />\n
|
|
</StackPanel>\n
|
|
</antd:CodeBox.Code>
|
|
</antd:CodeBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</UserControl>
|