Export (0) Print
Expand All

RelayCommand Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

A command whose sole purpose is to relay its functionality to other objects by invoking delegates. The default return value for the CanExecute method is 'true'.

Namespace:  Microsoft.TeamFoundation.MVVM
Assembly:  Microsoft.TeamFoundation.Controls (in Microsoft.TeamFoundation.Controls.dll)

public class RelayCommand : NotifyPropertyChangedDispatcherObject, 
	IOwnedCommand, ICommand

The RelayCommand type exposes the following members.

  NameDescription
Public methodRelayCommand(Action)Creates a new command that can always execute.
Public methodRelayCommand(Action<Object>)Creates a new command that can always execute.
Public methodRelayCommand(Action<Object>, Predicate<Object>)Creates a new command.
Top

  NameDescription
Public propertyDispatcherDispatcher associated with this object. (Inherited from NotifyPropertyChangedDispatcherObject.)
Public propertyIsExecutingTrue if command is executing, false otherwise.
Top

  NameDescription
Protected methodAddDependencySource(String, INotifyCollectionChanged) (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodAddDependencySource(String, INotifyPropertyChanged) (Inherited from NotifyPropertyChangedDispatcherObject.)
Public methodCanExecute
Public methodCheckAccessBeginExecuteExecutes the specified action on a thread associated with object's dispatcher. This invokes a BeginInvoke on the Dispatcher, does not wait for the action to complete -- returns immediately. (Inherited from NotifyPropertyChangedDispatcherObject.)
Public methodCheckAccessExecute(Action)Executes the specified action on a thread associated with object's dispatcher. (Inherited from NotifyPropertyChangedDispatcherObject.)
Public methodCheckAccessExecute<TResult>(Func<TResult>)Executes the specified action on a thread associated with object's dispatcher. (Inherited from NotifyPropertyChangedDispatcherObject.)
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExecute
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetDependencySourceName(INotifyCollectionChanged) (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodGetDependencySourceName(INotifyPropertyChanged) (Inherited from NotifyPropertyChangedDispatcherObject.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodRaiseCanExecuteChanged
Protected methodRaisePropertyChangedRaises PropertyChanged event. This method can only be called on the thread associated with this object's dispatcher. (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodReceiveWeakEvent (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodRemoveDependencySource(String, INotifyCollectionChanged) (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodRemoveDependencySource(String, INotifyPropertyChanged) (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodSetAndRaisePropertyChanged(Boolean, Boolean, String)A helper method that sets property value and raises PropertyChanged event if the value has changed. Optimized implementation for System.Boolean type. (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodSetAndRaisePropertyChanged(Int32, Int32, String)A helper method that sets property value and raises PropertyChanged event if the value has changed. Optimized implementation for System.Int32 type. (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodSetAndRaisePropertyChanged(String, String, String)A helper method that sets property value and raises PropertyChanged event if the value has changed. Optimized implementation for string type. (Inherited from NotifyPropertyChangedDispatcherObject.)
Protected methodSetAndRaisePropertyChanged<T>(T, T, String)A helper method that sets property value and raises PropertyChanged event if the value has changed. (Inherited from NotifyPropertyChangedDispatcherObject.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodVerifyAccessEnforces that the calling thread has access to this object. (Inherited from NotifyPropertyChangedDispatcherObject.)
Top

  NameDescription
Public eventCanExecuteChangedRaised when CanExecute changes.
Public eventPropertyChangedOccurs when a property value changes. (Inherited from NotifyPropertyChangedDispatcherObject.)
Top

  NameDescription
Public fieldStatic memberIsExecutingProperty
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft