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. Image for the cookie policy date

How to get the new width and height of a dock panel when i resize?

I am hosting an image control inside a dock panel. I need to scale the image control when I resize the dock panel(Progress bar should not appear). So is there a way to get the new height and width after resizing so that i can scale the image control? 
Thanks
Rathna Subramanian

5 Replies

MS Marimuthu Sivalingam Syncfusion Team October 5, 2017 12:26 PM UTC

Hi Rathna Subramanian,

Thank you for contacting Syncfusion support.

We can get the DockingWindow Height and Width after resizing the window by the help of "GetDesiredWidthInDockedMode" attached property of DockingManager. We have prepared the sample for the same. please download the sample from the below link.

Sample: DockingResizeHeight

Please find the below UG documentation link for more information about configuring the size of the docking window.

UG link: https://help.syncfusion.com/wpf/dockingmanager/dealing-with-windows#configuring-window-sizing

Regards,
Marimuthu S.
 



RS Rathna Subramanian October 6, 2017 05:14 AM UTC

Thank you so much. I am using DockingAdapter because i had to use caliburn micro.How to add these properties in the DockingAdapter?

Regards,

Rathna Subramanian



MS Marimuthu Sivalingam Syncfusion Team October 6, 2017 12:42 PM UTC

Hi Rathna Subramanian,

Thank you for your update.

We have analyzed your query and prepared the sample using caliburn.Micro to achieve this requirement. In this sample we have get the corresponding view of resized window by the help of VisualUtils.FindDescendant method (Visual tree helper) and WindowResizing event of DockingManager. You can find the WindowResizing event code snippet in DockingAdapterView class. please find the sample for the same from the below link.

Sample: DockingManagerMVVMCaliburnDemo

Regards,
Marimuthu S.



RS Rathna Subramanian October 9, 2017 08:53 AM UTC

Hi , 

 Thank You. The Window Resizing event is written in the code-behind of DockingAdapterView. But as per MVVM, we are not supposed to write any code in code behind. I tried to write the handle in the view model but i am not getting the source as  DockedElementTabbedHost. Please help. 



MS Marimuthu Sivalingam Syncfusion Team October 9, 2017 01:12 PM UTC

Hi Rathna Subramanian,

Thanks for your update.

We have checked your query with our DockingManager caliburn.micro sample. We can use the DockingManger named AdapterDockingManager in DockingAdapterViewModel. So we can hook window resizing event in DockingAdapterViewModel and get new size of resized Dock Window. Based on the size changes of Dock Window, please update the size properties you have used to set the size of your content view . Now we have modified the sample to hook the window resizing event in DockingAdapterViewModel and you can find the sample from the below link. 

Sample: DockingManagerMVVMCaliburnDemo

If we have misunderstood your query. Please provide simple sample with your requirement details. It would be more helpful to proceed further on this and provide the solution at the earliest.

Regards,
Marimuthu S.

 


Loader.
Live Chat Icon For mobile
Up arrow icon