mouse-events from main window to methods in usercontrols
I have a button in main.xaml with a click event that is created in main.cs. I also have a method created in a user-control.cs. How do I route the click event from main.xaml to activate the method in usercontrol.cs.
Example below:
[main.cs]
public void firststudybutton(object sender, MouseButtonEventArgs e)
{
}
[user-control.cs]
public void firstButton_Click(object sender, RoutedEventArgs e)
{
studentsViewSource.View.MoveCurrentToFirst();
}
What method would I put in firststudybutton to activate method in firstButton_Click?