Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
3,013 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
<ControlTemplate TargetType="GridViewItem">
<ListViewItemPresenter
x:Name="Root" CheckBrush="{ThemeResource GridViewItemCheckBrush}"
ContentMargin="{TemplateBinding Padding}"
CheckBoxBrush="Transparent"
ContentTransitions="{TemplateBinding ContentTransitions}"
CheckMode="Inline"
DragOpacity="{ThemeResource ListViewItemDragThemeOpacity}"
DisabledOpacity="{ThemeResource ListViewItemDisabledThemeOpacity}"
DragBackground="{ThemeResource GridViewItemDragBackground}"
DragForeground="{ThemeResource GridViewItemDragForeground}"
FocusBorderBrush="{ThemeResource GridViewItemFocusBorderBrush}"
FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
FocusSecondaryBorderBrush="{ThemeResource GridViewItemFocusSecondaryBorderBrush}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Control.IsTemplateFocusTarget="True"
PressedBackground="{ThemeResource GridViewItemBackgroundPressed}"
PlaceholderBackground="{ThemeResource GridViewItemPlaceholderBackground}"
PointerOverForeground="{ThemeResource GridViewItemForegroundPointerOver}"
PointerOverBackground="{ThemeResource GridViewItemBackgroundPointerOver}"
RevealBorderThickness="{ThemeResource GridViewItemRevealBorderThemeThickness}"
ReorderHintOffset="{ThemeResource GridViewItemReorderHintThemeOffset}"
RevealBorderBrush="{ThemeResource GridViewItemRevealBorderBrush}"
RevealBackground="{ThemeResource GridViewItemRevealBackground}"
SelectedForeground="{ThemeResource GridViewItemForegroundSelected}"
SelectionCheckMarkVisualEnabled="False"
SelectedBackground="{ThemeResource GridViewItemBackgroundSelected}"
SelectedPressedBackground="{ThemeResource GridViewItemBackgroundSelectedPressed}"
SelectedPointerOverBackground="{ThemeResource GridViewItemBackgroundSelectedPointerOver}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
...
/>
I can set CheckBoxBrush to transparent, but that is only for default state. When I hover over gridview item, the checkbox reappears. How can I make sure it does not appear on pointerover and selection?
Answer my own question here. No need to edit the control template. Just need to set:
SelectionMode="Multiple" IsMultiSelectCheckBoxEnabled="False" >