示例#1
0
        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;
            }
        }
示例#2
0
 private void InfoBarAppWideMessages_Closing(WinUI.InfoBar sender, WinUI.InfoBarClosingEventArgs args)
 {
     args.Cancel = true;
 }