Browse Source

TreeViewItem.cs - Renamed Depth to Level.

TreeViewItem.cs - Moved CalculateDistanceFromLogicalParent from LogicalExtensions.
TreeViewItem.xaml - Cleaned up selectors.
PropertyEqualsSelector.cs - Default null to string.Empty.
ContentControl.cs - Added valid & invalid pseudoclasses for ContentProperty.
BaseLight.xaml - Removed unused resources.
CheckBox.xaml - Hide ContentPresenter#PART_ContentPresenter when Content is null.
pull/1831/head
William David Cossey 8 years ago
parent
commit
71d74fe7cd
  1. 2
      src/Avalonia.Controls/ContentControl.cs
  2. 33
      src/Avalonia.Controls/TreeViewItem.cs
  3. 15
      src/Avalonia.Styling/LogicalTree/LogicalExtensions.cs
  4. 6
      src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs
  5. 102
      src/Avalonia.Themes.Default/Accents/BaseLight.xaml
  6. 5
      src/Avalonia.Themes.Default/CheckBox.xaml
  7. 158
      src/Avalonia.Themes.Default/TreeViewItem.xaml

2
src/Avalonia.Controls/ContentControl.cs

@ -45,6 +45,8 @@ namespace Avalonia.Controls
static ContentControl() static ContentControl()
{ {
ContentControlMixin.Attach<ContentControl>(ContentProperty, x => x.LogicalChildren); ContentControlMixin.Attach<ContentControl>(ContentProperty, x => x.LogicalChildren);
PseudoClass(ContentProperty, x => x != null, ":valid");
PseudoClass(ContentProperty, x => x == null, ":invalid");
} }
/// <summary> /// <summary>

33
src/Avalonia.Controls/TreeViewItem.cs

@ -32,24 +32,24 @@ namespace Avalonia.Controls
ListBoxItem.IsSelectedProperty.AddOwner<TreeViewItem>(); ListBoxItem.IsSelectedProperty.AddOwner<TreeViewItem>();
/// <summary> /// <summary>
/// Defines the <see cref="Depth"/> property. /// Defines the <see cref="Level"/> property.
/// </summary> /// </summary>
public static readonly DirectProperty<TreeViewItem, int> DepthProperty = public static readonly DirectProperty<TreeViewItem, int> LevelProperty =
AvaloniaProperty.RegisterDirect<TreeViewItem, int>( AvaloniaProperty.RegisterDirect<TreeViewItem, int>(
nameof(Depth), o => o.Depth); nameof(Level), o => o.Level);
private static readonly ITemplate<IPanel> DefaultPanel = private static readonly ITemplate<IPanel> DefaultPanel =
new FuncTemplate<IPanel>(() => new StackPanel()); new FuncTemplate<IPanel>(() => new StackPanel());
private TreeView _treeView; private TreeView _treeView;
private bool _isExpanded; private bool _isExpanded;
private int _depth; private int _level;
/// <summary> /// <summary>
/// Initializes static members of the <see cref="TreeViewItem"/> class. /// Initializes static members of the <see cref="TreeViewItem"/> class.
/// </summary> /// </summary>
static TreeViewItem() static TreeViewItem()
{ {
SelectableMixin.Attach<TreeViewItem>(IsSelectedProperty); SelectableMixin.Attach<TreeViewItem>(IsSelectedProperty);
FocusableProperty.OverrideDefaultValue<TreeViewItem>(true); FocusableProperty.OverrideDefaultValue<TreeViewItem>(true);
ItemsPanelProperty.OverrideDefaultValue<TreeViewItem>(DefaultPanel); ItemsPanelProperty.OverrideDefaultValue<TreeViewItem>(DefaultPanel);
@ -74,12 +74,12 @@ namespace Avalonia.Controls
} }
/// <summary> /// <summary>
/// Gets or sets the depth of the item. /// Gets the level/indentation of the item.
/// </summary> /// </summary>
public int Depth public int Level
{ {
get { return _depth; } get { return _level; }
private set { SetAndRaise(DepthProperty, ref _depth, value); } private set { SetAndRaise(LevelProperty, ref _level, value); }
} }
/// <summary> /// <summary>
@ -106,7 +106,7 @@ namespace Avalonia.Controls
base.OnAttachedToLogicalTree(e); base.OnAttachedToLogicalTree(e);
_treeView = this.GetLogicalAncestors().OfType<TreeView>().FirstOrDefault(); _treeView = this.GetLogicalAncestors().OfType<TreeView>().FirstOrDefault();
Depth = this.CalculateDistanceFromLogicalParent<TreeView>() - 1; Level = CalculateDistanceFromLogicalParent<TreeView>(this) - 1;
if (ItemTemplate == null && _treeView?.ItemTemplate != null) if (ItemTemplate == null && _treeView?.ItemTemplate != null)
{ {
@ -145,5 +145,18 @@ namespace Avalonia.Controls
// Don't call base.OnKeyDown - let events bubble up to containing TreeView. // Don't call base.OnKeyDown - let events bubble up to containing TreeView.
} }
private static int CalculateDistanceFromLogicalParent<T>(ILogical logical, int @default = -1) where T : class
{
var result = 0;
while (logical != null && logical.GetType() != typeof(T))
{
++result;
logical = logical.LogicalParent;
}
return logical != null ? result : @default;
}
} }
} }

15
src/Avalonia.Styling/LogicalTree/LogicalExtensions.cs

@ -87,20 +87,5 @@ namespace Avalonia.LogicalTree
{ {
return target.GetLogicalAncestors().Any(x => x == logical); return target.GetLogicalAncestors().Any(x => x == logical);
} }
public static int CalculateDistanceFromLogicalParent<T>(this ILogical logical, int @default = -1) where T : class
{
Contract.Requires<ArgumentNullException>(logical != null);
var result = 0;
while (logical != null && logical.GetType() != typeof(T))
{
++result;
logical = logical.LogicalParent;
}
return logical != null ? result : @default;
}
} }
} }

6
src/Avalonia.Styling/Styling/PropertyEqualsSelector.cs

@ -60,7 +60,7 @@ namespace Avalonia.Styling
builder.Append(_property.Name); builder.Append(_property.Name);
builder.Append('='); builder.Append('=');
builder.Append(_value); builder.Append(_value ?? string.Empty);
builder.Append(']'); builder.Append(']');
_selectorString = builder.ToString(); _selectorString = builder.ToString();
@ -78,11 +78,11 @@ namespace Avalonia.Styling
} }
else if (subscribe) else if (subscribe)
{ {
return new SelectorMatch(control.GetObservable(_property).Select(v => Equals(v, _value))); return new SelectorMatch(control.GetObservable(_property).Select(v => Equals(v ?? string.Empty, _value)));
} }
else else
{ {
return new SelectorMatch(control.GetValue(_property).Equals(_value)); return new SelectorMatch((control.GetValue(_property) ?? string.Empty).Equals(_value));
} }
} }

102
src/Avalonia.Themes.Default/Accents/BaseLight.xaml

@ -1,60 +1,56 @@
<Style xmlns="https://github.com/avaloniaui" <Style xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"> xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Style.Resources> <Style.Resources>
<Color x:Key="ThemeAccentColor">#CC119EDA</Color>
<Color x:Key="ThemeAccentColor2">#99119EDA</Color>
<Color x:Key="ThemeAccentColor3">#66119EDA</Color>
<Color x:Key="ThemeAccentColor4">#33119EDA</Color>
<Color x:Key="ThemeBackgroundColor">#FFFFFFFF</Color>
<Color x:Key="ThemeBorderLightColor">#FFAAAAAA</Color>
<Color x:Key="ThemeBorderMidColor">#FF888888</Color>
<Color x:Key="ThemeBorderDarkColor">#FF333333</Color>
<Color x:Key="ThemeControlLightColor">#FFFFFFFF</Color>
<Color x:Key="ThemeControlMidColor">#FFAAAAAA</Color>
<Color x:Key="ThemeControlDarkColor">#FF888888</Color>
<Color x:Key="ThemeControlHighlightLowColor">#FFF0F0F0</Color>
<Color x:Key="ThemeControlHighlightMidColor">#FFD0D0D0</Color>
<Color x:Key="ThemeControlHighlightDarkColor">#FF808080</Color>
<Color x:Key="ThemeForegroundColor">#FF000000</Color>
<Color x:Key="ThemeForegroundLightColor">#FF808080</Color>
<Color x:Key="HighlightColor">#FF086F9E</Color>
<Color x:Key="ErrorColor">#FFFF0000</Color>
<Color x:Key="ErrorLightColor">#10FF0000</Color>
<Color x:Key="InvisibleSelectionColor">#01000000</Color> <Color x:Key="ThemeAccentColor">#CC119EDA</Color>
<Color x:Key="ThemeAccentColor2">#99119EDA</Color>
<Color x:Key="ThemeAccentColor3">#66119EDA</Color>
<Color x:Key="ThemeAccentColor4">#33119EDA</Color>
<SolidColorBrush x:Key="ThemeBackgroundBrush" Color="{DynamicResource ThemeBackgroundColor}"></SolidColorBrush> <Color x:Key="ThemeBackgroundColor">#FFFFFFFF</Color>
<SolidColorBrush x:Key="ThemeBorderLightBrush" Color="{DynamicResource ThemeBorderLightColor}"></SolidColorBrush> <Color x:Key="ThemeBorderLightColor">#FFAAAAAA</Color>
<SolidColorBrush x:Key="ThemeBorderMidBrush" Color="{DynamicResource ThemeBorderMidColor}"></SolidColorBrush> <Color x:Key="ThemeBorderMidColor">#FF888888</Color>
<SolidColorBrush x:Key="ThemeBorderDarkBrush" Color="{DynamicResource ThemeBorderDarkColor}"></SolidColorBrush> <Color x:Key="ThemeBorderDarkColor">#FF333333</Color>
<SolidColorBrush x:Key="ThemeControlLightBrush" Color="{DynamicResource ThemeControlLightColor}"></SolidColorBrush> <Color x:Key="ThemeControlLightColor">#FFFFFFFF</Color>
<SolidColorBrush x:Key="ThemeControlMidBrush" Color="{DynamicResource ThemeControlMidColor}"></SolidColorBrush> <Color x:Key="ThemeControlMidColor">#FFAAAAAA</Color>
<SolidColorBrush x:Key="ThemeControlDarkBrush" Color="{DynamicResource ThemeControlDarkColor}"></SolidColorBrush> <Color x:Key="ThemeControlDarkColor">#FF888888</Color>
<SolidColorBrush x:Key="ThemeControlHighlightLowBrush" Color="{DynamicResource ThemeControlHighlightLowColor}"></SolidColorBrush> <Color x:Key="ThemeControlHighlightLowColor">#FFF0F0F0</Color>
<SolidColorBrush x:Key="ThemeControlHighlightMidBrush" Color="{DynamicResource ThemeControlHighlightMidColor}"></SolidColorBrush> <Color x:Key="ThemeControlHighlightMidColor">#FFD0D0D0</Color>
<SolidColorBrush x:Key="ThemeControlHighlightDarkBrush" Color="{DynamicResource ThemeControlHighlightDarkColor}"></SolidColorBrush> <Color x:Key="ThemeControlHighlightDarkColor">#FF808080</Color>
<SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource ThemeForegroundColor}"></SolidColorBrush> <Color x:Key="ThemeForegroundColor">#FF000000</Color>
<SolidColorBrush x:Key="ThemeForegroundLightBrush" Color="{DynamicResource ThemeForegroundLightColor}"></SolidColorBrush> <Color x:Key="ThemeForegroundLightColor">#FF808080</Color>
<SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource HighlightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush" Color="{DynamicResource ThemeAccentColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush2" Color="{DynamicResource ThemeAccentColor2}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush3" Color="{DynamicResource ThemeAccentColor3}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush4" Color="{DynamicResource ThemeAccentColor4}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorBrush" Color="{DynamicResource ErrorColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorLightBrush" Color="{DynamicResource ErrorLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="InvisibleSelectionBrush" Color="{DynamicResource InvisibleSelectionColor}"></SolidColorBrush>
<Thickness x:Key="ThemeBorderThickness">2</Thickness>
<sys:Double x:Key="ThemeDisabledOpacity">0.5</sys:Double>
<sys:Double x:Key="FontSizeSmall">10</sys:Double> <Color x:Key="HighlightColor">#FF086F9E</Color>
<sys:Double x:Key="FontSizeNormal">12</sys:Double> <Color x:Key="ErrorColor">#FFFF0000</Color>
<sys:Double x:Key="FontSizeLarge">16</sys:Double> <Color x:Key="ErrorLightColor">#10FF0000</Color>
</Style.Resources>
<SolidColorBrush x:Key="ThemeBackgroundBrush" Color="{DynamicResource ThemeBackgroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderLightBrush" Color="{DynamicResource ThemeBorderLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderMidBrush" Color="{DynamicResource ThemeBorderMidColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeBorderDarkBrush" Color="{DynamicResource ThemeBorderDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlLightBrush" Color="{DynamicResource ThemeControlLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlMidBrush" Color="{DynamicResource ThemeControlMidColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlDarkBrush" Color="{DynamicResource ThemeControlDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightLowBrush" Color="{DynamicResource ThemeControlHighlightLowColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightMidBrush" Color="{DynamicResource ThemeControlHighlightMidColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeControlHighlightDarkBrush" Color="{DynamicResource ThemeControlHighlightDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource ThemeForegroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeForegroundLightBrush" Color="{DynamicResource ThemeForegroundLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource HighlightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush" Color="{DynamicResource ThemeAccentColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush2" Color="{DynamicResource ThemeAccentColor2}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush3" Color="{DynamicResource ThemeAccentColor3}"></SolidColorBrush>
<SolidColorBrush x:Key="ThemeAccentBrush4" Color="{DynamicResource ThemeAccentColor4}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorBrush" Color="{DynamicResource ErrorColor}"></SolidColorBrush>
<SolidColorBrush x:Key="ErrorLightBrush" Color="{DynamicResource ErrorLightColor}"></SolidColorBrush>
<Thickness x:Key="ThemeBorderThickness">2</Thickness>
<sys:Double x:Key="ThemeDisabledOpacity">0.5</sys:Double>
<sys:Double x:Key="FontSizeSmall">10</sys:Double>
<sys:Double x:Key="FontSizeNormal">12</sys:Double>
<sys:Double x:Key="FontSizeLarge">16</sys:Double>
</Style.Resources>
</Style> </Style>

5
src/Avalonia.Themes.Default/CheckBox.xaml

@ -40,6 +40,9 @@
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</Style> </Style>
<Style Selector="CheckBox:invalid /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="IsVisible" Value="False"/>
</Style>
<Style Selector="CheckBox:pointerover /template/ Border#border"> <Style Selector="CheckBox:pointerover /template/ Border#border">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/> <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/>
</Style> </Style>
@ -58,4 +61,4 @@
<Style Selector="CheckBox:disabled /template/ Border#border"> <Style Selector="CheckBox:disabled /template/ Border#border">
<Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}"/> <Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}"/>
</Style> </Style>
</Styles> </Styles>

158
src/Avalonia.Themes.Default/TreeViewItem.xaml

@ -1,92 +1,92 @@
<Styles xmlns="https://github.com/avaloniaui" <Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls"> xmlns:converters="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls">
<Style Selector="TreeViewItem"> <Style Selector="TreeViewItem">
<Style.Resources> <Style.Resources>
<converters:MarginMultiplierConverter Indent="16" Left="True" x:Key="LeftMarginConverter" /> <converters:MarginMultiplierConverter Indent="16" Left="True" x:Key="LeftMarginConverter" />
</Style.Resources> </Style.Resources>
<Setter Property="Padding" Value="2"/> <Setter Property="Padding" Value="2"/>
<Setter Property="Background" Value="{DynamicResource InvisibleSelectionBrush}"/> <Setter Property="Background" Value="Transparent"/>
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<StackPanel> <StackPanel>
<Border Name="SelectionBorder" <Border Name="SelectionBorder"
Focusable="True" Focusable="True"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
TemplatedControl.IsTemplateFocusTarget="True"> TemplatedControl.IsTemplateFocusTarget="True">
<Grid ColumnDefinitions="16, *" <Grid ColumnDefinitions="16, *"
Margin="{TemplateBinding Depth, Mode=OneWay, Converter={StaticResource LeftMarginConverter}}" > Margin="{TemplateBinding Level, Mode=OneWay, Converter={StaticResource LeftMarginConverter}}" >
<ToggleButton Name="expander" <ToggleButton Name="expander"
Focusable="False" Focusable="False"
IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"/> IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}"/>
<ContentPresenter Name="PART_HeaderPresenter" <ContentPresenter Name="PART_HeaderPresenter"
Focusable="False" Focusable="False"
Content="{TemplateBinding Header}" Content="{TemplateBinding Header}"
HorizontalContentAlignment="{TemplateBinding HorizontalAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalAlignment}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Grid.Column="1"/> Grid.Column="1"/>
</Grid> </Grid>
</Border> </Border>
<ItemsPresenter Name="PART_ItemsPresenter" <ItemsPresenter Name="PART_ItemsPresenter"
IsVisible="{TemplateBinding IsExpanded}" IsVisible="{TemplateBinding IsExpanded}"
Items="{TemplateBinding Items}" Items="{TemplateBinding Items}"
ItemsPanel="{TemplateBinding ItemsPanel}" ItemsPanel="{TemplateBinding ItemsPanel}"
MemberSelector="{TemplateBinding MemberSelector}"/> MemberSelector="{TemplateBinding MemberSelector}"/>
</StackPanel> </StackPanel>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</Style> </Style>
<Style Selector="TreeViewItem /template/ ToggleButton#expander"> <Style Selector="TreeViewItem /template/ ToggleButton#expander">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border Background="Transparent" <Border Background="Transparent"
Width="14" Width="14"
Height="12" Height="12"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Path Fill="{DynamicResource ThemeForegroundBrush}" <Path Fill="{DynamicResource ThemeForegroundBrush}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="M 0 2 L 4 6 L 0 10 Z"/> Data="M 0 2 L 4 6 L 0 10 Z"/>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
</Style> </Style>
<Style Selector="TreeViewItem /template/ ContentPresenter#PART_HeaderPresenter"> <Style Selector="TreeViewItem /template/ ContentPresenter#PART_HeaderPresenter">
<Setter Property="Padding" Value="2"/> <Setter Property="Padding" Value="2"/>
</Style> </Style>
<Style Selector="TreeViewItem[IsSelected=false] /template/ Border#SelectionBorder[IsPointerOver=true]"> <Style Selector="TreeViewItem /template/ Border#SelectionBorder:pointerover">
<Setter Property="Background" Value="{DynamicResource ThemeControlHighlightMidBrush}"/> <Setter Property="Background" Value="{DynamicResource ThemeControlHighlightMidBrush}"/>
</Style> </Style>
<Style Selector="TreeViewItem[IsSelected=true] /template/ Border#SelectionBorder"> <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush4}"/> <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush4}"/>
</Style> </Style>
<Style Selector="TreeViewItem[IsSelected=true] /template/ Border#SelectionBorder[IsPointerOver=false][IsFocused=true]"> <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder:focus">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush3}"/> <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush3}"/>
</Style> </Style>
<Style Selector="TreeViewItem[IsSelected=true] /template/ Border#SelectionBorder[IsPointerOver=true][IsFocused=false]"> <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder:pointerover">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush3}"/> <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush3}"/>
</Style> </Style>
<Style Selector="TreeViewItem[IsSelected=true] /template/ Border#SelectionBorder[IsPointerOver=true][IsFocused=true]"> <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder:pointerover:focus">
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}"/> <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush2}"/>
</Style> </Style>
<Style Selector="TreeViewItem /template/ ToggleButton#expander:checked"> <Style Selector="TreeViewItem /template/ ToggleButton#expander:checked">
<Setter Property="RenderTransform"> <Setter Property="RenderTransform">
<RotateTransform Angle="45"/> <RotateTransform Angle="45"/>
</Setter> </Setter>
</Style> </Style>
<Style Selector="TreeViewItem:empty /template/ ToggleButton#expander"> <Style Selector="TreeViewItem:empty /template/ ToggleButton#expander">
<Setter Property="IsVisible" Value="False"/> <Setter Property="IsVisible" Value="False"/>
</Style> </Style>
</Styles> </Styles>

Loading…
Cancel
Save