We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Close Icon
Unfortunately, activation email could not send to your email. Please try again.
Close Icon
close icon
Vote for your favorite ebook
Succinctly Readers Awards 2020
Syncfusion Feedback

Issues with Databinding and DockState.Document

Thread ID:





129046 Feb 23,2017 09:02 AM UTC Dec 31,2018 09:56 AM UTC WPF 5
Tags: DockingManager
Asked On February 23, 2017 09:02 AM UTC


I try to check whether we can use the DockingManager for our new product and the first important thing is using Databinding from an ObservableCollection in our view model to the ItemSource in the Dockingmanager. To externally manage adding from tabs/DockItems to the DockingManager. It works correct if the ObservableCollection is of type DockItem but he ignores the DockItems with the State DockState.Document. Adding items to the ObseravbleCollection at runtime works only if the state is not Document. Is there any reason for?

For Example here works only the first Dockitem:

      Tabs = new ObservableCollection<DockItem>();
      Tabs.Add(new DockItem() {Header = "Empty Start item", State = DockState.Dock});
      Tabs.Add(new DockItem() {Header = "Second Empty Start item", State = DockState.Document});

Is there also any possibility to bind the itemsource to an ObservableCollection of other types (own view models) and manage the bindings of their properties by templates (DockitemTemplates?) ?

Thanks, Nelly

Marimuthu Sivalingam [Syncfusion]
Replied On February 24, 2017 09:25 AM UTC

Hi Nelly,

Thank you for contacting Syncfusion support.

Query 1: "Adding items to the ObseravbleCollection at runtime works only if the state is not Document. Is there any reason for?"

We have checked your query, but we could not reproduce the reported behavior. If you need to use Document window in your application, then you should set UseDocumentContainer property value as true. We have prepared the sample to meet your requirement. In this sample, we have added the document at run time. Please download the sample from the below location.

Sample: DockingManagerTesting

Query 2: "Is there also any possibility to bind the itemsource to an ObservableCollection of other types (own view models)"

Our WPF DockingManager is not an Items Control, so it is not possible to have a traditional ItemsSource binding to a collection of objects in the view model. So we have provided support for ItemsSource binding to a collection of DockItem in the view model and DockItem class contains all the attached properties of DockingManager.

Marimuthu S.

Kevin Kennedy
Replied On March 25, 2017 01:23 AM UTC

I too have been having problems with the DockingManager, and the problem seems to stem from the DockingManager rendering/loading while the ObservableCollection is empty. If I add a delay before adding DockItems to the Tabs ObservableCollection in your example code, the DockingManager adds the DockItem whose state is Dock, but fails to show the second DockItem (the Document) and the button that adds additional DockItems to the Tabs property does not function. This has been causing us issues because it sometimes takes a few seconds before we have any Document DockItems to add to the ObservableCollection bound to the DockingManager.ItemsSource property.

Version: 15.1451.0.37 (v15.1.0.37)

Attachment: DockingManager_DocumentBug_a288792.zip

Durga Rajan [Syncfusion]
Replied On March 27, 2017 12:44 PM UTC

Hi Nelly,

Thanks for the update.

We suggest you to update the Layout of DockingManager while changing the collection of the DockingManager at run time. We have modified your sample based on your requirement. In this sample we have invoked UpdateLayout method of DockingManager while adding items to the collection. Please download the sample from the following location,

Sample: DockingManagerTesting_Modified

Durga S.

Kelly Salvage
Replied On December 27, 2018 12:52 PM UTC

I'm seeing a really weird bug in these examples: the dock items are showing up twice for each databound item added to the observable collection, so I see tow tabs for each item with a DockState of document and two docking windows for the other items. I'm using Version
Attachment: dockmanagerBug_482834c4.zip

Jagadeesan Pichaimuthu [Syncfusion]
Replied On December 31, 2018 09:56 AM UTC

Hi Kelly Salvage, 
We are able to reproduce the reported issue and confirmed as a bug. So we have created a new support incident under your account, please follow the incident for further assistance . Kindly log on to our support website to check further updates on it. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon