|
<UserControl x:Class="Catel.Windows.Controls.ToggleRadioButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:coreconverters="clr-namespace:Catel.Windows.Data.Converters">
<!-- Resources -->
<UserControl.Resources>
<!-- Converters -->
<coreconverters:IsSelectedConverter x:Key="IsSelectedConverter" />
</UserControl.Resources>
<!-- Content -->
<Grid DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<!-- Column definitions -->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Labels -->
<TextBlock Grid.Column="0" Text="{Binding TextCaption}" TextWrapping="Wrap" />
<RadioButton Grid.Column="1" Content="{Binding TextCaptionYes}" HorizontalAlignment="Right"
IsChecked="{Binding Path=GivenAnswer, Converter={StaticResource IsSelectedConverter}, ConverterParameter=true}" />
<RadioButton Grid.Column="2" Content="{Binding TextCaptionNo}" HorizontalAlignment="Right"
IsChecked="{Binding Path=GivenAnswer, Converter={StaticResource IsSelectedConverter}, ConverterParameter=false}" />
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.