I am in the process of building a RegionAdapter (Prism) for the xamDockManager TabGroupPane control.
To add Document Content internally I am using the following:
ContentPane newContentPane = _xamDockManager.AddDocument(item.ToString(), item); newContentPane.Activate();
TabGroupPanes can be empty initially.
When having only 1 TabGroupPane the RegionAdatper works fine (it adds the document to that TabGroupPane).
When having more than 1 TabGroupPane I am looking for a way to specify to which TabGroupPane the region content should be added.
I notice by the sample provided in the xamFeatureBrowser, that is the TabGroupPane that holds the active contentPane. But in this case I need other way to specify the active TabGroupPane.
Any idea ?
Thanks,Claudio.
The AddDocument method is just a helper method for creating a ContentPane in the "active" TabGroupPane similar to how creating a new document/file in VS will add that document/file to the tab group that contains the active pane. If you need to add a pane to a specific TabGroupPane then you could just add the item directly to the Items collection of that TabGroupPane . How you do that would really depend on how you created your app. If you created the TabGroupPane in the xaml at design time then VS would have generated a member variable for any named elements so you can just name the TabGroupPane and use that to reference it later. If you're creating it in code then you'll need to manage the reference to the TabGroupPane. Note, if you are creating it in code and want to ensure it remains in the tree, you should set the Name property. Unnamed Split/TabGroup panes could be removed when they are no longer needed.
Hi Andrew,
Is it possible for me to create an ObservableCollection obj which could be used as something like myTabGrpPane.Items = myObservColl; so that as and when items are added / removed from collections contentPanes would be added/removed from TabGroup pane?
I am using MVVM and just like when i add items to a TabControl it would show new tabs for each item, i am hoping the TabGrouppane would do the same..
Thanks