ListViewItem styles and templates
TOC
Collapse the table of content
Expand the table of content

ListViewItem styles and templates

[ Updated for UWP apps on Windows 10. For Windows 8.x articles, see the archive ]

This topic describes the default style and template for the ListViewItem control. You can modify these resources and the default ControlTemplate to give the control a unique appearance.

Note   These styles and resources are based on the Windows Software Development Kit (SDK) for Windows 10, Version 1511 (Windows SDK version 10.0.10586.0). Styles and resources from other versions of the SDK might have different values. For design purposes, generic.xaml is available in the \(Program Files)\Windows Kits\10\DesignTime\CommonConfiguration\Neutral\UAP\10.0.10586.0\Generic folder from a Windows SDK installation.
 

Visual states

These are the VisualStates defined in the control's default style.

VisualState nameVisualStateGroup name
NormalCommonStates
PointerOverCommonStates
PressedCommonStates
SelectedCommonStates
PointerOverSelectedCommonStates
PressedSelectedCommonStates
EnabledDisabledStates
DisabledDisabledStates
FocusedFocusStates
UnfocusedFocusStates
MultiSelectDisabledMultiSelectStates
MultiSelectEnabledMultiSelectStates
NotDraggingDragStates
DraggingDragStates
DraggingTargetDragStates
MultipleDraggingPrimaryDragStates
MultipleDraggingSecondaryDragStates
DraggedPlaceholderDragStates
NoReorderHintReorderHintStates
BottomReorderHintReorderHintStates
TopReorderHintReorderHintStates
RightReorderHintReorderHintStates
LeftReorderHintReorderHintStates
DataAvailableDataVirtualizationStates
DataPlaceholderDataVirtualizationStates

 

For more info about focus states and how to customize focus visuals, see Control.UseSystemFocusVisuals.

Theme resources

These resources are used in the control's default style. For more info about theme resources and the brushes used in the default style, see XAML theme resources.


<x:Double x:Key="ListViewItemContentOffsetX">-40.5</x:Double>
<x:Double x:Key="ListViewItemDisabledThemeOpacity">0.55</x:Double>
<x:Double x:Key="ListViewItemDragThemeOpacity">0.60</x:Double>
<x:Double x:Key="ListViewItemReorderHintThemeOffset">10.0</x:Double>
<x:Double x:Key="ListViewItemSelectedBorderThemeThickness">4</x:Double>
<x:Double x:Key="ListViewItemMinWidth">88</x:Double>
<x:Double x:Key="ListViewItemMinHeight">44</x:Double>
<Thickness x:Key="ListViewItemCompactSelectedBorderThemeThickness">4</Thickness>

Default style

When the ListView's ItemsPanel is an ItemsStackPanel (the default) or ItemsWrapGrid, this template is used to show the data items. This template uses a ListViewItemPresenter instead of a UIElement tree to improve grid performance.


<!-- Default style for Windows.UI.Xaml.Controls.ListViewItem -->
<Style TargetType="ListViewItem">
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="TabNavigation" Value="Local"/>
<Setter Property="IsHoldingEnabled" Value="True"/>
<Setter Property="Padding" Value="12,0,12,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}"/>
<Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}"/>
<Setter Property="Template">
  <Setter.Value>
    <ControlTemplate TargetType="ListViewItem">
      <ListViewItemPresenter
          ContentTransitions="{TemplateBinding ContentTransitions}"
          SelectionCheckMarkVisualEnabled="True"
          CheckBrush="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
          CheckBoxBrush="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
          DragBackground="{ThemeResource ListViewItemDragBackgroundThemeBrush}"
          DragForeground="{ThemeResource ListViewItemDragForegroundThemeBrush}"
          FocusBorderBrush="{ThemeResource SystemControlForegroundAltHighBrush}"
          FocusSecondaryBorderBrush="{ThemeResource SystemControlForegroundBaseHighBrush}"
          PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}"
          PointerOverBackground="{ThemeResource SystemControlHighlightListLowBrush}"
          PointerOverForeground="{ThemeResource SystemControlHighlightAltBaseHighBrush}"
          SelectedBackground="{ThemeResource SystemControlHighlightListAccentLowBrush}"
          SelectedForeground="{ThemeResource SystemControlHighlightAltBaseHighBrush}"
          SelectedPointerOverBackground="{ThemeResource SystemControlHighlightListAccentMediumBrush}"
          PressedBackground="{ThemeResource SystemControlHighlightListMediumBrush}"
          SelectedPressedBackground="{ThemeResource SystemControlHighlightListAccentHighBrush}"
          DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
          DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
          ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
          ContentMargin="{TemplateBinding Padding}"
          CheckMode="Inline"/>
    </ControlTemplate>
  </Setter.Value>
</Setter>
</Style>


When the ListView's ItemsPanel is not an ItemsStackPanel (the default) or ItemsWrapGrid, this template is used to show the data items. This template uses a UIElement tree and visual states instead of a ListViewItemPresenter.


<!-- Style for Windows.UI.Xaml.Controls.ListViewItem -->
<Style TargetType="ListViewItem" x:Key="ListViewItemExpanded">
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="TabNavigation" Value="Local"/>
<Setter Property="IsHoldingEnabled" Value="True"/>
<Setter Property="Padding" Value="12,0,12,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}"/>
<Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}"/>
<Setter Property="UseSystemFocusVisuals" Value="True" />
<Setter Property="Template">
  <Setter.Value>
    <ControlTemplate TargetType="ListViewItem">
      <Grid x:Name="ContentBorder"
              Background="{TemplateBinding Background}"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}">
        <VisualStateManager.VisualStateGroups>
          <VisualStateGroup x:Name="CommonStates">
            <VisualState x:Name="Normal">
              <Storyboard>
                <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="PointerOver">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="BorderBackground"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1"/>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListLowBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Pressed">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="BorderBackground"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1"/>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListMediumBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <PointerDownThemeAnimation TargetName="ContentPresenter" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Selected">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="MultiSelectCheck"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0:0:0"
                                 To="1"/>
                <DoubleAnimation Storyboard.TargetName="BorderBackground"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1"/>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListAccentLowBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="PointerOverSelected">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="MultiSelectCheck"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0:0:0"
                                 To="1"/>
                <DoubleAnimation Storyboard.TargetName="BorderBackground"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1"/>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListAccentMediumBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="PressedSelected">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="MultiSelectCheck"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0:0:0"
                                 To="1"/>
                <DoubleAnimation Storyboard.TargetName="BorderBackground"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1"/>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground" Storyboard.TargetProperty="Fill">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightListAccentHighBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <PointerDownThemeAnimation TargetName="ContentPresenter" />
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
          <VisualStateGroup x:Name="DisabledStates">
            <VisualState x:Name="Enabled"/>
            <VisualState x:Name="Disabled">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="ContentBorder"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="{ThemeResource ListViewItemDisabledThemeOpacity}"/>
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
          <VisualStateGroup x:Name="MultiSelectStates">
            <VisualState x:Name="MultiSelectDisabled">
              <Storyboard>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectCheckBoxTransform"
                                                Storyboard.TargetProperty="X">
                  <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                  <SplineDoubleKeyFrame KeyTime="0:0:0.333" Value="-32" KeySpline="0.1,0.9,0.2,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectClipTransform"
                                               Storyboard.TargetProperty="X">
                  <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                  <SplineDoubleKeyFrame KeyTime="0:0:0.333" Value="32" KeySpline="0.1,0.9,0.2,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenterTranslateTransform"
                                               Storyboard.TargetProperty="X">
                  <EasingDoubleKeyFrame KeyTime="0:0:0" Value="32"/>
                  <SplineDoubleKeyFrame KeyTime="0:0:0.333" Value="0" KeySpline="0.1,0.9,0.2,1"/>
                </DoubleAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectSquare" Storyboard.TargetProperty="Visibility">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                  <DiscreteObjectKeyFrame KeyTime="0:0:0.333" Value="Collapsed" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
            <VisualState x:Name="MultiSelectEnabled">
              <Storyboard>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectCheckBoxTransform"
                                                Storyboard.TargetProperty="X">
                  <EasingDoubleKeyFrame KeyTime="0:0:0" Value="-32"/>
                  <SplineDoubleKeyFrame KeyTime="0:0:0.333" Value="0" KeySpline="0.1,0.9,0.2,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectClipTransform"
                                               Storyboard.TargetProperty="X">
                  <EasingDoubleKeyFrame KeyTime="0:0:0" Value="32"/>
                  <SplineDoubleKeyFrame KeyTime="0:0:0.333" Value="0" KeySpline="0.1,0.9,0.2,1"/>
                </DoubleAnimationUsingKeyFrames>
                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenterTranslateTransform"
                                               Storyboard.TargetProperty="X">
                  <EasingDoubleKeyFrame KeyTime="0:0:0" Value="-32"/>
                  <SplineDoubleKeyFrame KeyTime="0:0:0.333" Value="0" KeySpline="0.1,0.9,0.2,1"/>
                </DoubleAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectSquare" Storyboard.TargetProperty="Visibility">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="MultiSelectCheck" Storyboard.TargetProperty="Visibility">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenterGrid" Storyboard.TargetProperty="Margin">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="32,0,0,0" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
          <VisualStateGroup x:Name="DataVirtualizationStates">
            <VisualState x:Name="DataAvailable"/>
            <VisualState x:Name="DataPlaceholder">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock" Storyboard.TargetProperty="Visibility">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderRect" Storyboard.TargetProperty="Visibility">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
          <VisualStateGroup x:Name="ReorderHintStates">
            <VisualState x:Name="NoReorderHint"/>
            <VisualState x:Name="BottomReorderHint">
              <Storyboard>
                <DragOverThemeAnimation TargetName="ContentBorder" ToOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" Direction="Bottom" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="TopReorderHint">
              <Storyboard>
                <DragOverThemeAnimation TargetName="ContentBorder" ToOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" Direction="Top" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="RightReorderHint">
              <Storyboard>
                <DragOverThemeAnimation TargetName="ContentBorder" ToOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" Direction="Right" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="LeftReorderHint">
              <Storyboard>
                <DragOverThemeAnimation TargetName="ContentBorder" ToOffset="{ThemeResource ListViewItemReorderHintThemeOffset}" Direction="Left" />
              </Storyboard>
            </VisualState>
            <VisualStateGroup.Transitions>
              <VisualTransition To="NoReorderHint" GeneratedDuration="0:0:0.2"/>
            </VisualStateGroup.Transitions>
          </VisualStateGroup>
          <VisualStateGroup x:Name="DragStates">
            <VisualState x:Name="NotDragging" />
            <VisualState x:Name="Dragging">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="ContentBorder"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="{ThemeResource ListViewItemDragThemeOpacity}" />
                <DragItemThemeAnimation TargetName="ContentBorder" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="DraggingTarget">
              <Storyboard>
                <DropTargetItemThemeAnimation TargetName="ContentBorder" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="MultipleDraggingPrimary">
              <Storyboard>
                <!-- These two Opacity animations are required - the FadeInThemeAnimations
                                         on the same elements animate an internal Opacity. -->
                <DoubleAnimation Storyboard.TargetName="MultiArrangeOverlayBackground"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1" />
                <DoubleAnimation Storyboard.TargetName="MultiArrangeOverlayText"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="1" />
                <DoubleAnimation Storyboard.TargetName="ContentBorder"
                                 Storyboard.TargetProperty="Opacity"
                                 Duration="0"
                                 To="{ThemeResource ListViewItemDragThemeOpacity}" />
                <FadeInThemeAnimation TargetName="MultiArrangeOverlayBackground" />
                <FadeInThemeAnimation TargetName="MultiArrangeOverlayText" />
                <DragItemThemeAnimation TargetName="ContentBorder" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="MultipleDraggingSecondary">
              <Storyboard>
                <FadeOutThemeAnimation TargetName="ContentBorder" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="DraggedPlaceholder">
              <Storyboard>
                <FadeOutThemeAnimation TargetName="ContentBorder" />
              </Storyboard>
            </VisualState>
            <VisualStateGroup.Transitions>
              <VisualTransition To="NotDragging" GeneratedDuration="0:0:0.2"/>
            </VisualStateGroup.Transitions>
          </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Rectangle x:Name="BorderBackground"
                    IsHitTestVisible="False"
                    Fill="{ThemeResource SystemControlHighlightListAccentLowBrush}"
                    Opacity="0"
                    Control.IsTemplateFocusTarget="True"/>
        <Grid x:Name="ContentPresenterGrid"
              Background="Transparent"
              Margin="0,0,0,0">
          <Grid.RenderTransform>
            <TranslateTransform x:Name="ContentPresenterTranslateTransform"/>
          </Grid.RenderTransform>
          <ContentPresenter x:Name="ContentPresenter"
                            ContentTransitions="{TemplateBinding ContentTransitions}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            Content="{TemplateBinding Content}"
                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                            Margin="{TemplateBinding Padding}"/>
        </Grid>
        <!-- The 'Xg' text simulates the amount of space one line of text will occupy.
                          In the DataPlaceholder state, the Content is not loaded yet so we
                          approximate the size of the item using placeholder text. -->
        <TextBlock x:Name="PlaceholderTextBlock"
                    Opacity="0"
                    Text="Xg"
                    Foreground="{x:Null}"
                    Margin="{TemplateBinding Padding}"
                    IsHitTestVisible="False"
                    AutomationProperties.AccessibilityView="Raw"/>
        <Rectangle x:Name="PlaceholderRect"
                    Visibility="Collapsed"
                    Fill="{ThemeResource ListViewItemPlaceholderBackgroundThemeBrush}"/>
        <Rectangle x:Name="MultiArrangeOverlayBackground"
                    IsHitTestVisible="False"
                    Opacity="0"
                    Fill="{ThemeResource ListViewItemDragBackgroundThemeBrush}"
                    Grid.ColumnSpan="2"/>
        <Border x:Name="MultiSelectSquare"
                BorderBrush="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
                BorderThickness="2"
                Width="20"
                Height="20"
                Margin="12,0,0,0"
                VerticalAlignment="Center"
                HorizontalAlignment="Left"
                Visibility="Collapsed" >
          <Border.Clip>
            <RectangleGeometry Rect="0,0,20,20">
              <RectangleGeometry.Transform>
                <TranslateTransform x:Name="MultiSelectClipTransform"/>
              </RectangleGeometry.Transform>
            </RectangleGeometry>
          </Border.Clip>
          <Border.RenderTransform>
            <TranslateTransform x:Name="MultiSelectCheckBoxTransform"/>
          </Border.RenderTransform>
          <FontIcon x:Name="MultiSelectCheck"
                    FontFamily="{ThemeResource SymbolThemeFontFamily}"
                    Glyph="&#xE73E;"
                    FontSize="16"
                    Foreground="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
                    Visibility="Collapsed"
                    Opacity="0"/>
        </Border>
        <TextBlock x:Name="MultiArrangeOverlayText"
                    Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DragItemsCount}"
                    Foreground="{ThemeResource ListViewItemDragForegroundThemeBrush}"
                    FontFamily="{ThemeResource ContentControlThemeFontFamily}"
                    FontSize="26.667"
                    IsHitTestVisible="False"
                    Opacity="0"
                    TextWrapping="Wrap"
                    TextTrimming="WordEllipsis"
                    Margin="18,9,0,0"
                    AutomationProperties.AccessibilityView="Raw"
                    Grid.ColumnSpan="2"/>
      </Grid>
    </ControlTemplate>
  </Setter.Value>
</Setter>
</Style>


Related topics

Styling controls
Control templates

 

 

Show:
© 2018 Microsoft