简体   繁体   中英

Menu navigation to multiple “windows” in WPF

I'm coming from VB6. There I had a main form with a menu. The documents(user interfaces) were usercontrols. The user selected his required document from the menu and then the required usercontrol appeared on the main form. Is this a best practice in WPF or are there better solutions? (obviously the "main form from VB6" in WPF would be a System.Windows.Window )

Not sure if I get what you want to do: But usually you have a ContentControl . You load the UserControl you want into it (using the myContentControl.Content property).

If you are new to WPF, make sure you check out the MVVM pattern . It greatly increases the quality of your code, even though it makes some things a little tricky :).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM