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
1700
Issue with tab display
posted

Hello,

In my application I have 4 tabs. 3 of them are created with async/await so they appear few seconds after the last one.

I have this behavior : https://gyazo.com/72550de3a48d3bde52f8d262d37a177c

Is it possible to have D as the top, and when others tab are ready, to display then between the file menu and the D.

Because for the user, I think it's weird to have one tab in the middle and after content is present.

If the control have an event or property to "re-order" tabs it's will be good.

Regards

Parents
No Data
Reply
  • 3520
    Offline posted

    Hello,

     

    I've been looking into the desired behavior in the video you provided and I'd like to make sure I understood how your application is set up. Because the tab strip is vertically oriented I assume these four tabs are part of the UnpinnedTabArea meaning that the panes' IsPinned property is set to false.

    If this assumption is correct in order to show this tab at the bottom I would suggest collapsing the "D" tab right before adding the 3 delayed panes and then showing it again. This is necessary because the UnpinnedTabArea is bound to an internally managed collection of the items for that area and does not expose publicly any properties/events which can be used to manipulate it programmatically. The code for this approach looks as follows:

     

    cp.Visibility = Visibility.Collapsed;

     

    var pane = new ContentPane() { Name = "cpNew", Header = "Added Dynamically", IsPinned = false };

    var pane2 = new ContentPane() { Name = "cpNew2", Header = "Added Dynamically 2", IsPinned = false };

     

    cp.Visibility = Visibility.Visible;

    await Task.Delay(1000);

     

    tgp.Items.Clear();

    tgp.Items.Insert(0, pane);

    tgp.Items.Insert(1, pane2);

     

    If I misunderstood your requirements or you need any further assistance on the matter, please do not hesitate to let us know.

    XamDockManagerTesting.zip
Children
No Data