Click here to Skip to main content
15,915,509 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm doing my own WPF appication and I met a problem,that I can't resolve myself.
I have many views I would like to go from one to second one,then from second one to third one etc. How would I like it to work?
Let's say I create dynamically a few buttons in class CommandViewModel,it is situated in a main window.When I click one button,there should appear in a HeaderedContentControl a tab Item (view that is created statically).All views that appear in a HeaderedContentControl will be in one collection in class WorkspaceViewModel.So far everything works.
But then view that appeared in WorkspaceViewModel contains again a few buttons,and when I click one,there should appear in another HeaderedContentControl in MainWindow a tab item containing static view. But in this situation,the current view in WorkspaceViewModel should become CommandViewModel,and last view in WorkspaceViewModel.
So how can make View in WorkspaceViewModel to become a view in CommandViewModel? What class do i need to navigate beetween them? Could someone give me any example? Or maybe a little bit of code how it should work? I spent some time on codeproject,but I couldn't find any answer.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900