Hello i am working on project have two windows the first is the main windows and it contain a public method and the other is secondary windows and contain a button .. what i want is when i press the button on the secondary windows the button will call the method on the main windows here what i try
the code of the main windows :
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
public void the_public_method()
{
//code
}
and the code of the secondary windows :
public partial class windows2 : Window
{
public windows2()
{
InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
// dont know what to put here
}
}
Please help