34 lines
1.7 KiB
XML
34 lines
1.7 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<!-- Initialize -->
|
|
<!-- Custom Style -->
|
|
<!--TreeView-->
|
|
<Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Focusable" Value="False"/>
|
|
<Setter Property="Width" Value="16"/>
|
|
<Setter Property="Height" Value="16"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
|
<Image x:Name="PART_Image" RenderOptions.BitmapScalingMode="HighQuality"
|
|
Source="{Binding ImageSource}"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="TreeViewItemStyle" TargetType="TreeViewItem">
|
|
<Setter Property="IsExpanded" Value="False"/>
|
|
<Setter Property="IsSelected" Value="{Binding IsInitiallySelected, Mode=OneTime}"/>
|
|
<Setter Property="KeyboardNavigation.AcceptsReturn" Value="True"/>
|
|
</Style>
|
|
<HierarchicalDataTemplate x:Key="CheckBoxItemTemplate" ItemsSource="{Binding Children, Mode=OneTime}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<CheckBox Margin="4" Focusable="False" IsChecked="{Binding IsChecked}" VerticalAlignment="Center"/>
|
|
<ContentPresenter Margin="4,0,200,0" Content="{Binding Name, Mode=OneTime}" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
|
|
</ResourceDictionary> |