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


C# IDockContent类代码示例

本文整理汇总了C#中IDockContent的典型用法代码示例。如果您正苦于以下问题:C# IDockContent类的具体用法?C# IDockContent怎么用?C# IDockContent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: BeginDragContent

		public void BeginDragContent(IDockContent content)
		{
			if (!InitDrag(content as Control, DragSource.Content))
				return;

			Content_BeginDrag(content);
		}
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:7,代码来源:DragHandler.cs

示例2: FloatingWindow

        /// <summary>
        /// Constructor used when window is created as consequence to user interaction.
        /// </summary>
        /// <param name="root">Parent dock panel</param>
        /// <param name="content">Content to host</param>
        /// <param name="origin">Origin, position on screen</param>
        /// <param name="size">Size of window</param>
        public FloatingWindow(DockPanel root, IDockContent content, Point origin, Size size)
            : this(root)
        {
            Left = origin.X;
            Top = origin.Y;
            Width = size.Width;
            Height = size.Height;
            if (content is TabLayout)
            {
                DockedContent = (TabLayout)content;
            }
            else
            {
                DockedContent = new TabLayout(Root);
                DockedContent.Dock(null, content, DockTo.Center);
            }
            foreach (DockContent subContent in DockedContent.Children)
            {
                subContent.Settings.DockState = DockState.Floating;				
            }
            Content = DockedContent;

            Binding b = new Binding("Header");
            b.Source = DockedContent;
            SetBinding(Window.TitleProperty, b);
        }
开发者ID:Joxx0r,项目名称:ATF,代码行数:33,代码来源:FloatingWindow.cs

示例3: DockPane

        protected internal DockPane(IDockContent content, FloatWindow floatWindow, bool show)
        {
            if (floatWindow == null)
                throw new ArgumentNullException("floatWindow");

            InternalConstruct(content, DockState.Float, false, Rectangle.Empty, floatWindow.NestedPanes.GetDefaultPreviousPane(this), DockAlignment.Right, 0.5, show);
        }
开发者ID:RasterCode,项目名称:OtterUI,代码行数:7,代码来源:DockPane.cs

示例4: DockPane

 protected internal DockPane(IDockContent content, DockPane previousPane, DockAlignment alignment, double proportion,
                             bool show)
 {
     if (previousPane == null)
         throw (new ArgumentNullException("previousPane"));
     InternalConstruct(content, previousPane.DockState, false, Rectangle.Empty, previousPane, alignment, proportion, show);
 }
开发者ID:Vizzini,项目名称:netgore,代码行数:7,代码来源:DockPane.cs

示例5: Add

		internal int Add(IDockContent content)
		{
			#if DEBUG
			if (DockPane != null)
				throw new InvalidOperationException();
			#endif

			if (Contains(content))
				return IndexOf(content);

			return InnerList.Add(content);
		}
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:12,代码来源:DockContentCollection.cs

示例6: ControlInfo

        public ControlInfo(string name, string description, string id, Sce.Atf.Applications.StandardControlGroup group, object imageKey, IDockContent dockContent, IControlHostClient client)
        {
            Requires.NotNullOrEmpty(id, "id");
            Requires.NotNull(dockContent, "dockContent");
            Requires.NotNull(client, "client");

            DockContent = dockContent;
            dockContent.PropertyChanged += DockContent_PropertyChanged;
            Name = name;
            Description = description;
            Id = id;
            Group = group;
            ImageSourceKey = imageKey;
            Client = client;
        }
开发者ID:vincenthamm,项目名称:ATF,代码行数:15,代码来源:ControlInfo.cs

示例7: AddAt

		internal void AddAt(IDockContent content, IDockContent before)
		{
			#if DEBUG
			if (DockPane != null)
				throw new InvalidOperationException();
			#endif

			if (!Contains(before))
				return;

			if (Contains(content))
				return;

			AddAt(content, IndexOf(before));
		}
开发者ID:Pelsoft,项目名称:fwk_10.3,代码行数:15,代码来源:DockContentCollection.cs

示例8: InternalConstruct

		private void InternalConstruct(IDockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show)
		{
			if (dockState == DockState.Hidden || dockState == DockState.Unknown)
				throw new ArgumentException(Strings.DockPane_SetDockState_InvalidState);

			if (content == null)
				throw new ArgumentNullException(Strings.DockPane_Constructor_NullContent);

			if (content.DockHandler.DockPanel == null)
				throw new ArgumentException(Strings.DockPane_Constructor_NullDockPanel);


			SuspendLayout();
			SetStyle(ControlStyles.Selectable, false);

			m_isFloat = (dockState == DockState.Float);

			m_contents = new DockContentCollection();
			m_displayingContents = new DockContentCollection(this);
			m_dockPanel = content.DockHandler.DockPanel;
			m_dockPanel.AddPane(this);

			m_splitter = new SplitterControl(this);

			m_nestedDockingStatus = new NestedDockingStatus(this);

			m_captionControl = DockPanel.DockPaneCaptionFactory.CreateDockPaneCaption(this);
			m_tabStripControl = DockPanel.DockPaneStripFactory.CreateDockPaneStrip(this);
			Controls.AddRange(new Control[] {	m_captionControl, m_tabStripControl	});
			
			DockPanel.SuspendLayout(true);
			if (flagBounds)
				FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds);
			else if (prevPane != null)
				DockTo(prevPane.NestedPanesContainer, prevPane, alignment, proportion);

			SetDockState(dockState);
			if (show)
				content.DockHandler.Pane = this;
			else if (this.IsFloat)
				content.DockHandler.FloatPane = this;
			else
				content.DockHandler.PanelPane = this;

			ResumeLayout();
			DockPanel.ResumeLayout(true, true);
		}
开发者ID:moljac,项目名称:MonoMobile.SharpSNMP,代码行数:47,代码来源:DockPane.cs

示例9: RemoveContent

 internal void RemoveContent(IDockContent content)
 {
     if (content == null)
         throw(new ArgumentNullException());
     
     if (Contents.Contains(content))
     {
         Contents.Remove(content);
         OnContentRemoved(new DockContentEventArgs(content));
     }
 }
开发者ID:koglth,项目名称:dockpanelsuite,代码行数:11,代码来源:DockPanel.cs

示例10: DocumentsToArray

        public IDockContent[] DocumentsToArray()
        {
            int count = DocumentsCount;
            IDockContent[] documents = new IDockContent[count];
            int i = 0;
            foreach (IDockContent content in Documents)
            {
                documents[i] = content;
                i++;
            }

            return documents;
        }
开发者ID:koglth,项目名称:dockpanelsuite,代码行数:13,代码来源:DockPanel.cs

示例11: CreateTab

 protected override AutoHideStripBase.Tab CreateTab(IDockContent content)
 {
     return new TabVS2003(content);
 }
开发者ID:JavierCabrera,项目名称:dockpanelsuite,代码行数:4,代码来源:VS2003AutoHideStrip.cs

示例12: CreateDockPane

 public DockPane CreateDockPane(IDockContent content, DockPane prevPane, DockAlignment alignment,
                                double proportion, bool show)
 {
     return new DockPane(content, prevPane, alignment, proportion, show);
 }
开发者ID:dockpanelsuite,项目名称:dockpanelsuite,代码行数:5,代码来源:DockPanelExtender.cs

示例13: return

 /// <summary>
 /// Return the content's parent as an IDockLayout</summary>
 /// <param name="content">The docked content whose parent is requested</param>
 /// <returns>The parent as IDockLayout</returns>
 IDockLayout IDockLayout.FindParentLayout(IDockContent content)
 {
     return (content is DockContent && Children.Contains((DockContent)content)) ? this : null;
 }
开发者ID:sbambach,项目名称:ATF,代码行数:8,代码来源:TabLayout.cs

示例14: Dock

 /// <summary>
 /// Dock the new content next to content</summary>
 /// <param name="nextTo">Dock content to add new content next to</param>
 /// <param name="newContent">New content to be docked</param>
 /// <param name="dockTo">Side of nextTo content where new content should be docked</param>
 public void Dock(IDockContent nextTo, IDockContent newContent, DockTo dockTo)
 {
     TabLayout tabLayout = newContent as TabLayout;
     if (tabLayout != null)
     {
         IEnumerator<DockContent> contentEnumerator = tabLayout.Children.GetEnumerator();
         while (contentEnumerator.MoveNext())
         {
             DockContent content = contentEnumerator.Current;
             tabLayout.RemoveItem(content);
             AddOneItem((DockContent)nextTo, content);
             contentEnumerator = tabLayout.Children.GetEnumerator();
         }
     }
     else
     {
         AddOneItem((DockContent)nextTo, newContent as DockContent);
     }
     Focus();
     UpdateLayout();
 }
开发者ID:sbambach,项目名称:ATF,代码行数:26,代码来源:TabLayout.cs

示例15: Undock

 /// <summary>
 /// Undock given content</summary>
 /// <param name="content">Content to undock</param>
 public void Undock(IDockContent content)
 {
     foreach (IDockContent contentItem in Children)
     {
         if (content == contentItem)
         {
             RemoveItem(content as DockContent);
             if (Parent is IDockLayout && Children.Count == 0)
             {
                 ((IDockLayout)Parent).Undock((IDockLayout)this);
             }
             break;
         }
     }
 }
开发者ID:sbambach,项目名称:ATF,代码行数:18,代码来源:TabLayout.cs


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