robert omete

robert omete

  • NA
  • 1
  • 1.1k

mouse-events from main window to methods in usercontrols

Jul 7 2013 11:24 PM
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?

Answers (1)