MVVM-后台代码绑定事件命令
InvokeCommandAction ic = new InvokeCommandAction(); ic.Command = ((GISMapViewModel)(this.DataContext)).NavigtedToImageMapCommand;//绑定的命令 //ic.CommandParameter = treeView; System.Windows.Interactivity.EventTrigger et = new System.Windows.Interactivity.EventTrigger(); et.EventName = "MouseLeftButtonDown"; et.Actions.Add(ic); System.Windows.Interactivity.TriggerCollection tc = Interaction.GetTriggers(currentMarker.Shape); tc.Add(et);