本文整理汇总了C#中DockStyle.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# DockStyle.ToString方法的具体用法?C# DockStyle.ToString怎么用?C# DockStyle.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockStyle
的用法示例。
在下文中一共展示了DockStyle.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupDocSite
/// ------------------------------------------------------------------------------------
/// <summary>
/// Creates a DotNetBar docking site for a DotNetBar toolbar.
/// </summary>
/// <param name="dockStyle">The docking location on the form of the site.</param>
/// <returns>A DotNetBar docking site.</returns>
/// ------------------------------------------------------------------------------------
private DockSite SetupDocSite(DockStyle dockStyle)
{
DockSite site = new DockSite();
site.Dock = dockStyle;
site.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
site.BackColor = SystemColors.Control;
site.BackgroundImageAlpha = ((System.Byte)(255));
site.Name = "dnbDockSite" + dockStyle.ToString();
site.TabStop = false;
switch (dockStyle)
{
case DockStyle.Top:
site.Location = new Point(0, 0);
site.Size = new Size(m_parentForm.ClientSize.Width, kDockSiteHeight);
break;
case DockStyle.Bottom:
site.Location = new System.Drawing.Point(0, m_parentForm.ClientSize.Height);
site.Size = new System.Drawing.Size(m_parentForm.ClientSize.Width, 0);
break;
case DockStyle.Right:
site.Size = new Size(0, m_parentForm.ClientSize.Height - kDockSiteHeight);
site.Location = new Point(m_parentForm.ClientSize.Width, kDockSiteHeight);
break;
case DockStyle.Left:
site.Location = new Point(0, kDockSiteHeight);
site.Size = new Size(0, m_parentForm.ClientSize.Height - kDockSiteHeight);
break;
default:
break;
}
return site;
}