50 lines
2.4 KiB
XML
50 lines
2.4 KiB
XML
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:hc="clr-namespace:HandyControl.Controls">
|
|
<ControlTheme x:Key="{x:Type ListBoxItem}"
|
|
TargetType="ListBoxItem">
|
|
<Setter Property="Padding"
|
|
Value="10,0" />
|
|
<Setter Property="MinHeight"
|
|
Value="{StaticResource DefaultControlHeight}" />
|
|
<Setter Property="VerticalContentAlignment"
|
|
Value="Center" />
|
|
<Setter Property="Background"
|
|
Value="{DynamicResource RegionBrush}" />
|
|
<Setter Property="BorderBrush"
|
|
Value="Transparent" />
|
|
<Setter Property="CornerRadius"
|
|
Value="{StaticResource DefaultCornerRadius}" />
|
|
<Setter Property="BorderThickness"
|
|
Value="0" />
|
|
<Setter Property="Margin"
|
|
Value="0,0,0,2" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<ContentPresenter Name="PART_ContentPresenter"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
|
</ControlTemplate>
|
|
</Setter>
|
|
|
|
<Style Selector="^:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background"
|
|
Value="{DynamicResource SecondaryRegionBrush}" />
|
|
</Style>
|
|
|
|
<Style Selector="^:selected /template/ ContentPresenter">
|
|
<Setter Property="Background"
|
|
Value="{DynamicResource PrimaryBrush}" />
|
|
<Setter Property="Foreground"
|
|
Value="{DynamicResource TextIconBrush}" />
|
|
</Style>
|
|
</ControlTheme>
|
|
</ResourceDictionary>
|