Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 2.21 KB

listviewitempresenter_selectedpressedbackground.md

File metadata and controls

38 lines (26 loc) · 2.21 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.Primitives.ListViewItemPresenter.SelectedPressedBackground
winrt property

Microsoft.UI.Xaml.Controls.Primitives.ListViewItemPresenter.SelectedPressedBackground

-description

In a ListView, gets or sets the brush used to render the background of a selected item while the user is pressing it. In a GridView, the item's border is set rather than the background.

-xaml-syntax

<ListViewItemPresenter SelectedPressedBackground="themeResourceReference"/>

-xaml-values

themeResourceReference
themeResourceReferenceA ThemeResource markup extension reference to an existing keyed resource that defines a Brush-type resource in a XAML resource dictionary. For example, to reference a resource with the key ListViewItemCheckThemeBrush, the string is {ThemeResource ListViewItemCheckThemeBrush}.
## -property-value The brush used to render a selected item's background ([ListView](../microsoft.ui.xaml.controls/listview.md)) or border ([GridView](../microsoft.ui.xaml.controls/gridview.md)) while pressed.

-remarks

Notes on XAML syntax

The XAML usage shown is for referencing a theme resource. This is how Brush values for a presenter are typically defined, so that the values can be changed when the theme changes, and potentially so that Brush values can be shared by different templates. It's possible but less common to use a XAML syntax that refers to a Brush value directly. For examples of direct XAML usages for a Brush, see the XAML section in the Brush class topic.

If you're setting this property as an attribute on a custom ListViewItemPresenter, substitute the prefixed name of your custom class in the XAML usage shown.

-examples

-see-also

XAML theme resources