Alright so doing some WPF programming, which I don’t do often… And I need to have like, on the main page I have 2 buttons, and each button is going to hide the main page and display a different page of controls.
I’m currently using ContentControl, and showing/hiding them as needed. And it’s starting to get messy.
And I’m sure there’s a better way to do this.
So… Suggestions =]?
EDIT: Sorry about it being vague, what I currently have is 2 buttons in a ContentControl, when clicking one of the buttons it hides that ContentControl, and shows a different ContentControl, with its own set of controls, and a back button. When clicking that back button it hides the current ContentControl, and shows the original. And this is getting messy, so im looking for a better method of doing this.
I suggest you take a look at some MVC type of framework. They are design pattern solutions for problems just like the one you are describing.
The framework that I like most, because it’s simple to understand and learning curve is not so steep is the MVVM Light Toolkit, but there is also PRISM and Caliburn.
They might seem a little bit more complicated, but the clarity and organization it promotes in your code will pay off in the end.