Tuesday, August 11, 2009

How To Triggers Event In Silverlight

// Inlcude These two namespaces for the Automation Process
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;


ButtonAutomationPeer buttonAutoPeer = new ButtonAutomationPeer(YourButtonName);
IInvokeProvider invokeProvider = buttonAutoPeer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
invokeProvider.Invoke();


No comments: