J
J
jonillien2016-01-06 06:45:55
WPF
jonillien, 2016-01-06 06:45:55

Xaml - How to dynamically change window contents (example: main window -> settings)?

A picture, for example, no matter what the content is, the main thing is to stay in the same window. In WinForms, this can be done with Panel. How can this be achieved in xaml?
17d3e06991b74b15b301ecc116c86aa7.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2016-01-07
@jonillien

There are many ways.
Here are a few:
1. Use the MVVM example
2. Create a UserControl with content and load them into a ContentPresenter container
3. Pages
4. Content templates
5. TabPages can also be used as a last resort. Tabs can be hidden in WPF.

D
Dasha Tsiklauri, 2016-01-06
@dasha_programmist

here it is quite well described, but in relation to a prism (it will be difficult to understand right off the bat):
navogation in prism
, in short, can be done in 2 ways: switching controls (view-based) or changing the state of the view model (state-based), that is, hiding certain flag elements.

M
MonkAlex, 2016-01-06
@MonkAlex

Visually, switching in one window is implemented with a Frame, inside which different Pages are drawn.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question