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
620
System.NullReferenceException on set_SelectedTabPane
posted

Hi ,

Our Winforms application is using WindockManager to handle multiple layouts (layouts are persisted through save and load methods)

 

In some unknown cases we get the following exception 

Type: System.NullReferenceException
Message: Object reference not set to an instance of an object
TargetSite: set_SelectedTabPane
Assembly Infragistics2.Win.UltraWinDock.v9.2

---- Stack Trace ----

   Infragistics.Win.UltraWinDock.DockableGroupPane.set_SelectedTabPane(DockablePaneBase value)   
   Infragistics.Win.UltraWinDock.DockablePaneBase.set_IsSelectedTab(Boolean value)   

   Infragistics.Win.UltraWinDock.UltraDockManager.NotifyPossibleActivePaneChange()

   Infragistics.Win.UltraWinDock.FloatingWindowContainer.OnActivated(EventArgs e)

   System.Windows.Forms.Form.set_Active(Boolean value)

   System.Windows.Forms.Form.WmActivate(Message& m)

   System.Windows.Forms.Form.WndProc(Message& m)

   Infragistics.Win.UltraWinDock.FloatingWindowContainerEx.WndProc(Message& message)

   System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)

   System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)

   System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)

 

Any idea on how we could solve this issue ? 

 

Thanks

Parents
No Data
Reply
  • 4219
    Suggested Answer
    posted

    Hi,

     When you load a layout file, the dock manager will initialize a DockableControlPane with the settings it was saved with. Then it will look at the controls on the form and try to find a control with the same Name property value as the control that was docked in the pane. If one is not found, the pane is removed. Maybe you are trying to set not existing pane as the selected one. If you give me more details or a sample illustrating this behavior, I will be glad to help you.

    Regards,

    Stefaniya

Children