• 大小: 0.56M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-05-02
  • 语言: C#
  • 标签: window  Dock  wpf  C#  dark  

资源简介

wpf Dock window 

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DockingLibrary
{
    /// 
    /// Rappresents a content embeddable in a dockable pane or in a documents pane
    /// 

    public class DockableContent : ManagedContent
    {
        public DockableContent(DockManager manager) : base(manager)
        {
        }

        public DockableContent() { }

        

        /// 
        /// Show this content
        /// 

        /// Show this content in a dockable pane. If no pane was previuosly created it creates a new one with default right dock. 
        public override void Show()
        {
            if (ContainerPane != null)
            {
                ContainerPane.Show(this);
                //ContainerPane.Show();
            }
            else
                Show(Dock.Right);
        }

        /// 
        /// Show this content
        /// 

        /// Show this content in a dockable pane. If no pane was previuosly created it creates a new one with passed initial dock. 
        public void Show(Dock dock)
        {
            if (ContainerPane == null)
            {
                _containerPane = new DockablePane(DockManager dock);
                //_containerPane.DockManager = DockManager;
                _containerPane.Add(this);
                _containerPane.Show();
                //DockManager.Add(this);
                DockManager.Add(_containerPane as DockablePane);
            }
            else
            {
                ContainerPane.Show(this);
                ContainerPane.Show();
            }
        }

        /// 
        /// Show content into default documents pane
        /// 

        public void ShowAsDocument()
        {
            if (ContainerPane == null)
                _containerPane = DockManager.AddDocument(this);

            ContainerPane.Show(this);
        }

        /// 
        /// Hides content from container pane
        /// 

        /// If container pane doesn‘t contain any more content it is automaticly hidden.
        public virtual new void Hide()
        {
            ContainerPane.Hide(this);
        }


        public virtual void ChangeDock(Dock dock)
        { 
        
        }

        public virtual void Float()
        { 
        
        }

        public virtual void AutoHide()
        { 
        
        }

        /// 
        /// Set/get content title whish is shown at top of dockable panes and in tab items
        /// 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.    229376  2020-12-22 15:09  DockingLibrary\.vs\DockingLibrary\v16\.suo

     文件       3293  2007-07-08 18:22  DockingLibrary\Backup\DockingLibrary\DockableContent.cs

     文件       2145  2007-06-06 16:17  DockingLibrary\Backup\DockingLibrary\DockableContentTabItemsPanel.cs

     文件      15057  2007-06-19 23:47  DockingLibrary\Backup\DockingLibrary\DockablePane.xaml

     文件      31580  2007-07-08 18:18  DockingLibrary\Backup\DockingLibrary\DockablePane.xaml.cs

     文件      29165  2007-07-07 14:37  DockingLibrary\Backup\DockingLibrary\DockablePaneGroup.cs

     文件       3809  2007-05-23 17:34  DockingLibrary\Backup\DockingLibrary\DockingButton.cs

     文件        289  2007-05-23 10:55  DockingLibrary\Backup\DockingLibrary\DockingButtonGroup.cs

     文件        252  2007-05-27 23:58  DockingLibrary\Backup\DockingLibrary\DockingGrid.xaml

     文件       8490  2007-07-08 17:59  DockingLibrary\Backup\DockingLibrary\DockingGrid.xaml.cs

     文件       5517  2007-06-22 22:33  DockingLibrary\Backup\DockingLibrary\DockingLibrary.csproj

     文件       2758  2007-05-24 23:19  DockingLibrary\Backup\DockingLibrary\DockManager.xaml

     文件      32336  2007-07-08 17:55  DockingLibrary\Backup\DockingLibrary\DockManager.xaml.cs

     文件       4769  2007-05-23 16:29  DockingLibrary\Backup\DockingLibrary\DockPanelSplitter.cs

     文件        682  2007-06-09 15:31  DockingLibrary\Backup\DockingLibrary\DocumentContent.cs

     文件       5984  2007-06-14 17:00  DockingLibrary\Backup\DockingLibrary\DocumentsPane.xaml

     文件       8899  2007-07-08 18:23  DockingLibrary\Backup\DockingLibrary\DocumentsPane.xaml.cs

     文件       4204  2007-07-08 17:55  DockingLibrary\Backup\DockingLibrary\DragPaneServices.cs

     文件        354  2007-06-04 22:54  DockingLibrary\Backup\DockingLibrary\FloatingWindow.xaml

     文件       5160  2007-07-16 19:36  DockingLibrary\Backup\DockingLibrary\FloatingWindow.xaml.cs

     文件       3455  2007-07-16 19:24  DockingLibrary\Backup\DockingLibrary\FloatingWindowHostedPane.cs

     文件        530  2007-05-24 23:05  DockingLibrary\Backup\DockingLibrary\IDropSurface.cs

     文件        427  2007-07-08 17:41  DockingLibrary\Backup\DockingLibrary\ILayoutSerializable.cs

     文件       1069  2007-06-07 13:17  DockingLibrary\Backup\DockingLibrary\ManagedContent.cs

     文件       1418  2007-07-07 14:37  DockingLibrary\Backup\DockingLibrary\OverlayDockablePane.cs

     文件       6569  2007-06-06 13:01  DockingLibrary\Backup\DockingLibrary\OverlayWindow.xaml

     文件       7479  2007-07-07 14:26  DockingLibrary\Backup\DockingLibrary\OverlayWindow.xaml.cs

     文件       5779  2007-07-08 18:12  DockingLibrary\Backup\DockingLibrary\Pane.cs

     文件       2432  2007-06-06 14:54  DockingLibrary\Backup\DockingLibrary\Properties\AssemblyInfo.cs

     文件       3063  2007-05-19 00:59  DockingLibrary\Backup\DockingLibrary\Properties\Resources.Designer.cs

............此处省略292个文件信息

评论

共有 条评论