DocumentWindow and Binding to Collection

Docking/MDI for WPF Forum

Posted 10 years ago by Ciaran
Version: 4.5.0486
Avatar
Hi,

I'm attempting to bind a collection of DocumentWindow objects to a MDI host but I'm running into an issue.

The XAML is like this:

                   <docking:Workspace>
                        <docking:TabbedMdiHost>
                            <docking:TabbedMdiContainer x:Name="_documentContainer" ItemsSource="{Binding}">
                            </docking:TabbedMdiContainer>
                        </docking:TabbedMdiHost>
                    </docking:Workspace>
and the collection is defined like this:

ObservableCollection<DocumentWindow> _documentRoot

:
:
:
_documentContainer.ItemsSource = _documentRoot;

When a new document is opened, the code create a new DocumentWindow and adds it to the collection:

DocumentWindow newDocument = new DocumentWindow();
newDocument.Title = assetName;
newDocument.Content = newDesigner;
newDocument.Focusable = true;
newDocument.IsEnabled = true;

_documentRoot.Add(newDocument);

All this works for the first document, but subsequent document tabs cannot be activated and I'm unable to find where I'm going wrong. The tabs appear, but clicking on the tab has no effect.

Any ideas what I've missed?
Thanks,
Ciaran

[Modified at 04/07/2009 03:04 PM]

Comments (2)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Ciaran,

Unfortunately that is not supported at this time however we do have an item on our TODO list to add support for items source binding in the future.

Please see this post for why it doesn't work and what possible plans are:
http://www.actiprosoftware.com/Support/Forums/ViewForumTopic.aspx?ForumTopicID=3666


Actipro Software Support

Posted 10 years ago by Ciaran
Avatar
Hi
I appreciate the reply.
I couldn't find that original thread, that explains it. I'll return to adding the documents manually.
Thanks,
Ciaran
The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.