Skip to content

CommandSourceControl class

Base class for controls that invoke a semantic Command: it owns the router wiring (command source registration, CanExecute queries, execution) but decides nothing about when to invoke or how to present the command. Derived controls call InvokeCommand from their own activation path.

Guide: C# Markup reference: Element

public abstract class CommandSourceControl : ContentControl
name description
Command { get; set; } Gets or sets the semantic command this control invokes.
CommandData { get; set; }
CommandToolTipMode { get; set; }
static readonly CommandDataProperty The value this control hands its command as the invocation argument. Null lets the nearest ICommandArgumentSource above the control supply the argument instead.
static readonly CommandProperty
static readonly CommandToolTipModeProperty Which parts of the command this control builds a tooltip from when it has no ToolTip of its own. Defaults to none: a control that shows its command’s text and icon has already said what a tooltip would say.