winrt 真正的绑定任意命令

下载codeplex上的winrttrigger开源控件

Winrt.Tirgger.EventTrigger trigger = new Winrt.Tirgger.EventTrigger();
            trigger.HookEvent("ItemClick", gridView);
            MainViewModel model = ServiceLocator.Current.GetInstance<MainViewModel>();
            trigger.TriggerActions.Add(new Tirgger.TriggerAction() { Command = model.ItemClick, PassEventArgsToCommand = true });

 

 

你可能感兴趣的:(命令)