Menu

call click event in c#

Written by

  1. You can easily do it by the following piece of code:

button.PerformClick();

2.
private void Some_Method() //this method is called
{
SubGraphButton_Click(new object(), new EventArgs());
}

3.
private void ChildNode_Click(object sender, RoutedEventArgs args)
{
SubGraphButton_Click(sender, args);
}

Article Categories:
C#

Leave a Reply

Your email address will not be published. Required fields are marked *

Shares