wpf - How to open a window then load my XAML file to it? (XAML and C#) -


i new wpf , c# , need - sorry newbie question!

anyway have control panel 'window' file thats loaded when run project, , have button on control panel, when clicked triggers event. inside 'event function' trying load new window has own xaml code behind, how go doing this? have googled no avail.

please explain in laymens terms, still getting hang of all.

thanks!

private void btncustomers_clicked(object sender, routedeventargs e)     {        //load in customers.xaml file here - in new window      } 

you need declare instance of class other window call show() on it. if other window call mysecondwindow write following in event handler.

mysecondwindow otherwindow = new mysecondwindow(); otherwindow.show(); 

a basic explination of how windows work can found on msdn site.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -