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.
Unfortunately, activation email could not send to your email. Please try again.

Docking Manager MVVM and Caliburn.Micro Support

Thread ID:

Created:

Updated:

Platform:

Replies:

117697 Dec 1,2014 02:07 AM Jan 29,2015 06:52 AM WPF 10
loading
Tags: DockingManager
MAHESH NARAYANAN V V
Asked On December 1, 2014 02:07 AM

Is DockingManager capable of working in sync with Caliburn.Micro framework and MVVM ?  Is there any workaround for that ?

Victory Jessie Selvam D [Syncfusion]
Replied On December 2, 2014 07:16 AM

Hi Mahesh,

Thank you for using Syncfusion products.

Query: Is DockingManager capable of working in sync with Caliburn.Micro framework and MVVM? Is there any workaround for that ?
DockingManager doesn't support direct MVVM so we have achieved it by creating a wrapper or adapter for it. Please refer the following link for adapting DockingManager to an MVVM application,
http://www.syncfusion.com/blogs/post/MVVM-Adapter-for-WPF-Docking-Manager.aspx

We have prepared a work around sample for DockingManager with Caliburn.Micro framework and MVVM, kindly download it from the attachment. 

Please let us know if you need further assistance on this.

Regards,
Jessie

Attachment: DockingManagerMVVMCBM_dd67c3ef.zip

MAHESH NARAYANAN V V
Replied On December 4, 2014 01:25 AM

Thanks for your quick Support.

I found a problem in your solution.  when I add a children during run time (example  : create new property window for dynamically created object ) with docking State As Dock its not displaying. State other 

than dock is working fine and if I create a child with Autohidden state change the  state to dock its hidden from the UI but the child is there in DockingManager.Children.



Victory Jessie Selvam D [Syncfusion]
Replied On December 5, 2014 08:03 AM

Hi Mahesh,

Thank you for your update.

We have modified the sample by adding the Properties window in Dock state and ClassView window in AutoHidded state dynamically. We are unable to reproduce the reported issues with the attached sample. Kindly provide us more details by modifying the sample if the reported issue is reproduced in your scenario.

Please let is know if you need further assistance on this.

Regards,
Jessie

Attachment: DockingManagerMVVMCBM_19a543d5.zip

MAHESH NARAYANAN V V
Replied On December 10, 2014 07:09 AM

Hai,

   you solution cannot be considered as a perfect MVVM pattern because, if i need to change any property of docked window dynamically I need to do it in traditional way and even it is difficult to find out the exact window that I am looking for. The Idea is  as MVVM pattern suggest if the properties in IChildrenElement is changed the docking window's property should also change. For example , I should be able to change the header of a floating window by changing the Header property in IChildrenElement 

Victory Jessie Selvam D [Syncfusion]
Replied On December 12, 2014 05:50 AM

Hi Mahesh,

Thank your for your update.

We have modified the sample by data binding the Header and State attached properties so that changes in these properties for IChildrenElement will reflect in docking child windows. And in the sample commands are provided under Add menu to add child in Dock & AutoHidden state and to change the Header & State properties programmatically at run time. If we have misunderstood your requirement kindly provide us more details so that we can proceed further to assist you.

Please let us know if you need further assistance on this.

Regards,
Jessie

Attachment: DockingManagerMVVMCBM_f6c42fe.zip

MAHESH NARAYANAN V V
Replied On January 13, 2015 05:25 AM

Yes. This may work. 
Can you please give update for the very previous solution (DockingManagerMVVMCBM_19a543d5.zip) ? 

MAHESH NARAYANAN V V
Replied On January 14, 2015 01:22 AM

Hi, 
    Can you give an effective way to find or track all child windows. My requirement is to retrieve any window during run time to modify its properties . 

Victory Jessie Selvam D [Syncfusion]
Replied On January 19, 2015 01:13 AM

Hi Mahesh,

Thank you for your update.

Query: Can you please give update for the very previous solution?
We have modified the sample to add children in Dock and AutoHidden state dynamically to MVVM pattern. In the sample, commands are provided under Add menu to add child in Dock & AutoHidden state. Also we are unable to reproduce the reported issues with the attached sample. 

Query: Can you give an effective way to find or track all child windows. My requirement is to retrieve any window during run time to modify its properties?. 
In the attached sample, you can track the child windows by using the DockingAdapterViewModel.DockingAdapter property in MenuViewModel class. It is the collection of IChildrenElement that are added in DockingManager. Also under the Add menu we have added a menu item "Change header" and clicking on this will change the Header property of all child windows based on their order in DockingManager. We would like to know more details like modified sample if we have misunderstood your requirement.

Please let us know if you need further assistance on this.

Regards,
Jessie

Attachment: DockingManagerMVVMCBM_9b15e3b.zip

MAHESH NARAYANAN V V
Replied On January 28, 2015 12:38 AM

Caliburn.Micro Support  :
   
Why docking window doesn't render view according to view model if we doesn't specify the DataTemplate in app.xaml. If we are going in Caliburn.Micro 's way Its the frameworks job to render the view according to viewmodels. The extra configurations seems to be extra coding. Can you please work on this and get me a good solution to support Caliburn.Micro completely in Docking Manager

Victory Jessie Selvam D [Syncfusion]
Replied On January 29, 2015 06:52 AM

Hi Mahesh,
 
Our WPF Docking Manager is not an item control, it is not possible to have a traditional item-source binding to a collection of objects in the view model. However we have achieved it by creating an adapter for DockingManager. So it is necessary for mapping the DataTemplates with ViewModels in App.xaml file.
 
Please let  us know if you need further assistance on this.
 
Regards,
Jessie

CONFIRMATION

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.

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.

;