Share via


ContentDialog.SecondaryButtonText 屬性

定義

取得或設定要顯示在次要按鈕上的文字。

public:
 property Platform::String ^ SecondaryButtonText { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring SecondaryButtonText();

void SecondaryButtonText(winrt::hstring value);
public string SecondaryButtonText { get; set; }
var string = contentDialog.secondaryButtonText;
contentDialog.secondaryButtonText = string;
Public Property SecondaryButtonText As String
<ContentDialog SecondaryButtonText="string"/>

屬性值

String

Platform::String

winrt::hstring

要顯示在次要按鈕上的文字。 若要隱藏此按鈕,請將文字設定為 null 或空字串。 預設為空字串。

備註

ContentDialog 有內建的次要按鈕,您可以藉由將此屬性設定為非空白字串來使用。 當此屬性設定為空字串或 null時,會隱藏次要按鈕。

叫用次要按鈕會關閉具有 傳回值的 ContentDialogResult.Secondary對話框。 它也會引發 SecondaryButtonClick 事件,您可以選擇性地處理,並叫用已設定的任何 SecondaryButtonCommand

適用於

另請參閱