Hello,
We are using the XamDockManager for our application. If we drag multiple tabs from the XamDockManager to a window the tabs appear on the bottom of the screen. We would like this to be on top of the screen like the main window.
Is this possible?
Kind regards
Hi,
I’ll add Val’s sample updated with my last suggestion. You’ll see that I have added comments to the ResourceDictionary file and to the MainWindow xaml and the code behind. There are several methods depicted in the sample but only one currently being used.
The only one currently uncommented is using the ResourceDictionary file referenced in the MainWindow MergedDictionary Resources xaml and then retrieved in the code behind and added to the ToolWindow’s resources’ MergedDictionaries.
I think that most closely represents what you have described.
In the resource file I have a slightly modified Control Template. I set the BorderBrush to Blue just to confirm that it was being applied. It also has a TabGroupPane style to set the TabStripPlacement to Top and the BorderBrush to Red.
Please run my sample and let me know if you see any issues.
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 that demonstrates the issue if you have one.
I'm afraid that doesn't resolve the issue. I verified in debug that the resources are copied and that the controltemplate used is in the resource dictionary.
Let me know if this code resolves your question.
e.Window.Resources.MergedDictionaries.Add(this.Resources.MergedDictionaries[0]);
The solution you suggested works.
However wa applied a controltemplate to the tabs and we would like this to be applied. (It also puts the tabs on top).
We've tried to copy the resourcedictionary using the following code:
private void MainDockMagager_ToolWindowLoaded(object sender, Infragistics.Windows.DockManager.Events.PaneToolWindowEventArgs e) { e.Window.Resources = this.Resources.MergedDictionaries[0]; }
The resources seem to be copied but not applied to the tabs, but do get applied for the content.
When you float a pane the Dock Manager fires the ToolWindowLoaded event. You can handle this event to and add a style to the new Tool Window’s Resources which sets the TabStripPlacement property to Top for the TabGroupPane. This will add the Tabs at the top of the Tab Group Pane when it is created.
See attached sample.
Let me know if you have any questions.
Sincerely,
Valerie
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support