Share via


AppWindowClosingEventArgs.Cancel Property

Definition

Gets or sets a value that indicates whether the event should be canceled.

public:
 property bool Cancel { bool get(); void set(bool value); };
bool Cancel();

void Cancel(bool value);
public bool Cancel { get; set; }
var boolean = appWindowClosingEventArgs.cancel;
appWindowClosingEventArgs.cancel = boolean;
Public Property Cancel As Boolean

Property Value

Boolean

bool

true if the event should be canceled; otherwise, false.

Remarks

Set this property to true to cancel the system close operation when the app exits its Closing event handler.

Applies to

See also