none
WPF 鼠标事件 RRS feed

答案

  • 你好,

    创建对应类型的event argument并设置相应的RoutedEvent属性即可。

    例如,

          MouseButtonEventArgs args = new MouseButtonEventArgs(Mouse.PrimaryDevice,0,MouseButton.Left);
          args.RoutedEvent=Window.PreviewMouseDownEvent;
          this.RaiseEvent(args);
    


    Min Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2011年7月11日 3:55
    版主