WPF 代码使用Action

                            KeyBoardAction ic = new KeyBoardAction
                            {
                                MyKeyBoardType = true
                            };
                            System.Windows.Interactivity.EventTrigger et = new System.Windows.Interactivity.EventTrigger
                            {
                                EventName = "PreviewMouseLeftButtonDown"
                            };
                            et.Actions.Add(ic);
                            System.Windows.Interactivity.TriggerCollection tc = Interaction.GetTriggers(text);
                            tc.Add(et);

猜你喜欢

转载自blog.csdn.net/xionglifei2014/article/details/131791167