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
640
Dynamically Load Document Content to Specific TabGroupPane possible ?
posted

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.

Parents
  • 54937
    Offline posted

    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.

Reply Children