Hi,
We have an application with dockable tools and document, and a ribbon on top.
When I click a button in the ribbon, focus goes to the ribbon, and away from the most recently focused pane. However, the command handling still works, since the dockmanager decides to send the routed command to the most recently activated pane.
I want our users to be able to see where the ribbon command will be applied. I have used a style where the pane header coloring triggers on IsActivePane . But the moment focus moves to the ribbon, I can no longer see which pane will receive the command.
I've been pulling my hair trying to figure out a way to have the coloring trigger on if the pane is the last active pane - to no avail.
Can you give me any pointers? Or am I trying to do the impossible?
I'm using version 13.1
Hello Lemainan,
I tested styling both the border and the background of the pinned and unpinned content panes using styles targeting the ContentPane, PaneTabItem (unpinned pane), and PaneHeaderPresenter and the styles continued to show the Active Pane when using tools in the Ribbon.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 13.1.20131.1009 in NetAdvantage for WPF 2013 Volume 1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
Unfortunately, we do not use the Infragistics ribbon, but a different ribbon implementation. (The main reason for this is that up to this version, there was no backstage.) We also frequently use floating windows, and want ribbon commands to be able to target floating windows as well, using routed commands. We've managed to solve this by adding another focus scope that is not the window but encompasses both the ribbon and the dockmanager and using a similar transfer behavior as the dock manager does. However, command routing through the dockmanager still works, even though none of the panes are marked as active - but not knowing where the command will be applied really confuses our users.
I have modified the sample application. Try the save button at the top left, and you'll see that the content pane that executes the command is no longer highlighted, even though the command is executed in the content pane.
There is also an article by Brian Lagunas which deals with the issue of focus between the XamRibbon and the XamDockManager. You can find this article here: http://ko.infragistics.com/community/blogs/blagunas/archive/2013/05/30/wpf-xamdockmanager-floating-panes-and-xamribbon-menu-integration.aspx
I believe implementing the concepts provided in this article will resolve your issue. I have modified the sample provided to handle the Window’s FilterMessage and Ribbon’s PreviewGotKeyboardFocus events and now the set styles remain when using the Ribbon. Please note, I have moved the styles to the App.xaml so that they are also picked up by the ToolWindow (floating pane).
If you are still having issues, you may want to consider moving to the XamRibbon as the backstage is now available in this control.
Let me know if you have any questions.
I was able to resolve the issue by modifying the style to trigger on a property of the data assigned to the Tag field instead. (Pane.Tag.IsLastActive)
Were you able to resolve your issue?
Sincerely,Valerie Developer Support Supervisor - XAMLInfragisticswww.infragistics.com/support