Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java like Window Navigation in WPF

I am a Java developer, and for user interaction I create a universal JFrame and has a JPanel container in it, and I swap that container with the other panels I created.

I started to develop WPF applications but I cannot find how this can be done. All I found that there are Page and UserControl but I could not understand the difference and how my task can be achieved. I cannot find good tutorials and I cannot understand how to search it in Google.

Any good info or tutorial would be appreciated.

like image 249
Mustafa Avatar asked Dec 09 '25 03:12

Mustafa


1 Answers

You can use ContentControl for that purpose. You can set its Content property to any other control and it will show where the ContentControl is placed.

Alternatively, you can use MVVM and set the Content to a ViewModel, while providing a view in a DataTemplate.

like image 101
svick Avatar answered Dec 10 '25 17:12

svick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!