Click here to Skip to main content
15,888,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wanted to assign window to a frame in WPF but its not happening, looks like only page or usercontrol can be used in MainWindow frame.

What I have tried:

_1stChildWindow cw = new _1stChildWindow();
//Window cw = new Window();
 Company cm = new Company();
 cw.Content = cm;
 this.SPMainFrame.Navigate(cw);
Posted
Comments
Afzaal Ahmad Zeeshan 21-Nov-18 3:14am    
What is the purpose of injecting a Window inside the frame? You need to understand, how a navigation window works. A page, or another user control is a good fit for such a requirement.

https://stackoverflow.com/questions/13950833/page-frame-navigation-windows-in-c-sharp-wpf

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900