You can use the following code app for button with name button1
button1.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));
You can use the following code app for button with name button1
button1.RaiseEvent(new RoutedEventArgs(Button.ClickEvent));