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.NullReferenceExceptionMessage: Object reference not set to an instance of an objectTargetSite: set_SelectedTabPaneAssembly 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
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
Let me know if I can help you with something. As much as I know you use CAB and there aren't any methods specific to WinDockWorkspace the issue should be reproducible with a WinDockManager not using CAB. If you upload a sample illustrating the issue, I will be glad to research it.