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

Adding Controls Code Behind

I have already added controls into the DockingManager in code behind.But the visual formatting (Size, DockingMode etc,..) are not like I set them:   ViolationsControl panel = new ViolationsControl();                Size size = new Size(600, 400);                DockingManager.SetDesiredMinWidthInFloatingMode(panel, size.Width);                DockingManager.SetDesiredMinHeightInFloatingMode(panel, size.Height);         DockingManager.SetDesiredMinWidthInDockedMode(panel, size.Width);         DockingManager.SetDesiredMinHeightInDockedMode(panel, size.Height);        DockingManager.SetShowInTaskbar(panel, value);               DockingManager.SetState(panel, DockState.Float);           Singleton.SyncDockingManager.Children.Add(panel);The control isn't floating. The size isn't 600x400 and it isn't shown in the taskbar.It appear on the top left corner of the screen, with a size of 40x62 (or something small like that).It seems like the DockingManager.Set DP doesn't do anything.Am I missing something?Thanks in advancePS: Setting the DP after the control has been loaded, doesn't work either.PPS: I don't know why, but the formatting of this post is kinda strange. If I change it it ends up in one single line.

3 Replies

MS Marimuthu Sivalingam Syncfusion Team April 10, 2017 12:14 PM UTC

Hi Thomas,

Thank you for contacting Syncfusion support.

We have checked your query "Setting the DP after DockingManager control has been loaded, doesn't work". We have prepared the sample to meet your requirement, in this sample we have set the SetFloatingWindowRect attached property of DockingManager to update the float window position and size. Please download the sample for the same from the below link.

Sample: DockingManager_Codebehind

Regards,
Marimuthu S.


TC Thomas Christof April 10, 2017 01:29 PM UTC

Thanks.

                DockingManager.SetFloatingWindowRect(panel, new Rect(200, 200, size.Width, size.Height));

was missing.


DR Durga Rajan Syncfusion Team April 11, 2017 07:30 AM UTC

Hi Thomas,

We are glad to know that your issue has been solved. Please let us know if you need any other assistance.

Regards,
Durga S.  


Loader.
Up arrow icon