public void Deactivate() { isActive = false; //call the OnStateDeactivated event to allow the user to add more logic to the deactivate function Deactivating?.Invoke(this, EventArgs.Empty); }
/// <summary>Save changes when the dialog page loses focus</summary> protected override void OnDeactivate(CancelEventArgs e) { Deactivating?.Invoke(this, e); if (e.Cancel) { return; } SaveSettingsToStorage(); base.OnDeactivate(e); }
protected virtual void OnDeactivating(EventArgs e) { Deactivating?.Invoke(this, e); }
private void OnDeactivating(bool wasClosed) { Deactivating?.Invoke(this, new DeactivationEventArgs(wasClosed)); }