当前位置: 首页>>代码示例>>C#>>正文


C# ContainerControl.SuspendLayout方法代码示例

本文整理汇总了C#中System.Windows.Forms.ContainerControl.SuspendLayout方法的典型用法代码示例。如果您正苦于以下问题:C# ContainerControl.SuspendLayout方法的具体用法?C# ContainerControl.SuspendLayout怎么用?C# ContainerControl.SuspendLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.ContainerControl的用法示例。


在下文中一共展示了ContainerControl.SuspendLayout方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadWindow

		/// <summary>
		/// Loads the SurveyTreeControl from the current document
		/// </summary>
		protected void LoadWindow()
		{
			ToolWindowDiagramView diagramView = myDiagramView;
			LinkLabel watermarkLabel = myWatermarkLabel;
			if (diagramView == null)
			{
				ContainerControl container = new ContainerControl();
				myDiagramView = diagramView = new ToolWindowDiagramView(this);
				diagramView.DiagramClientView.DiagramDisassociating += new EventHandler(DiagramDisassociatingEvent);
				myWatermarkLabel = watermarkLabel = new SafeLinkLabel();
				watermarkLabel.Dock = DockStyle.Fill;
				watermarkLabel.Site = diagramView.Site;
				watermarkLabel.TextAlign = ContentAlignment.MiddleCenter;
				watermarkLabel.BackColor = SystemColors.ControlLight;
				watermarkLabel.ForeColor = SystemColors.ControlText;
				watermarkLabel.LinkClicked += new LinkLabelLinkClickedEventHandler(WatermarkLinkClicked);
				container.Site = diagramView.Site;
				diagramView.BackColor = SystemColors.Window;
				diagramView.Dock = DockStyle.Fill;
				diagramView.ContextMenuRequestedEvent += new EventHandler<DiagramMouseEventArgs>(this.DesignerContextMenuRequested);
				diagramView.Visible = false;
				DiagramClientView clientView = diagramView.DiagramClientView;
				clientView.ZoomChanged += new ZoomChangedEventHandler(this.DesignerZoomChanged);
				clientView.TakeFocusOnDragOver = true;
				container.SuspendLayout();
				container.Controls.Add(diagramView);
				container.Controls.Add(watermarkLabel);
				container.ResumeLayout();
				Guid commandSetId = typeof(ORMDesignerEditorFactory).GUID;
				Frame.SetGuidProperty((int)__VSFPROPID.VSFPROPID_InheritKeyBindings, ref commandSetId);
			}
			ORMDesignerDocData currentDocument = this.CurrentDocument;
			Store newStore = (currentDocument != null) ? currentDocument.Store : null;
			Store oldStore = myStore;
			if (oldStore != newStore)
			{
				myDiagramSetChanged = true;
				myStore = newStore;
				AdjustVisibility(false, false);
			}
		}
开发者ID:cjheath,项目名称:NORMA,代码行数:44,代码来源:ORMDiagramSpy.cs


注:本文中的System.Windows.Forms.ContainerControl.SuspendLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。