private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DependencyProperty property = e.Property; InfoBar infoBar = d as InfoBar; if (property == SeverityProperty) { infoBar.UpdateSeverityState(); } else if (property == ActionButtonContentProperty || property == CloseButtonContentProperty || property == ShowCloseButtonProperty) { infoBar.UpdateButtonsState(); } else if (property == IsOpenProperty) { infoBar.OnIsOpenChanged(); } else if (property == IconSourceProperty) { infoBar.OnIconChanged(); } }
private void Test_Closing(InfoBar sender, InfoBarClosingEventArgs args) { args.Cancel = cancel; }