I'm new to using WPF and I'm looking for a way to have a navigation that will be the same across each window. With windows form I would inherit from one form to ensure each window has the same design. Can you do this with WPF or is there a different way to maintain consistency throughout the windows.
Yes, you can do this in WPF. If I understand your question correctly, you want to create a custom window template that you can re-use across any new window your application creates.
The way to do this is to create a new custom control that inherits the base class for Window, then customize the new control to fit your needs.
Examples is here:
You can try to use Pages. Then you could put a <Frame>
tag in your window and by changing the source of the frame with other page to navigate between screens.
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.