Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
Disable docking in UltraDockManager for MdiChild windows
posted

Hi there!

I want to be able to create the Mdi documents in my app and to be able to make them as floating windows. Therefore I have an UltraDockManager & UltraTabbedMdiManager and create DockableControlPanes with IsMdiChild property set to true.

But I don't want to allow user to dock this documents to parent document -- they must be either tabbed mdi child documents or floating windows.

To force this behavior I set all docking abilities of this panes to false:

pane.Settings.AllowDockBottom = Infragistics.Win.DefaultableBoolean.False;
pane.Settings.AllowDockLeft = Infragistics.Win.DefaultableBoolean.False;
pane.Settings.AllowDockRight = Infragistics.Win.DefaultableBoolean.False;
pane.Settings.AllowDockTop = Infragistics.Win.DefaultableBoolean.False;   

and this works quite fine: when I try to dock floating window it allows to dock it only as Tab.

But when I Open Popup menu (Right click on window header) and click Dockable when it is Tab or Unselect Floating when it is floating window, this window becomes docked to right.

Can I somehow change this behavior?

 

Thanks a lot for your answer.

  • 48586
    posted

    Hello ,

     

    I am not sure that  I completely understand your scenario, so could you please  post a small sample that illustrates your issue in order to be able to investigate this further for you.

     

    Thank you.

  • 135
    posted

    I had the same problem.  Here is what I did to solve it.

     

        Private Sub MainTabbedMdiManager_InitializeContextMenu(sender As Object, e As Infragistics.Win.UltraWinTabbedMdi.MdiTabContextMenuEventArgs) Handles MainTabbedMdiManager.InitializeContextMenu

            If e.ContextMenu.MenuItems(0).Text = "Doc&kable" Then

                With e.ContextMenu

                    .MenuItems(0).Visible = False 'Makes Dockable Invisable

                    .MenuItems(1).Visible = False 'Makes Hide Invisable

                    .MenuItems(2).Visible = False 'Makes Floating Invisable

                    .MenuItems(3).Visible = False 'Makes Seperator Invisable

                End With

            End If

        End Sub