Answer the question
In order to leave comments, you need to log in
How to change content on button click in WPF Material Design?
I'm learning demo app from Wpf Material design. Clicking on the items in the left menu changes the content in the MainWindow.
What to hang on the onclick event of the button I created on one of the pages to go to another page?
And how can I hide this page in the popup menu?
Answer the question
In order to leave comments, you need to log in
WPF displays the current data structure.
You change the state of the data structure, and its display also changes.
There is an action, pressing the button, change the Page property in the data, indicating which page is active, from Page1, to Page2 and the display changes.
To hide something in the View, there are triggers to change the data, change, change the property responsible for displaying the control.
I recommend that you read about the MVVM pattern , as well as look at a simple example on GitHub
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question