VRCMelonAssistant/VRCMelonAssistant/Styles/ListViewItem.xaml

43 lines
2.2 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Style TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="2"
SnapsToDevicePixels="True">
<Border
Name="InnerBorder"
BorderThickness="1"
CornerRadius="1">
<Grid>
<Rectangle
Name="BorderBox"
Fill="Transparent"
Visibility="Collapsed" />
<GridViewRowPresenter
Grid.RowSpan="2"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ModListItemHighlighted}" />
<Setter Property="BorderBrush" Value="{DynamicResource ModListItemHighlightedOutline}" />
</Trigger>
<Trigger Property="ListBoxItem.IsSelected" Value="True">
<Setter Property="Background" Value="{DynamicResource ModListItemSelected}" />
<Setter Property="BorderBrush" Value="{DynamicResource ModListItemSelectedOutline}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>