This project is read-only.

RibbonTabItem and RibbonGroupBox DataContext issue

May 9, 2010 at 6:40 PM


I have a RibbonTab that looks like this:

<fluent:RibbonTabItem Name="ribbonTabTags" Header="Tags" fluent:KeyTip.Keys="1">
	<fluent:RibbonGroupBox Header="Root Nodes" Name="grpRootNodes">
		<fluent:Button Name="btnAddRootNode"
                               Command="{Binding AddRootNodeCommand}">
and in the code-behind I assign the ribbonTabTags' DataContext one of my ViewModels that has a "AddRootNodeCommand" property:

ribbonTabTags.DataContext = myViewModel;

In version of the Fluent Ribbon library, this worked fine. When I clicked the button, the command was called. I just updated to version (.NET 4) and it stopped working.
When I assign the ViewModel to the DataContext of grpRootNodes, it works again. Obviously I don't want to assign it to all the GroupBoxes separately, instead I expected the binding to search up the element tree until it finds a not-null DataContext, as it did before.

Is this a bug or am I doing something fundamentally wrong here?

Thanks in advance.

May 12, 2010 at 6:58 PM
Edited May 12, 2010 at 6:58 PM
Sorry for delay. Let us check this tomorrow
May 13, 2010 at 10:10 AM

We can repro this

May 13, 2010 at 10:11 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.