แก้ไข

แชร์ผ่าน


TaskDialogPage.AllowCancel Property

Definition

Gets or sets a value that indicates whether the task dialog can be closed with Cancel as resulting button by pressing ESC or Alt+F4 or by clicking the title bar's close button, even if a Cancel button isn't added to the Buttons collection.

public:
 property bool AllowCancel { bool get(); void set(bool value); };
public bool AllowCancel { get; set; }
member this.AllowCancel : bool with get, set
Public Property AllowCancel As Boolean

Property Value

true to allow to close the dialog by pressing ESC or Alt+F4 or by clicking the title bar's close button; otherwise, false. The default value is false.

Exceptions

The property is set and this page instance is currently bound to a task dialog.

Remarks

You can intercept cancellation of the dialog without displaying a "Cancel" button by adding the Cancel button that has its Visible property set to false.

Applies to