
Hi Bob,
We're glad to hear you have found the Getting Started Series helpful, and so thankful you brought the issue with Step 9 to our attention! There was a change in our v25.1.0 release that broke that step, and we didn't catch it.
The RibbonBackstageTabViewModel class has a Content property that (in combination with ContentTemplate and ContentTemplateSelector) can be used to define the content of the tab. That's what changed in v25.1.0. Step 9 was initializing those view models, but did NOT initialize the new Content property to be an instance of the view model itself. That is important because we want the view model instance to be passed to SampleBackstageTabContentTemplateSelector in order to return the correct view for the view model.
We originally discussed making the RibbonBackstageTabViewModel.Content property default to an instance of the view model, but decided against it since it meant somoneone wanting to just set the ContentTemplate property would also have to clear the Content property of the default value. Unfortunately, the side effect of it not defaulting is exactly what you saw in the broken sample.
For the next release, we're going to reverse that decision and make it the default since it improves the out-of-the-box experience.
If you make the following changes to RibbonBackstageTabViewModel, the sample should work as expected. Just update the one constructor of RibbonBackstageTabViewModel to also set the Content property as follows:
public RibbonBackstageTabViewModel(string key, string label, string keyTipText)
: base(key) {
// It is critical that the content of this view model is initialized to
// itself so that the DataTemplateSelector assigned to RibbonBackstage.ContentTemplateSelector
// can use the view model instance to select the appropriate template.
Content = this;
this.label = label ?? BarControlService.LabelGenerator.FromKey(key);
this.keyTipText = keyTipText ?? BarControlService.KeyTipTextGenerator.FromLabel(this.label);
}
Please give that a shot and let us know if you experience any other issues with the sample.