This project is read-only.

[Version 1.3] Controlling initial tab location of new document

Sep 10, 2010 at 4:35 PM
Upgrading from 1.2.2702 to 1.3.3585 and having some problems with my documents.  I just have one document pane (MainDocPane) and this is my implementation of adding a new document (or activating an existing one).  In 1.2, it would add the document to the end of the list of tabs and make it active.  In 1.3, it makes it the first tab.  I've noticed some api changes related to activating content, but didn't dig up anything to help me here.  
Oh, yeah, actually DockMgr.ActiveDocument = tab; didn't work because CoerceActiveDocumentValue threw its exception, so I've got tab.Show(DockMgr, false); instead.
Any hints on controlling my tab order programmatically?     
      //Use this to add a new tab and show it, or bring forward an existing tab (can pass null for widget in this case
      public void AddOrShowDisplay(string title, FrameworkElement widget)
         var tab = DockMgr.Documents.FirstOrDefault(el => el.Name == title);
         if (tab == null)
            if (widget == null)

            DocumentContent dc = new DocumentContent();
            dc.Content = widget;
            widget.Name = allowedcalname;
            dc.Name = allowedcalname;
            dc.Title = calname;
            dc.IsFloatingAllowed = false;
            dc.IsCloseable = false;
            tab = dc;
         DockMgr.ActiveDocument = tab;