Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Docking behavior using DockManager.ContentPanes
posted

Dear Infragisitics Team,


I have a problem dealing with the docking behavior of DockManager.ContentPanes in WPF.


Background:

(Using MVVM in C#)  I have a main window (WPF) that contains a ribbon and various content panes.

(That ribbon is subdivided into ribbon groups providing several actions.)

 

Description:

Depending on which content pane is selected the ribbon activates associated groups with a set of actions.

As long as the content panes are docked to the main window all works well, according to the expectations.  (I am able to change the panes and I’ll get the actions selected in the ribbon.)

 

When some panes are undocked, I am only allowed to change between these undocked panes to get the expected behavior after selecting an action in the ribbon (of the main window).

 

But problems (with the undocked panes) occur after clicking onto a pane that is docked to the main window.

Thereafter the undocked panes seem not to work any longer.

I am able to click on the ribbon groups associated with these undocked panes. Although it seems as if I could select an action within such a ribbon group nothing happens any more.

 

More details:

It seems to matter whether the ribbon groups are assigned to "XamRibbon.Tabs" or to "XamRibbon.ContextualTabGroups".


All is fine with the "XamRibbon.Tabs”.

But the problem described above only occurs as long as the ribbon groups are assigned to "XamRibbon.ContextualTabGroups”.

 

I tried to figure it out myself by registering a specified action in such a ribbon group to   a "PreviewMouseLeftButtonDown" event and a “Click” event.

Inside of the corresponding event handlers I checked the data context.

 

As long as the error does not occur both event handlers are called. Then the (view model of the control defining the) selected ribbon group is the data context.

When the error occurs (according to the description above) only the PreviewMouseButton  event is executed. Then the (view model of the) main window is the data context.

 

 It seems as if I lose the focus on the correct ribbon group.

 

Shouldn’t the "ContextualTabGroups" behave the same in this context as it is expected by the "XamRibbbon.Tabs"?

 

Best,

Stephan.