private void OnIsOpenPropertyChanged(DependencyPropertyChangedEventArgs args) { if (IsOpen) { //Reset the close reason to the default value of programmatic. m_lastCloseReason = InfoBarCloseReason.Programmatic; UpdateVisibility(); } else { RaiseClosingEvent(); } }
internal InfoBarClosingEventArgs(InfoBarCloseReason reason) =>
private void OnCloseButtonClick(object sender, RoutedEventArgs args) { CloseButtonClick?.Invoke(this, null); m_lastCloseReason = InfoBarCloseReason.CloseButton; IsOpen = false; }
internal InfoBarClosedEventArgs(InfoBarCloseReason reason) { Reason = reason; }