Ticket Q478089
Visible to All Users

Binding DockLayoutManager.ItemsSource to a collection of interfaces?

created 12 years ago

I have a collection of documents to be displayed in the DocumentGroup area. It is a collection of interfaces instead of classes.
Previously I bind them to the DocumentGroup.ItemsSource so I could use the ItemContentTemplateSelector to render the interfaces using DataTempaltes. (You know WPF DataTemplates do not support interfaces directly).

However then I found a big problem with binding to DocumentGroup.ItemsSource - the documents cannot be dragged!

After some research realized I have to bind the documents to DockLayoutManager.ItemsSource. But DockLayoutManager does not support item template selector so I cannot bind to collection of interfaces!

Note that this is a loosely coupled application and interface is king. Any solutions?

Thanks in advance.

Answers approved by DevExpress Support

created 12 years ago (modified 12 years ago)

Hi Charles,
To achieve this goal, you can use the DocumentGroup.ItemContentTemplateSelector and DocumentGroup.ItemCaptionTemplateSelector properties. I have changed the How to use the IMVVMDockingProperties interface in an MVVM application example to demonstrate how to use them. Please take a moment to review it in the attachment.
Thanks

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.