共用方式為


SecondaryTile.BackgroundColor 屬性

定義

注意

在Windows 8.1之後,背景色彩可能會變更或無法使用。 請改用 SecondaryTileVisualElements.BackgroundColor

取得或設定磚的背景色彩。

public:
 property Color BackgroundColor { Color get(); void set(Color value); };
/// [get: Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [set: Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
Color BackgroundColor();

void BackgroundColor(Color value);
/// [get: Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
Color BackgroundColor();

void BackgroundColor(Color value);
public Color BackgroundColor { [Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; [Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] set; }
public Color BackgroundColor { [Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("BackgroundColor may be altered or unavailable for releases after Windows 8.1. Instead, use VisualElements.BackgroundColor.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] set; }
var color = secondaryTile.backgroundColor;
secondaryTile.backgroundColor = color;
Public Property BackgroundColor As Color

屬性值

背景色彩。

屬性

範例

下列幾行顯示透過此屬性工作表示色彩的不同方式。

secondaryTile.BackgroundColor = Windows.UI.Color.Magenta;
secondaryTile.BackgroundColor = Windows.UI.Color.FromArgb(255, 255, 255, 255);
secondaryTile.BackgroundColor(Windows::UI::Colors::Magenta());
secondaryTile.BackgroundColor(Windows::UI::ColorHelper::FromArgb(0, 255, 255, 120));
secondaryTile->BackgroundColor = Windows::UI::Colors::Magenta;
secondaryTile->BackgroundColor = Windows::UI::ColorHelper::FromArgb(0, 255, 255, 120);

備註

如果未設定此屬性,其值會繼承自父應用程式磚的背景色彩。

適用於