I would like to change the content of the main surface (the stuff below the ribbon itself)in a WPF application when a ribbon tab is clicked. I’m using the office ribbon, not that is matters much. So which WPF container control should I use, and how would I do it? Should I just have various controls with visibility hidden, or what. I’m not a WPF expert so I need a little inspiration.
Share
Ill preface by saying I doubt this is the best way to do this.
This is my style for RibbonTab notice IsSelected is bound to IsSelected in The view model
This is view model code
In the constructor for the TabViewModel I take a parameter for the ViewModel of the content
Then I used an ItemsControl to display the selected content in my xaml
And the ContentControlTemplate I have is
Also make sure you have a datatemplate pointing your content to a view
Hope this helps.