MVVM DockingManager change properties

How can I change the properties of DockingManager such as (Visibility, width, SideInDockedMode, TargetNameInDockMode, etc.) using mvvm? 

5 Replies

DR Durga Rajan Syncfusion Team January 9, 2018 01:15 PM UTC

Hi Caleb, 

Thanks for contacting Syncfusion support. 

Since WPF DockingManager is not an Items Control, it is not possible to have a traditional ItemsSource binding to a collection of objects in the view model. But we have provided support for ItemsSource binding to a collection of DockItem in the view model. We have prepared simple sample using ItemSource. In this sample we have set desired values for each DockItem using TargetNameInDockMode, SideInDockedMode and DesiredWidthInDockMode properties. Please download the sample from the following location. 



Please get back to  us with more details like sample or screenshot which replicates your requirement if we misunderstood your query or if you are facing any issues with above sample. 

Regards, 
Durga S.  



CK Caleb Kliewer January 9, 2018 04:10 PM UTC

That does help a little but how can I have a PropertyChanged event triggered if I resize a DockItem? Do I not need the DockingAdapter to accomplish this?


DR Durga Rajan Syncfusion Team January 10, 2018 04:25 PM UTC

Hi Caleb, 

Thanks for the update. 

We have prepared sample which tries to meet your requirement. In this sample we have included a behavior which will fire a command with resized child’s details as CommandParameter on WindowResizing event Please download the sample from below location, 


Please get back to us with more details if we have misunderstood your query or if you are facing any issues with the provided sample. This would help us to provide solution at earliest. 

Regards, 
Durga S. 



CK Caleb Kliewer January 10, 2018 05:10 PM UTC

Thank you! This is almost exactly as I want. The one change I would like is to have it trigger using a Docking Adapter. I need a property to be updated in the ViewModel in the EviseManager solution when the Dock size is changed. This is so I can update the font size for the label controls in a Dock as the Dock is resized. The picture below is my project. I want to focus on getting the new size of the Dock from the DockingAdapter to the EviseManager. Please let me know if my query wasn't clear. Thanks!



DR Durga Rajan Syncfusion Team January 11, 2018 12:02 PM UTC

Hi Caleb, 

Thanks for your reply. 

We have prepared sample based on your requirement. In this sample we have included a behavior(“EventToCommand” in DockingAdapterMVVM) and the Command (“FireSizeChanged” in ViewModel class of DockingManagerMVVM) will get fired with resized child’s details as CommandParameter on WindowResizing event. Please download the sample for the same from below location, 

Code Example :  

<syncfusion:DockingManager x:Name="PART_DockingManager"  
                                   UseDocumentContainer="True" 
                                   ActiveWindowChanged="PART_DockingManager_ActiveWindowChanged_1"> 
            <i:Interaction.Behaviors> 
                <local:EventToCommandBehavior PassArguments="False" Event="WindowResizing" Command="{Binding ElementName=Adapter,Path=DataContext.FireSizeChanged}" /> 
            </i:Interaction.Behaviors> 
        </syncfusion:DockingManager> 


If we misunderstood your query please get back to us with more details. This would help us to provide solution at earliest. 

Regards, 
Durga S.  


Loader.
Up arrow icon