Profile Picture

NDockingPanle close and display

Posted By Andrew Ad 11 Years Ago
Author
Message
Andrew Ad
sad Posted 11 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 11 Years Ago
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


Threaded View

Threaded View
Forum Post NDockingPanle close and display By Andrew Ad ( 11 Years Ago )
Forum Post Thanks, it helped By Andrew Ad ( 11 Years Ago )
Forum Post Hello Andrew, Could you check whether... By Nevron Support ( 11 Years Ago )


Similar Topics


Reading This Topic