Share via


InfoBar.Severity 屬性

定義

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

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; }
var infoBarSeverity = infoBar.severity;
infoBar.severity = infoBarSeverity;
Public Property Severity As InfoBarSeverity

屬性值

InfoBar表示通知重要性的 樣式。 默認值為 Informational

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

範例

提示

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

WinUI 3 資源庫應用程式包含大部分 WinUI 3 控制件、特性和功能的互動式範例。 從 Microsoft Store 取得應用程式,或在 GitHub 上取得原始程式碼。

適用於

另請參閱