1

I am trying to create an event in my class to trigger an event handler that is already established and working in a dll file associated with my project. I don't have the ability to change the dll, as it is a NuGet package through my department. Using the following call

[RaiseEvent](New MouseButtonEventArgs(Mouse.PrimaryDevice, 0, MouseButton.Left) With {.RoutedEvent = Mouse.MouseDownEvent, .Source = WIndowControl}) 

I would like to trigger this method:

private void HWPFWindow_MouseDoubleClick(object sender, MouseButtonEventArgs e)

which is in a compiled dll. Any ideas? Thanks.

Im sorry about not being able to include more code. I have to keep it cryptic as it's for my business. Feel free to ask for more details.

cnburke
  • 13
  • 5
  • Are you not able to use AddHandler? – Sasha May 18 '17 at 15:45
  • @Jaxi Not in this case. The handler is a private handler, outside of my scope because it is in a compiled dll from a Nuget Package. The handler is already set up to handle double clicks, which I can do through using my application. I'm basically trying to do the double click after my component loads, rather than having the user have to do it. So I'm trying to raise the double click event manually, hoping that the handler will recognize it and handle it. – cnburke May 18 '17 at 17:23
  • http://www.c-sharpcorner.com/forums/simulate-doubleclick – jmcilhinney May 20 '17 at 06:59
  • @jmcilhinney That did it. Thanks for the help. – cnburke May 25 '17 at 19:35

0 Answers0