本文整理汇总了C#中WeifenLuo.WinFormsUI.Docking.DockPanel.GetDockWindowSize方法的典型用法代码示例。如果您正苦于以下问题:C# DockPanel.GetDockWindowSize方法的具体用法?C# DockPanel.GetDockWindowSize怎么用?C# DockPanel.GetDockWindowSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WeifenLuo.WinFormsUI.Docking.DockPanel
的用法示例。
在下文中一共展示了DockPanel.GetDockWindowSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetOutline
private void SetOutline(DockPanel dockPanel, DockStyle dock, bool fullPanelEdge)
{
Rectangle rect = fullPanelEdge ? dockPanel.DockArea : dockPanel.DocumentWindowBounds;
rect.Location = dockPanel.PointToScreen(rect.Location);
if (dock == DockStyle.Top)
{
int height = dockPanel.GetDockWindowSize(DockState.DockTop);
rect = new Rectangle(rect.X, rect.Y, rect.Width, height);
}
else if (dock == DockStyle.Bottom)
{
int height = dockPanel.GetDockWindowSize(DockState.DockBottom);
rect = new Rectangle(rect.X, rect.Bottom - height, rect.Width, height);
}
else if (dock == DockStyle.Left)
{
int width = dockPanel.GetDockWindowSize(DockState.DockLeft);
rect = new Rectangle(rect.X, rect.Y, width, rect.Height);
}
else if (dock == DockStyle.Right)
{
int width = dockPanel.GetDockWindowSize(DockState.DockRight);
rect = new Rectangle(rect.Right - width, rect.Y, width, rect.Height);
}
else if (dock == DockStyle.Fill)
{
rect = dockPanel.DocumentWindowBounds;
rect.Location = dockPanel.PointToScreen(rect.Location);
}
SetDragForm(rect);
}