I have a WPF ribbon application using Microsoft.Windows.Controls.Ribbon. I can set the view through the Grid.Row tag:
</ribbon:Ribbon>
<Grid Grid.Row="1">
<!-- View's content here -->
</Grid>
</Grid>
</ribbon:RibbonWindow>
Q: How can I change the view depending on the selected ribbon tab?
You have a few options.
SelectionChangedevent and trade out your view’s content. If you’re using Prism, you could probably create aSelectorRegionAdapterto do this for you.Ribbon.SelectedValue(settingSelectedValuePathto sayLabel) and provide aDataTriggerwhich handles each of your tab’s names.You could put an instance of each view model (assuming your
RibbonWindows data context has each of the view models you need) you care about in theRibbonTab.Tagproperty, and adapt your view based onSelectedItem.Tag: