|
<Windows:DataWindow x:Class="Catel.Windows.MultipleChoiceWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:Catel.Windows.Controls"
xmlns:Windows="clr-namespace:Catel.Windows"
MinWidth="400">
<!-- Content -->
<StackPanel DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}}">
<!-- Show choices -->
<ListBox ItemsSource="{DynamicResource ChoiceCollection}" SelectedItem="{Binding SelectedChoice}"
BorderThickness="0" Margin="0">
<ListBox.Resources>
<Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border Background="Transparent">
<RadioButton Content="{Binding Header}"
IsChecked="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.Resources>
</ListBox>
<!-- Reason text -->
<Controls:MultiLineInput Text="{Binding Choice}" IsEnabled="{Binding SelectedChoice.AllowCustomization}"/>
</StackPanel>
</Windows:DataWindow>
|
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.