NDockingPanle close and display


Author
Message
Andrew Ad
Andrew Ad
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)
Group: Forum Members
Posts: 8, Visits: 1
Hello. I need to display and hide NDockingPanel. I`m using Display() and Close() methods.
When I call Close() or click cross on panel - panel is closed. But when I call Display() in order to restore panel on the same position I`m gettin NullReferenceException.

Panel creation code:
panel2 = new NDockingPanel { Text = "two", Key = Guid.NewGuid().ToString("N"), ID = Guid.NewGuid() };
panel2.PerformDock(manager.RootContainer.RootZone, DockStyle.Right);

Close and Display invocation:
private void hideshowToolStripMenuItem_Click(object sender, EventArgs e)
{
if (panel2.Visible)
panel2.Close();
else
panel2.Display();
}

Stack Trace:
at Nevron.UI.WinForm.Docking.NDockZoneBase.ContainsReferencedChild()
at Nevron.UI.WinForm.Docking.NDockZoneBase.CanDispose()
at Nevron.UI.WinForm.Docking.NControlHost.Update()
at Nevron.UI.WinForm.Docking.NDockZoneBase.set_Referenced(Boolean value)
at Nevron.UI.WinForm.Docking.NDockingPanelState.Reset()
at Nevron.UI.WinForm.Docking.NDockingPanel.ResetState(DockState state)
at Nevron.UI.WinForm.Docking.NDockingPanel.ResumeAfterDock(INDockZone target)
at Nevron.UI.WinForm.Docking.NDockingPanelBase.PerformDock(INDockZone zone, DockStyle style, Int32 index)
at Nevron.UI.WinForm.Docking.NDockingPanelState.Restore()
at Nevron.UI.WinForm.Docking.NDockingPanelBase.OnDisplayed(EventArgs e)
at Nevron.UI.WinForm.Docking.NDockingPanel.OnDisplayed(EventArgs e)
at Nevron.UI.WinForm.Docking.NCaptionPanel.Display()
at WindowsFormsApplication7.Form1.hideshowToolStripMenuItem_Click(Object sender, EventArgs e) in C:\Users\andry_ad\documents\visual studio 2010\Projects\WindowsFormsApplication7\WindowsFormsApplication7\Form1.cs:line

Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Andrew Ad - 12 Years Ago
Nevron Support - 12 Years Ago
Andrew Ad - 12 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search