TitleBar.Subtitle 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
它會取得或設定字幕文字顯示在標題欄。
public:
property Platform::String ^ Subtitle { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring Subtitle();
void Subtitle(winrt::hstring value);
public string Subtitle { get; set; }
var string = titleBar.subtitle;
titleBar.subtitle = string;
Public Property Subtitle As String
屬性值
字幕文字會顯示在標題欄。 預設值是空字串。
範例
這個範例展示了如何將屬性設定 Subtitle 為字串。
<TitleBar Title="My App" Subtitle="Preview"/>
TitleBar titleBar = new TitleBar();
titleBar.Title = "My App";
titleBar.Subtitle = "Preview";
備註
副標題顯示在標題右側。 它通常用來顯示版本資訊,例如「預覽」或「測試版」。
當 在 TitleBar 緊湊顯示模式下 Title ,與 Subtitle 元素不會顯示。