RibbonTabItem and RibbonGroupBox DataContext issue

May 9, 2010 at 5:40 PM

Hi,

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"
			       Text="New"
                               Command="{Binding AddRootNodeCommand}">
	</fluent:RibbonGroupBox>
</fluent:RibbonTabItem>
and in the code-behind I assign the ribbonTabTags' DataContext one of my ViewModels that has a "AddRootNodeCommand" property:

ribbonTabTags.DataContext = myViewModel;

In version 1.0.0.1 of the Fluent Ribbon library, this worked fine. When I clicked the button, the command was called. I just updated to version 1.2.0.0 (.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.
--Matthias

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

We can repro this

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