|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
2 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf"> |
3 | 4 |
|
4 | 5 | <ResourceDictionary.MergedDictionaries>
|
5 | 6 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Shadows.xaml" />
|
|
95 | 96 | <Setter Property="Template">
|
96 | 97 | <Setter.Value>
|
97 | 98 | <ControlTemplate TargetType="{x:Type ListBoxItem}">
|
98 |
| - <Grid> |
99 |
| - <Border CornerRadius="2" |
100 |
| - Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" Effect="{StaticResource MaterialDesignShadowDepth2}" /> |
101 |
| - <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> |
102 |
| - <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" |
103 |
| - CornerRadius="2"/> |
104 |
| - </Grid> |
105 |
| - <ControlTemplate.Triggers> |
106 |
| - <MultiTrigger> |
107 |
| - <MultiTrigger.Conditions> |
108 |
| - <Condition Property="IsMouseOver" Value="True"/> |
109 |
| - </MultiTrigger.Conditions> |
110 |
| - <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource PrimaryHueLightBrush}"/> |
111 |
| - </MultiTrigger> |
112 |
| - <MultiTrigger> |
113 |
| - <MultiTrigger.Conditions> |
114 |
| - <Condition Property="Selector.IsSelectionActive" Value="False"/> |
115 |
| - <Condition Property="IsSelected" Value="True"/> |
116 |
| - </MultiTrigger.Conditions> |
117 |
| - <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource PrimaryHueMidBrush}"/> |
118 |
| - </MultiTrigger> |
119 |
| - <MultiTrigger> |
120 |
| - <MultiTrigger.Conditions> |
121 |
| - <Condition Property="Selector.IsSelectionActive" Value="True"/> |
122 |
| - <Condition Property="IsSelected" Value="True"/> |
123 |
| - </MultiTrigger.Conditions> |
124 |
| - <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource PrimaryHueDarkBrush}"/> |
125 |
| - </MultiTrigger> |
126 |
| - <Trigger Property="IsEnabled" Value="False"> |
127 |
| - <Setter Property="TextElement.Foreground" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> |
128 |
| - </Trigger> |
129 |
| - </ControlTemplate.Triggers> |
| 99 | + <wpf:Card Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" |
| 100 | + ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/> |
130 | 101 | </ControlTemplate>
|
131 | 102 | </Setter.Value>
|
132 | 103 | </Setter>
|
|
0 commit comments