ListViewItemPresenter.SelectedBackground 屬性

定義

取得或設定筆刷,用來呈現所選取專案的背景。

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

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

屬性值

筆刷,用來呈現所選取專案的背景。

備註

XAML 語法注意事項

顯示的 XAML 使用方式是參考主題資源。 這是簡報者的 Brush 值通常會定義的方式,如此一來,主題變更時就可以變更值,而且可能讓 Brush 值可以由不同的範本共用。 使用直接參考 Brush 值的 XAML 語法可能但較不常見。 如需 Brush的直接 XAML 使用方式範例,請參閱 Brush 類別主題中的 XAML 一節。

如果您要將此屬性設定為自訂 GridViewItemPresenter上的屬性,請在顯示的 XAML 使用方式中取代自訂類別的前置名稱。

適用於

另請參閱