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


C# DockablePane.RemoveContent方法代码示例

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


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

示例1: DropInto

        internal void DropInto(DockablePane paneDragged, DockablePane paneToDropInto)
        {
            //transfer tha contents of dragged pane (conatined in a FloatingWindow)
            //to the pane which user select, taking care of setting contents state
            //to Dock (using Dock() method of class DockablePane).
            while (paneDragged.Items.Count > 0)
            {
                ManagedContent contentToTransfer = paneDragged.RemoveContent(0);
                paneToDropInto.Items.Add(contentToTransfer);

                DockableContent dockContentToTransfer = contentToTransfer as DockableContent;

                if (dockContentToTransfer != null)
                    dockContentToTransfer.SetStateToDock();
            }

            paneToDropInto.SelectedIndex = paneToDropInto.Items.Count - 1;
            //paneToDropInto.Focus();
        }
开发者ID:alexcepoi,项目名称:ShareTabWin,代码行数:19,代码来源:DockingManager.cs

示例2: DockableFloatingWindow

        public DockableFloatingWindow(DockingManager manager, DockablePane dockablePane)
            : this(manager)
        {
            //create a new temporary pane
            FloatingDockablePane pane = new FloatingDockablePane(this);

            //setup window size
            ManagedContent selectedContent = dockablePane.SelectedItem as ManagedContent;

            if (selectedContent != null && selectedContent.FloatingWindowSize.IsEmpty)
                selectedContent.FloatingWindowSize = new Size(dockablePane.ActualWidth, dockablePane.ActualHeight);

            if (selectedContent != null)
            {
                Width = selectedContent.FloatingWindowSize.Width;
                Height = selectedContent.FloatingWindowSize.Height;
                this.ResizeMode = selectedContent.FloatingResizeMode;
            }
            else
            {
                Width = dockablePane.ActualWidth;
                Height = dockablePane.ActualHeight;
            }

            //transfer the style from the original dockablepane
            pane.Style = dockablePane.Style;

            //Width = dockablePane.ActualWidth;
            //Height = dockablePane.ActualHeight;

            ////save current content position in container pane
            //pane.SetValue(ResizingPanel.ResizeWidthProperty, dockablePane.GetValue(ResizingPanel.ResizeWidthProperty));
            //pane.SetValue(ResizingPanel.ResizeHeightProperty, dockablePane.GetValue(ResizingPanel.ResizeHeightProperty));

            int selectedIndex = dockablePane.SelectedIndex;

            //remove contents from container pane and insert in hosted pane
            while (dockablePane.Items.Count > 0)
            {
                ManagedContent content = dockablePane.RemoveContent(0);

                //add content to my temporary pane
                pane.Items.Add(content);
            }

            //let templates access this pane
            HostedPane = pane;
            HostedPane.SelectedIndex = selectedIndex;

            //Change state on contents
            IsDockableWindow = true;
        }
开发者ID:Reticulatas,项目名称:AvalonDock,代码行数:52,代码来源:DockableFloatingWindow.cs


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