private void RaiseClosingEvent() { var args = new InfoBarClosingEventArgs(m_lastCloseReason); Closing?.Invoke(this, args); if (!args.Cancel) { UpdateVisibility(); RaiseClosedEvent(); } else { // The developer has changed the Cancel property to true, // so we need to revert the IsOpen property to true. IsOpen = true; } }
private void InfoBarAppWideMessages_Closing(WinUI.InfoBar sender, WinUI.InfoBarClosingEventArgs args) { args.Cancel = true; }