New to Telerik UI for WPFStart a free 30-day trial

Provides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the ICommand.CanExecuteChanged events.

Definition

Namespace:System.Windows

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public class CanExecuteChangedEventManager : WeakEventManager<ICommand>

Inheritance: objectWeakEventManager<ICommand>CanExecuteChangedEventManager

Inherited Members WeakEventManager<ICommand>.CheckForNull(object, string)

Methods

Adds the provided listener to the list of listeners on the provided source.

C#
public static void AddListener(ICommand source, IWeakEventListener listener)
Parameters:sourceICommand

The object with the event.

listenerIWeakEventListener

The object to add as a listener.

Removes the specified listener from the list of listeners on the provided source.

C#
public static void RemoveListener(ICommand source, IWeakEventListener listener)
Parameters:sourceICommand

The object to remove the listener from.

listenerIWeakEventListener

The listener to remove.

Begins listening for the CanExecuteChanged event on the given source.

C#
protected override void StartListening(object source)
Parameters:sourceobject

The object with the event.

Stops listening for the CanExecuteChanged event on the given source.

C#
protected override void StopListening(object source)
Parameters:sourceobject

The object with the event.