I found the class AutomationFactory in Silverlight, that is really usefull when you want to subscribe to an event using COM objects:
AutomationEvent quitEvent = AutomationFactory.GetEvent(word,"Quit");
quitEvent.EventRaised += new EventHandler<AutomationEventArgs>(quitEvent_EventRaised);
- Do you know any similar class that could be used from .NET?
- Do you know the way to bind events using automation?
Thanks in advance.
I was pretty sure there was one, so after a bit of searching I found the list for .Net 4.0 and it includes System.Windows.Automation; IIRC that should be the one Silverlight’s AutomationFactory was based off of. System.Windows.Automation