CanExecuteRoutedEventArgs::CanExecute Property
.NET Framework (current version)
Gets or sets a value that indicates whether the RoutedCommand associated with this event can be executed on the command target.
Assembly: PresentationCore (in PresentationCore.dll)
Property Value
Type: System::Booleantrue if the event can be executed on the command target; otherwise, false. The default value is false.
The follow example creates a CanExecuteRoutedEventHandler that only returns true if the command target is a control. First the Source event data is cast to a Control. If it is a Control, CanExecute is set to true; otherwise, it is set to false.
.NET Framework
Available since 3.0
Available since 3.0
Show: