コード例 #1
0
        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();
            }
        }
コード例 #2
0
 private void Test_Closing(InfoBar sender, InfoBarClosingEventArgs args)
 {
     args.Cancel = cancel;
 }