Advertisement
Guest User

Empty ListView Container Style

a guest
Oct 29th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.90 KB | None | 0 0
  1. <Style TargetType="ListViewItem" x:Key="ListViewItemWithoutPointerVisualStates">
  2.         <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
  3.         <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
  4.         <Setter Property="Background" Value="Transparent"/>
  5.         <Setter Property="Foreground" Value="Transparent" />
  6.         <Setter Property="TabNavigation" Value="Local"/>
  7.         <Setter Property="IsHoldingEnabled" Value="True"/>
  8.         <Setter Property="Padding" Value="0"/>
  9.         <Setter Property="Margin" Value="0"/>
  10.         <Setter Property="HorizontalAlignment" Value="Stretch"/>
  11.         <Setter Property="VerticalAlignment" Value="Stretch"/>
  12.         <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
  13.         <Setter Property="VerticalContentAlignment" Value="Stretch"/>
  14.         <Setter Property="MinWidth" Value="0"/>
  15.         <Setter Property="MinHeight" Value="0"/>
  16.         <Setter Property="UseSystemFocusVisuals" Value="True" />
  17.         <Setter Property="Template">
  18.             <Setter.Value>
  19.                 <ControlTemplate TargetType="ListViewItem">
  20.                     <Grid x:Name="ContentBorder"
  21.                            BorderThickness="0">
  22.                         <VisualStateManager.VisualStateGroups>
  23.                             <VisualStateGroup x:Name="CommonStates">
  24.                                 <VisualState x:Name="Normal"/>
  25.                                 <VisualState x:Name="PointerOver"/>
  26.                                 <VisualState x:Name="Pressed"/>
  27.                                 <VisualState x:Name="Selected"/>
  28.                                 <VisualState x:Name="PointerOverSelected"/>
  29.                                 <VisualState x:Name="PressedSelected"/>
  30.                             </VisualStateGroup>
  31.                             <VisualStateGroup x:Name="DisabledStates">
  32.                                 <VisualState x:Name="Enabled"/>
  33.                                 <VisualState x:Name="Disabled"/>
  34.                             </VisualStateGroup>
  35.                             <VisualStateGroup x:Name="MultiSelectStates">
  36.                                 <VisualState x:Name="MultiSelectDisabled"/>
  37.                                 <VisualState x:Name="MultiSelectEnabled"/>
  38.                             </VisualStateGroup>
  39.                             <VisualStateGroup x:Name="DataVirtualizationStates">
  40.                                 <VisualState x:Name="DataAvailable"/>
  41.                                 <VisualState x:Name="DataPlaceholder"/>
  42.                             </VisualStateGroup>
  43.                             <VisualStateGroup x:Name="ReorderHintStates">
  44.                                 <VisualState x:Name="NoReorderHint"/>
  45.                                 <VisualState x:Name="BottomReorderHint"/>
  46.                                 <VisualState x:Name="TopReorderHint"/>
  47.                                 <VisualState x:Name="RightReorderHint"/>
  48.                                 <VisualState x:Name="LeftReorderHint"/>
  49.                                 <VisualStateGroup.Transitions>
  50.                                     <VisualTransition To="NoReorderHint" GeneratedDuration="0:0:0.2"/>
  51.                                 </VisualStateGroup.Transitions>
  52.                             </VisualStateGroup>
  53.                             <VisualStateGroup x:Name="DragStates">
  54.                                 <VisualState x:Name="NotDragging" />
  55.                                 <VisualState x:Name="Dragging"/>
  56.                                 <VisualState x:Name="DraggingTarget"/>
  57.                                 <VisualState x:Name="MultipleDraggingPrimary"/>
  58.                                 <VisualState x:Name="MultipleDraggingSecondary"/>
  59.                                 <VisualState x:Name="DraggedPlaceholder"/>
  60.                                 <VisualStateGroup.Transitions>
  61.                                     <VisualTransition To="NotDragging" GeneratedDuration="0:0:0.2"/>
  62.                                 </VisualStateGroup.Transitions>
  63.                             </VisualStateGroup>
  64.                         </VisualStateManager.VisualStateGroups>
  65.                         <ContentPresenter x:Name="ContentPresenter"
  66.                                          ContentTransitions="{TemplateBinding ContentTransitions}"
  67.                                          ContentTemplate="{TemplateBinding ContentTemplate}"
  68.                                          Content="{TemplateBinding Content}"
  69.                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  70.                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  71.                                          Margin="{TemplateBinding Padding}"/>
  72.                     </Grid>
  73.                 </ControlTemplate>
  74.             </Setter.Value>
  75.         </Setter>
  76.     </Style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement