Share via


InfoBar.Severity 屬性

定義

取得或設定 InfoBar 的類型,以套用一致的狀態色彩、圖示和輔助技術設定,視通知的關鍵性而定。

本檔適用于 Windows 應用程式 SDK 中適用于 WinUI 的 WinUI 2 for UWP (,請參閱Windows 應用程式 SDK命名空間) 。

public:
 property InfoBarSeverity Severity { InfoBarSeverity get(); void set(InfoBarSeverity value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")]
InfoBarSeverity Severity();

void Severity(InfoBarSeverity value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")]
InfoBarSeverity Severity();

void Severity(InfoBarSeverity value);
public InfoBarSeverity Severity { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")]
public InfoBarSeverity Severity { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::InfoBarSeverity::Informational")] set; }
Public Property Severity As InfoBarSeverity

屬性值

InfoBar表示通知重要性的 樣式。 預設值為 Informational

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

範例

提示

如需詳細資訊、設計指引和程式碼範例,請參閱 InfoBar

WinUI 3 資源庫WinUI 2 資源庫應用程式包含大部分 WinUI 3 和 WinUI 2 控制項、功能和功能的互動式範例。

如果已安裝,請按一下下列連結加以開啟: WinUI 3 資源庫WinUI 2 資源庫

如果未安裝,您可以從 Microsoft Store 下載 WinUI 3 資源庫WinUI 2 資源庫

您也可以從 GitHub 取得的原始程式碼 (使用 WinUI 3 的主要 分支,以及 WinUI 2) 的 winui2 分支。

適用於

另請參閱