本文整理汇总了C#中WeifenLuo.WinFormsUI.Docking.DockPane.PointToScreen方法的典型用法代码示例。如果您正苦于以下问题:C# DockPane.PointToScreen方法的具体用法?C# DockPane.PointToScreen怎么用?C# DockPane.PointToScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WeifenLuo.WinFormsUI.Docking.DockPane
的用法示例。
在下文中一共展示了DockPane.PointToScreen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetOutline
private void SetOutline(DockPane pane, DockStyle dock, int contentIndex)
{
if (dock != DockStyle.Fill)
{
Rectangle rect = pane.DisplayingRectangle;
if (dock == DockStyle.Right)
rect.X += rect.Width / 2;
if (dock == DockStyle.Bottom)
rect.Y += rect.Height / 2;
if (dock == DockStyle.Left || dock == DockStyle.Right)
rect.Width -= rect.Width / 2;
if (dock == DockStyle.Top || dock == DockStyle.Bottom)
rect.Height -= rect.Height / 2;
rect.Location = pane.PointToScreen(rect.Location);
SetDragForm(rect);
}
else if (contentIndex == -1)
{
Rectangle rect = pane.DisplayingRectangle;
rect.Location = pane.PointToScreen(rect.Location);
SetDragForm(rect);
}
else
{
using (GraphicsPath path = pane.TabStripControl.GetOutline(contentIndex))
{
RectangleF rectF = path.GetBounds();
Rectangle rect = new Rectangle((int)rectF.X, (int)rectF.Y, (int)rectF.Width, (int)rectF.Height);
using (Matrix matrix = new Matrix(rect, new Point[] { new Point(0, 0), new Point(rect.Width, 0), new Point(0, rect.Height) }))
{
path.Transform(matrix);
}
Region region = new Region(path);
SetDragForm(rect, region);
}
}
}