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

If I set CanFloat to False the control cannot dock even when CanDock is set to True, is this a bug?

Hi

If I set CanFloat to False the control cannot dock even when CanDock is set to True, is this a bug?

I would like to allow the user the change layout by allow them to dock the controls. but not allow the controls to be able to float. Float option is not really useful in UWP apps because the control is always contained within the parent window, unlike classic Window  Form apps.

Regards

Gavin

6 Replies

SM Subashini Mahendran Syncfusion Team March 24, 2017 11:06 AM UTC

Hi GavinCheung,

Thank you for contacting Syncfusion support.

We have checked your query "If I set CanFloat to False the control cannot dock even when CanDock is set to True". Currently, the ContextMenu of our document control does not have the option to directly change from document to dock state. But we can change from document to dock state in code behind. If we misunderstood your reqiurement, please provide us more information regarding the requirement. This would help us to proceed further.

Regards,
Subashini M.  



FA FatCatz March 24, 2017 11:28 AM UTC

HiBelow is some code. If I set CanFloat to False I cannot change the docking positions of any of the controls. If I sent CanFloat to True then the controls can change docking positions or it can float. I don't want the float option but it seems setting CanFloat to False also sets CanDock to False?                                  


FA FatCatz March 24, 2017 11:29 AM UTC

<layout:SfDockingManager x:Name="docking"  >

            <ContentControl x:Name="Test1" layout:SfDockingManager.Header="Test 1" 
                            layout:SfDockingManager.DockState="Dock"
                            layout:SfDockingManager.CanDocument="False"
                              layout:SfDockingManager.CanDock="True"
                            layout:SfDockingManager.CanAutoHide="False"
                                layout:SfDockingManager.IsPinButtonVisible="False"
     layout:SfDockingManager.CanFloat="False"
                            />

            <ContentControl x:Name="Test2" layout:SfDockingManager.Header="Test 2" 
                            layout:SfDockingManager.DockState="Dock"
                            layout:SfDockingManager.CanDocument="False"
                            layout:SfDockingManager.CanAutoHide="False"
                             layout:SfDockingManager.CanDock="True"
                            layout:SfDockingManager.IsPinButtonVisible="False"
     layout:SfDockingManager.CanFloat="False"
                            />

        </layout:SfDockingManager>


SM Subashini Mahendran Syncfusion Team March 27, 2017 09:42 AM UTC

Hi GavinCheung, 
  
Drag option automatically becomes false when we set canFloat property to false. But we can change the DockingPosition of dockwindow through codebehind. By using SideInDockedMode property we can set the side and TargetNameInDockedMode property for changing the dockingposition of desired window. We have prepared the sample to meet your requirement. Please download the same from the below location.

Sample:SfDockingManager_129522
 
Regards, 
Subashini M.  
  
  



FA FatCatz March 27, 2017 10:55 AM UTC

Hi Subashin

Ok, thank for the info. I was really hoping that the user could dock but not float. 

Anyway, maybe the documentation should be updated to include setting CanFloat to False will automatically set CanDock to false too.

Regards

Gavin



SM Subashini Mahendran Syncfusion Team March 28, 2017 08:50 AM UTC

Hi GavinCheung, 

Thanks for your suggestion. We will update the clear details about the behavior of SfDockingManager in our documentation when we set CanFloat and CanDock property. 

Regards,
Subashini M. 


Loader.
Up arrow icon