本文整理汇总了C#中System.Windows.Forms.MenuStrip.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# MenuStrip.BringToFront方法的具体用法?C# MenuStrip.BringToFront怎么用?C# MenuStrip.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.MenuStrip
的用法示例。
在下文中一共展示了MenuStrip.BringToFront方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadMenuDefinitions
/// ------------------------------------------------------------------------------------
/// <summary>
///
/// </summary>
/// <param name="definitions"></param>
/// ------------------------------------------------------------------------------------
private void ReadMenuDefinitions(string[] definitions)
{
XmlDocument xmlDef = new XmlDocument();
foreach (string def in definitions)
{
if (def == null)
continue;
xmlDef.PreserveWhitespace = false;
xmlDef.Load(def);
XmlNode node = xmlDef.SelectSingleNode("TMDef/menus/item");
if (node == null)
continue;
if (m_menuBar == null)
{
m_menuBar = new MenuStrip();
m_menuBar.Name = kMainMenuName;
m_menuBar.Dock = DockStyle.Top;
m_menuBar.ShowItemToolTips = false;
m_menuBar.Stretch = true;
m_menuBar.Visible = true;
m_menuBar.AccessibleRole = AccessibleRole.MenuBar;
m_menuBar.AccessibleName = m_menuBar.Name;
m_menuBar.ShowItemToolTips = false;
m_parentForm.Controls.Add(m_menuBar);
m_menuBar.BringToFront();
}
ReadMenuItems(node, m_menuBar, false);
ReadContextMenus(xmlDef.SelectSingleNode("TMDef/contextmenus/contextmenu"));
}
}