ListViewItemPresenter.PressedBackground 属性

定义

ListView 中,获取或设置用于呈现用户按下未选定项的背景的画笔。 在 GridView 中,设置项的边框而不是背景。

public:
 property Brush ^ PressedBackground { Brush ^ get(); void set(Brush ^ value); };
Brush PressedBackground();

void PressedBackground(Brush value);
public Brush PressedBackground { get; set; }
var brush = listViewItemPresenter.pressedBackground;
listViewItemPresenter.pressedBackground = brush;
Public Property PressedBackground As Brush
<ListViewItemPresenter PressedBackground="themeResourceReference"/>

属性值

用于在按下时呈现未选定项目的背景 (ListView) 或边框的画笔 (GridView) 。

注解

有关 XAML 语法的说明

显示的 XAML 用法用于引用主题资源。 这是通常定义演示者的 Brush 值的方式,以便在主题更改时更改这些值,并且可能使 Brush 值可由不同的模板共享。 使用直接引用 Brush 值的 XAML 语法是可能的,但不太常见。 有关 Brush 的直接 XAML 用法示例,请参阅 Brush 类主题中的 XAML 部分。

如果要在自定义 ListViewItemPresenter 上将此属性设置为属性,请在显示的 XAML 用法中替换自定义类的前缀名称。

适用于

另请参阅