Silverlight 行为之一 ---TriggerAction

来源:互联网 发布:nba2kol贾森汤普森数据 编辑:程序博客网 时间:2024/04/30 12:22
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)        {        }    }
<pre class="html" name="code"><telerik:RadTreeView SelectionMode="Extended" >                           <i:Interaction.Triggers>         <i:EventTrigger EventName="Click">              <plm:TreeViewCommandAction ItemClickCommand="{Binding ...}" />         </i:EventTrigger>     </i:Interaction.Triggers></telerik:RadTreeView>本文来自tianyu0910的博客,原文地址:http://blog.csdn.net/tianyu0910/article/details/7287951
原创粉丝点击