本文整理匯總了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);
}
}
}