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


C# DockContent.Activate方法代码示例

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


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

示例1: OpenFloatingOrActivate

 private void OpenFloatingOrActivate(DockContent view)
 {
     if ((view.DockAreas & DockAreas.Float) > 0 && !view.Created)
     {
         Size viewSize = new Size(view.Bounds.Size.Width, view.Bounds.Size.Height);
         view.Show(dockPanel, DockState.Float);
         view.FloatPane.FloatWindow.Size = viewSize;                
     }
     else
     {
         view.Activate();
     }
 }
开发者ID:GoodAI,项目名称:BrainSimulator,代码行数:13,代码来源:MainForm.cs

示例2: SelectContent

 internal void SelectContent(DockContent dc, bool Activate)
 {
     dc.Activate();
 }
开发者ID:lisiynos,项目名称:pascalabcnet,代码行数:4,代码来源:WindowOperations.cs

示例3: ActivateDockContentPopupAutoHidden

		public static void ActivateDockContentPopupAutoHidden(DockContent form, Boolean keepAutoHidden = true) {
			if (DockHelper.IsDockStateAutoHide(form.DockState)) {
				if (keepAutoHidden) {
					// will fold back to the button after a delay; what for do you need to set Active then???
					//form.DockPanel.ActiveAutoHideContent = form;
				} else {
					// will stay open because we change DockRightAutoHidde -> DockRight
					DockHelper.ToggleAutoHide(form);
				}
			}
			form.Activate();
		}
开发者ID:sanyaade-fintechnology,项目名称:SquareOne,代码行数:12,代码来源:DockHelper.cs

示例4: ActivateDockWindow

 private void ActivateDockWindow(DockContent window)
 {
     if (window.DockPanel == null)
         window.Show(dockPanel);
     window.Activate();
 }
开发者ID:meloscheng,项目名称:dos-debugger,代码行数:6,代码来源:MainForm.cs

示例5: ShowContent

        /// <summary>
        /// Shows the content.
        /// </summary>
        /// <param name="vc">The vc.</param>
        internal void ShowContent(IViewContent vc)
        {
            DockContent content = new DockContent();
            content.TabText = vc.Title;
            content.Text = vc.Title;
            content.ToolTipText = vc.Description;
            content.CloseButton = vc.AllowUserClose;
            content.CloseButtonVisible = vc.AllowUserClose;
            content.Tag = vc;
            var icon = vc.ViewIcon;
            if (icon != null)
            {
                content.Icon = icon;
                content.ShowIcon = true;
            }

            if (vc.IsExclusiveToDocumentRegion)
            {
                content.DockAreas = DockAreas.Document;
            }
            else
            {
                content.DockAreas = (DockAreas)(vc.DefaultRegion);
            }
            vc.SetParentForm(content);
            vc.ViewContentActivating += (sender, e) =>
            {
                content.Activate();
            };
            vc.TitleChanged += (sender, e) =>
            {
                content.TabText = vc.Title;
                content.Text = vc.Title;
            };
            vc.DescriptionChanged += (sender, e) =>
            {
                content.ToolTipText = vc.Description;
            };
            if (vc.AllowUserClose && vc.IsExclusiveToDocumentRegion)
                content.TabPageContextMenuStrip = documentTabContextMenu;

            content.ClientSize = vc.ContentControl.Size;
            vc.ContentControl.Dock = DockStyle.Fill;
            content.Controls.Add(vc.ContentControl);

            if (vc.IsModalWindow && vc.DefaultRegion == ViewRegion.Floating)
            {
                content.StartPosition = FormStartPosition.CenterParent;
                content.ShowDialog();
            }
            else
            {
                content.Show(contentPanel);
            }
        }
开发者ID:kanbang,项目名称:Colt,代码行数:59,代码来源:WorkbenchBase.cs


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