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
85
Problem with TabGroupPane
posted

Hello

I have a little problem with the [TabGroupPane]. In my C# sample project i have the xamDockManager with a [SplitPane]. The [SplitPane] contains a [TabGroupPane] and the [TabGroupPane] contains 3 [ContentPane].

1. Start the project.
2. Then click on the button “FindName("TabGroupPane1")”.
3. In the “Output” Window you can see the following :

xamDockManager1.Panes.Count =1
_ExistingTabGroup.Name =TabGroupPane1
_ExistingTabGroup.Items.Count =3

4. Now move the group to another docking-position (like Top).
5. Click the button again.
6. In the “Output” Window you can see the following :

xamDockManager1.Panes.Count =3
_ExistingTabGroup.Name =TabGroupPane1
_ExistingTabGroup.Items.Count =0

7. The TabGroupPane1 has now no items! And there are two new [SplitPanes] with New [TabGroupPanes].

The problem for me is, that I need the method “xamDockManager.FindName()” to access the panes. Do you have any solution for me?

Regards,

Lucas.

LucDockingProblem.zip
  • 54937
    Verified Answer
    Offline posted

    This is the intended behavior. We do not reposition a group and in some cases it wouldn't even be possible - e.g. you floated panes in which case the original tab group remains where it was and the panes are in a different container in the floating state or if you moved some panes to one location and others to another. Basically ContentPane instances are isolated controls that can be repositioned anywhere based on their own settings.

    As to the two new split panes, one is for the floating split pane that would have been created as you dragged the panes. This is kept around to maintain the state, position, etc. of itself and its children. The other is for the new split pane created on top. The first one is kept because we never removed panes that have a name on the assumption that you will be reusing it. You can still add to that and the group will be made visible if it has visible ContentPanes.

    If you are trying to get access to one or more of the ContentPane instances you had put into that TabGroupPane then you can set a Name on each of them and access them using their name (either with FindName as you are doing or just using the member variable that would be created for you for that element using its Name).