Profile Picture

NDockZone positioning

Posted By Greg Wilson 15 Years Ago
Author
Message
Greg Wilson
Posted 15 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 15 Years Ago
Posts: 2, Visits: 1
I have created a NDockZone that contains a single NDockingPanelHost. If I set the NDocumentManager root zone orientation to vertical my zone and its contents always show up below the document(NUIDocument) and if the orientation is horizontal the zone and its contents always show up to the right of the document(NUIDocument). How can I specify the zone to show up to the left or top depending on the orientation?

example code...

_manager.DocumentStyle.DocumentViewStyle = DocumentViewStyle.SingleDocument;
NUIDocument doc = new NUIDocument();
doc.Client = new NameUC(); // a user control
doc.Client.Dock = DockStyle.Fill;
_manager.DocumentManager.AddDocument(doc);

NDockZone leftZone = new NDockZone(Orientation.Horizontal);
leftZone.SizeInfo.PrefferedSize = new Size(600, 200);
NDockingPanelHost leftPanelHost = new NDockingPanelHost();
leftZone.AddChild(leftPanelHost);

NDockingPanel panel = new NDockingPanel();
panel.Text = "Asset Tree";
panel.Controls.Add(new DockingPanel()); // add a user control
leftPanelHost.AddChild(panel);

// if orientation is vertical zone always displays below the document
//if orientation is horizontal zone always displays to the left
// How do I get the zone to display to the top or left of the document?
_manager.RootContainer.RootZone.Orientation = Orientation.Vertical;
_manager.RootContainer.RootZone.AddChild(leftZone);




Similar Topics


Reading This Topic