DockingStateEnum give me Parameter Incorrect Exception

DockingStateEnum give me Parameter Incorrect Exception

abdechafi.neji
Contributor Contributor
255 Views
1 Reply
Message 1 of 2

DockingStateEnum give me Parameter Incorrect Exception

abdechafi.neji
Contributor
Contributor

I'm trying to set the window docking to DockLeft but I'm getting an exeption ( Parameter is Incorrect ) 

 

  public static void LoadProjectsWindow(IntPtr pageHandle, string WindowName, string WindowInternalName, ref DockableWindow DockWindow)
        {
            DockableWindows windows;
            windows = m_DockableWindows;

            PojectsDockWindow = windows.Add(Resources.Projects_ClientID, WindowInternalName, WindowName);

            if (PojectsDockWindow == null)
                return;

            double screenWidth = System.Windows.SystemParameters.WorkArea.Width;
            int mDockWindowWidth = (int)(screenWidth / 7);


            PojectsDockWindow.DockingState = DockingStateEnum.kDockLeft; // Exception here
            PojectsDockWindow.Width = mDockWindowWidth;
            PojectsDockWindow.Visible = true;
            PojectsDockWindow.AddChild(pageHandle);
        }

 

 

How can I fix this problem? 

0 Likes
256 Views
1 Reply
Reply (1)
Message 2 of 2

petr.meduna
Advocate
Advocate

Try enable docking states before setting enum to DockingStates.

dockWindow.DisabledDockingStates = False

 

0 Likes