Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Xwt.WPF/Xwt.WPFBackend/TreeView.xaml')
-rw-r--r--Xwt.WPF/Xwt.WPFBackend/TreeView.xaml66
1 files changed, 35 insertions, 31 deletions
diff --git a/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml b/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml
index 84053ccc..72f823db 100644
--- a/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml
+++ b/Xwt.WPF/Xwt.WPFBackend/TreeView.xaml
@@ -1,4 +1,4 @@
-<ResourceDictionary
+<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:Xwt.WPFBackend;assembly=Xwt.WPF">
@@ -9,17 +9,17 @@
<Setter.Value>
<ControlTemplate TargetType="l:ExTreeViewItem">
<StackPanel>
- <Border Name="HBorder" Background="{TemplateBinding Background}" BorderBrush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" BorderThickness="1" Padding="{TemplateBinding Padding}">
+ <Border Name="HBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<GridViewRowPresenter x:Name="PART_Header" Content="{TemplateBinding Header}" Columns="{Binding Path=View.Columns, RelativeSource={RelativeSource AncestorType={x:Type l:ExTreeView}}}" />
</Border>
<ItemsPresenter x:Name="ItemsHost" />
</StackPanel>
-
+
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="False">
<Setter TargetName="ItemsHost" Property="Visibility" Value="Collapsed" />
</Trigger>
-
+
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="HasHeader" Value="False" />
@@ -27,7 +27,7 @@
</MultiTrigger.Conditions>
<Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
</MultiTrigger>
-
+
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="HasHeader" Value="False" />
@@ -35,36 +35,40 @@
</MultiTrigger.Conditions>
<Setter Property="MinHeight" Value="19" />
</MultiTrigger>
-
- <Trigger Property="IsSelected" Value="True">
- <Setter TargetName="HBorder" Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
- </Trigger>
-
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="True" />
- <Condition Property="IsSelectionActive" Value="False" />
- </MultiTrigger.Conditions>
- <Setter TargetName="HBorder" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter TargetName="HBorder" Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- </MultiTrigger>
-
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsSelected" Value="False" />
- <Condition Property="IsFocused" Value="False" />
- </MultiTrigger.Conditions>
- <Setter TargetName="HBorder" Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" />
- </MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
+
+ <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Style.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" />
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}" />
+ </Trigger>
+
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsSelected" Value="True" />
+ <Condition Property="IsSelectionActive" Value="False" />
+ </MultiTrigger.Conditions>
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
+ </MultiTrigger>
+
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
+ </Trigger>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsSelected" Value="False" />
+ <Condition Property="IsFocused" Value="False" />
+ </MultiTrigger.Conditions>
+ <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Self}, Path=Background}" />
+ </MultiTrigger>
+ </Style.Triggers>
</Style>
<Style TargetType="{x:Type l:ExTreeView}">