public class TreeViewCommandAction : TriggerAction<DependencyObject>
{
public static readonly DependencyProperty ItemClickCommandProperty = DependencyProperty.Register("ItemClickCommand",
typeof(ICommand), typeof(TreeViewCommandAction), new PropertyMetadata(null));
public ICommand ItemClickCommand
{
get { return (ICommand)GetValue(ItemClickCommandProperty); }
set { SetValue(ItemClickCommandProperty, value); }
}
protected override void Invoke(object parameter)
{
}
}
在silverlight页面中的使用:
<telerik:RadTreeView SelectionMode="Extended" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<plm:TreeViewCommandAction ItemClickCommand="{Binding ...}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadTreeView>