Intersoft ClientUI Documentation
CommandTarget Property (UXTreeViewItem)



Gets or sets the element on which to raise the specified command.
Syntax
<CategoryAttribute("Action")>
Public Property CommandTarget As UIElement
Dim instance As UXTreeViewItem
Dim value As UIElement
 
instance.CommandTarget = value
 
value = instance.CommandTarget
[CategoryAttribute("Action")]
public UIElement CommandTarget {get; set;}
[CategoryAttribute("Action")]
public:
property UIElement^ CommandTarget {
   UIElement^ get();
   void set (    UIElement^ value);
}
Remarks

UXTreeViewItem implements ICommandSource interface which exposes Command, CommandParameter and CommandTarget property. You can assign a command to a UXTreeViewItem by setting its Command property to the target command existed in your application. With commanding, you can separate the actual logic of the command from the command definition, which is ideal for MVVM pattern application. To learn about MVVM pattern, see MVVM Pattern Overview.

For more information on how to implement routed command in your application, see How-to: Implement a RoutedCommand. For more information about the basics of commanding concept, see Commanding Overview.

Depending on the scenarios you want to achieve, you may want to evaluate when to use command or selection in your application. It's best practice to use commanding when you have a particular action to execute when a node is selected. However, if you simply wish to capture the current selection in the control, please use the SelectedItem or SelectedItems property.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UXTreeViewItem Class
UXTreeViewItem Members

Send Feedback