Exemple #1
0
        public static void OnAttributePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpeakerAttributeControl ac = (SpeakerAttributeControl)d;

            if (ac._oldb != null)
            {
                BindingOperations.ClearBinding(ac, IsChangedProperty);
            }

            ac._oldb = new Binding("Changed")
            {
                Source = e.NewValue,
                Mode   = BindingMode.OneWay,
            };
            BindingOperations.SetBinding(ac, IsChangedProperty, ac._oldb);
        }
Exemple #2
0
        public static void OnIsChangedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SpeakerAttributeControl ac = (SpeakerAttributeControl)d;

            ac.RaiseEvent(new RoutedEventArgs(ContentChangedEvent, ac));
        }