Livet er vidunderligt RSS 2.0
# Monday, 05 July 2010
<Style x:Key="HorizontalRadioButtonList" TargetType="{x:Type ListBox}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="ItemsPanel">
    <Setter.Value>
        <ItemsPanelTemplate>
        <VirtualizingStackPanel Background="Transparent" Orientation="Horizontal"/>
        </ItemsPanelTemplate>
    </Setter.Value>
    </Setter>
    <Setter Property="ItemContainerStyle">
    <Setter.Value>
        <Style TargetType="{x:Type ListBoxItem}" >
        <Setter Property="Margin" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                <Border BorderThickness="0" Background="Transparent">
                <RadioButton Focusable="False"
                        IsHitTestVisible="False"
                        IsChecked="{TemplateBinding IsSelected}">
                    <ContentPresenter />
                </RadioButton>
                </Border>
            </ControlTemplate>
            </Setter.Value>
        </Setter>
        </Style>
    </Setter.Value>
    </Setter>
    <Setter Property="Control.Template">
    <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBox}">
        <Border BorderThickness="0" Padding="0" BorderBrush="Transparent" 
            
Background="Transparent" Name="Bd" SnapsToDevicePixels="True">          <ItemsPresenter SnapsToDevicePixels="{TemplateBinding
               UIElement.SnapsToDevicePixels}"
/>         </Border>      </ControlTemplate>     </Setter.Value> </Setter> </Style>
<ListBox Name="lbAchieved"
      Style="{StaticResource HorizontalRadioButtonList}"
      SelectedValue="{Binding Path=IsAchieved, Converter={StaticResource 
         nullableBooleanConverter}}"
     SelectedValuePath="Tag"> <ListBoxItem Tag="True">Yes</ListBoxItem> <ListBoxItem Tag="False">No</ListBoxItem> </ListBox>
Monday, 05 July 2010 23:05:16 (Romance Daylight Time, UTC+02:00)  #    Comments [0] - Trackback
Software Development
Comments are closed.
Archive
<2010 July>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2018
Christian R. Glinnum
Sign In
Statistics
Total Posts: 128
This Year: 0
This Month: 0
This Week: 0
Comments: 16
Themes
All Content © 2018, Christian R. Glinnum
DasBlog theme 'Business' created by Christoph De Baene (delarou)