Udostępnij za pośrednictwem


ContentDialog.SecondaryButtonText Property

Definition

Gets or sets the text to be displayed on the secondary button.

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"/>

Property Value

String

Platform::String

winrt::hstring

The text to display on the secondary button. To hide this button, set the text to null or an empty string. The default is an empty string.

Remarks

ContentDialog has a built-in secondary button that you can use by setting this property to a non-empty string. The secondary button is hidden when this property is set to an empty string or null.

Invoking the secondary button closes the dialog with a return value of ContentDialogResult.Secondary. It also raises the SecondaryButtonClick event, which you can optionally handle, and invokes any SecondaryButtonCommand that is set.

Applies to

See also