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.