Skip to content

Minimal ListViewItemPresenter Support #19707

Description

@kazo0

What would you like to be added

As a first step to supporting ListViewItemPresenter, we can start with having a sort of facade implementation of the Presenter.

Underneath this initial implementation, we will be using the template from the ListiewItemExpanded Style here.

This will be beneficial for people relying on styles for ListViewItem that are defaulting to the ListViewItemPresenter version. Such as existing control libraries that may be already set to use the ListViewItemPresenter in their custom styles

As a first step, we will not be implementing that actual performance benefits of ListViewItemPresenter where elements of the template are conditionally loaded depending on the usage/properties that are configured on the ListViewItem/ListViewItemPresenter itself. e.g. CheckMode, Drag/Drop, etc.

This will simply be allowing the use of the ListViewItemPresenter type and forwarding the visual properties to the underlying ListViewItemExpanded template. e.g. CheckBoxBrush, CheckBrush, SelectedBackground, SelectedForeground, SelectedPointerOverBackground, etc.

Below is a matrix of the ListViewItemPresenter properties and how they will be mapped to the ListViewItemExpanded template elements:

ListViewItemPresenter Property ListViewItemExpanded Mapping Notes
ListViewItemPresenterVerticalContentAlignment ListViewItem_themeresources.xaml#L653 ListViewItemPresenterVerticalContentAlignment may be altered or unavailable for releases after Windows 10. Instead, use ContentPresenter.VerticalContentAlignment.
ListViewItemPresenterPadding ListViewItem_themeresources.xaml#L653 ListViewItemPresenterPadding may be altered or unavailable for releases after Windows 10. Instead, use ContentPresenter.Padding.
ListViewItemPresenterHorizontalContentAlignment ListViewItem_themeresources.xaml#L653 ListViewItemPresenterHorizontalContentAlignment may be altered or unavailable for releases after Windows 10. Instead, use ContentPresenter.HorizontalContentAlignment.
FocusSecondaryBorderBrush
FocusBorderBrush
DragOpacity -Dragging VS ListViewItem_themeresources.xaml#L523 -MultipleDraggingPrimary VS ListViewItem_themeresources.xaml#L554 -MultipleReorderingPrimary VS ListViewItem_themeresources.xaml#L617 Via ThemeResource ListViewItemDragThemeOpacity
RevealBackground Not Implemented in the Expanded Style
DragBackground ListViewItem_themeresources.xaml#L517 We can use the BorderBackground (Rectangle) Fill property in the VisualState
DisabledOpacity ListViewItem_themeresources.xaml#L402 Via ThemeResrouce ListViewItemDisabledThemeOpacity
ContentMargin ListViewItem_themeresources.xaml#L659 and ListViewItem_themeresources.xaml#L669 Via TemplateBinding Padding
CheckSelectingBrush (?) ListViewItem_themeresources.xaml#L333
CheckPressedBrush ListViewItem_themeresources.xaml#L307
CheckMode Always Inline
CheckHintBrush Will not be implemented This property is ignored for a Windows 10 app.
CheckBoxBorderBrush ListViewItem_themeresources.xaml#L674 No property for CheckBoxBorderBrush on: -Selected ListViewItem_themeresources.xaml#L330 -PointerOverSelected ListViewItem_themeresources.xaml#L356 -PressedSelected ListViewItem_themeresources.xaml#L382
CheckBrush ListViewItem_themeresources.xaml#L696 No property for CheckBrush on: -PointerOver ListViewItem_themeresources.xaml#L285 -PressedSelected ListViewItem_themeresources.xaml#L385
CheckBoxSelectedPressedBrush ListViewItem_themeresources.xaml#L365 We would need to use the Background property to the Border and change it in the Visual State
CheckBoxSelectedPointerOverBrush ListViewItem_themeresources.xaml#L339 We would need to use the Background property to the Border and change it in the Visual State
CheckBoxSelectedDisabledBrush There is no "SelectedDisabled" Visual State
CheckBoxSelectedBrush ListViewItem_themeresources.xaml#L313 We would need to use the Background property to the Border and change it in the Visual State
CheckBoxPressedBrush ListViewItem_themeresources.xaml#L291 We would need to use the Background property to the Border and change it in the Visual State
SelectionCheckMarkVisualEnabled Could be used to set if the CheckBox will be visible or not ListViewItem_themeresources.xaml#L673 "Gets or sets a value that indicates whether the check mark is shown when the item is selected."
CheckBoxPointerOverBrush ListViewItem_themeresources.xaml#L269 We would need to use the Background property to the Border and change it in the Visual State
CheckBoxPointerOverBorderBrush ListViewItem_themeresources.xaml#L282
CheckBoxDisabledBrush ListViewItem_themeresources.xaml#L396 We would need to use the Background property to the Border and change it in the Visual State
CheckBoxDisabledBorderBrush ListViewItem_themeresources.xaml#L396 We would need to use the BorderBrush property to the Border and change it in the Visual State
CheckBoxCornerRadius ListViewItem_themeresources.xaml#L673 We would need to add the Background property to the Border
CheckBoxBrush ListViewItem_themeresources.xaml#L673 We would need to add the CornerRadius property to the Border
CheckDisabledBrush ListViewItem_themeresources.xaml#L396 We would need to use the Foreground property to the FontIcon and change it in the Visual State
PlaceholderBackground ListViewItem_themeresources.xaml#L672 Via ThemeResource ListViewItemPlaceholderBackground
SelectedDisabledBorderBrush There isn't a SelectedDisabled VisualState We could consider changing the BorderBackground Rectangle to a Border so that we can set the BorderBrush
SelectionIndicatorPressedBrush Not Implemented in the Expanded Style
SelectionIndicatorPointerOverBrush Not Implemented in the Expanded Style
SelectionIndicatorMode Not Implemented in the Expanded Style
SelectionIndicatorDisabledBrush Not Implemented in the Expanded Style
SelectionIndicatorCornerRadius Not Implemented in the Expanded Style
SelectionIndicatorBrush Not Implemented in the Expanded Style the lil orange indicator Image
CheckBoxPressedBorderBrush ListViewItem_themeresources.xaml#L304
SelectedPressedBorderBrush ListViewItem_themeresources.xaml#L376 We could consider changing the BorderBackground Rectangle to a Border so that we can set the BorderBrush
SelectedPressedBackground ListViewItem_themeresources.xaml#L377 Via ThemeResource ListViewItemBackgroundSelectedPressed
SelectedPointerOverBorderBrush ListViewItem_themeresources.xaml#L350 We could consider changing the BorderBackground Rectangle to a Border so that we can set the BorderBrush
SelectedPointerOverBackground ListViewItem_themeresources.xaml#L351 Via ThemeResource ListViewItemBackgroundSelectedPointerOver
SelectedInnerBorderBrush
SelectedForeground ListViewItem_themeresources.xaml#L327-L335 Via ThemeResource ListViewItemForegroundSelected
SelectionIndicatorVisualEnabled Not Implemented in the Expanded Style
SelectedDisabledBackground There isn't a "SelectedDisabled" VisualState
SelectedBorderThickness ListViewItem_themeresources.xaml#L324 We could consider changing the BorderBackground Rectangle to a Border so that we can set the BorderThickness
SelectedBorderBrush ListViewItem_themeresources.xaml#L324 We could consider changing the BorderBackground Rectangle to a Border so that we can set the BorderBrush
SelectedBackground ListViewItem_themeresources.xaml#L325 Via ThemeResource ListViewItemBackgroundSelected
RevealBorderThickness Not Implemented in the Expanded Style
RevealBorderBrush Not Implemented in the Expanded Style
RevealBackgroundShowsAboveContent Not Implemented in the Expanded Style
DragForeground If we decide to implement we can set it on ListViewItem_themeresources.xaml#L517 Evaluate if possible
ReorderHintOffset ListViewItem_themeresources.xaml#L480-L506 Via ThemeResource ListViewItemReorderHintThemeOffset
PressedBackground ListViewItem_themeresources.xaml#L299 Via ThemeResource ListViewItemBackgroundPressed
PointerOverForeground ListViewItem_themeresources.xaml#L279-L287 Via ThemeResource ListViewItemForegroundPointerOver
PointerOverBorderBrush ListViewItem_themeresources.xaml#L276 We could consider changing the BorderBackground Rectangle to a Border so that we can set the BorderBrush
PointerOverBackgroundMargin Will not be implemented This property is ignored for a Windows 10 app.
PointerOverBackground ListViewItem_themeresources.xaml#L276-L278 Via ThemeResource ListViewItemBackgroundPointerOver

Questions

  1. Should we be moving the default ListViewItem style back to use this lightly implemented version of the ListViewItemPresenter?
  2. Should we maybe drive this behind some sort of feature flag? Both the use of this minimal implementation and perhaps the switch to use the ListViewItemPresenter as the default ListViewItem style?

Activity

  1. added
    difficulty/tbd
    kind/enhancement
    triage/untriaged
    project/items 🧾
    and removed
    triage/untriaged
    on Mar 19, 2025
  2. added theissue type on Mar 19, 2025
  3. github-actions commented on May 11, 2026

    @github-actions
    Contributor

    This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.

  4. added
    stale
    on May 11, 2026
  5. removed
    stale
    on May 11, 2026
  6. self-assigned this
    on Oct 6, 2026
  7. added a commit that references this issue on Oct 13, 2026
    d92045f
  8. 20 remaining items

  9. added 14 commits that reference this issue on Nov 17, 2026
    6d130cf
    7f7a678
    ff3b928
    e0be7b0
    7ab2b0a
    d09d5cc
    2f53fbc
    c3c50ef
    eb842b2
    f242576
    0a940f7
    cfc61ff
    4c1943c
    c8d9ef7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

difficulty/tbdkind/enhancementproject/items 🧾

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions