/// <summary> /// Remove a handler for the given source's event. /// </summary> public static void RemoveHandler(DependencyPropertyChangedNotifier source, EventHandler <DerivedDependencyPropertyChangedEventArgs> handler) { if (source == null) { throw new ArgumentNullException("source"); } if (handler == null) { throw new ArgumentNullException("handler"); } CurrentManager.ProtectedRemoveHandler(source, handler); }
/// <summary> /// Stop listening to the given source for the event. /// </summary> protected override void StopListening(object source) { DependencyPropertyChangedNotifier typedSource = (DependencyPropertyChangedNotifier)source; typedSource.ValueChanged -= new EventHandler <DerivedDependencyPropertyChangedEventArgs>(OnSomeEvent); }