feat(style): add TreeView small style
This commit is contained in:
1 parent
ab11cb6456
commit
004cb69877
6 files changed
+53
-16
No files matched your search
@@ -36,13 +36,14 @@
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Padding" Value="10,0"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="MinHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TreeViewItem">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="{StaticResource DefaultControlHeight}"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition MinHeight="{TemplateBinding MinHeight}"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border x:Name="Bd" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<DockPanel LastChildFill="True" Margin="{Binding Converter={StaticResource TreeViewItemMarginConverter}, RelativeSource={RelativeSource TemplatedParent}}">
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style BasedOn="{StaticResource TreeViewItemBaseStyle}" TargetType="TreeViewItem"/>
|
||||
|
||||
<Style BasedOn="{StaticResource TreeViewBaseStyle}" TargetType="TreeView"/>
|
||||
|
||||
<Style x:Key="TreeViewItemBaseStyle.Small" BasedOn="{StaticResource TreeViewItemBaseStyle}" TargetType="TreeViewItem">
|
||||
<Setter Property="Padding" Value="6,0"/>
|
||||
<Setter Property="MinHeight" Value="24"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="TreeView.Small" BasedOn="{StaticResource TreeViewBaseStyle}" TargetType="TreeView">
|
||||
<Setter Property="ItemContainerStyle" Value="{StaticResource TreeViewItemBaseStyle.Small}"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in new issue
Block a user