Generic.xaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <ResourceDictionary
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:UI="clr-namespace:SHJX.Service.Library.ImitationUniform.elemetation">
  5. <Style x:Key="ItemContainerStyle" TargetType="{x:Type UI:ListViewImitationUniform}">
  6. <Setter Property="Template">
  7. <Setter.Value>
  8. <ControlTemplate TargetType="{x:Type UI:ListViewImitationUniform}">
  9. <Border
  10. x:Name="Bd"
  11. Background="{TemplateBinding Background}"
  12. BorderBrush="{TemplateBinding BorderBrush}"
  13. BorderThickness="0">
  14. <ContentPresenter />
  15. </Border>
  16. <ControlTemplate.Triggers>
  17. <Trigger Property="IsSelected" Value="true">
  18. <Setter TargetName="Bd" Property="Background" Value="Transparent" />
  19. </Trigger>
  20. </ControlTemplate.Triggers>
  21. </ControlTemplate>
  22. </Setter.Value>
  23. </Setter>
  24. <Setter Property="ItemContainerStyle" Value="{StaticResource ItemContainerStyle}" />
  25. <Setter Property="Background" Value="Transparent" />
  26. <Setter Property="ItemTemplate">
  27. <Setter.Value>
  28. <ControlTemplate TargetType="{x:Type UI:ListViewImitationUniform}">
  29. <UniformGrid Columns="{TemplateBinding ItemColumns}" Rows="{TemplateBinding ItemRows}" />
  30. </ControlTemplate>
  31. </Setter.Value>
  32. </Setter>
  33. </Style>
  34. </ResourceDictionary>