WPF AvalonDock拖拽布局学习整理

AvalonDock提供了一个系统,允许开发人员使用类似于许多流行的集成开发环境(IDE)中的窗口对接系统来创建可自定义的布局。

AvalonDock遵循MVVM设计。ModelXceed.Wpf.AvalonDock.Layout命名空间中包含的类表示。此命名空间中的类是布局模型中的布局元素(例如LayoutAnchorable / LayoutDocumentLayoutAnchorablePane / LayoutDocumentPaneLayoutAnchorablePaneGroup / LayoutDocumentPaneGroup等),它们直接在DockingManager中的XAML中使用,以描述布局的组成方式。

  • DockingManager
  • 布局模型类

WPF AvalonDock拖拽布局学习整理_第1张图片

以下示例显示如何在DockingManager中设置各种布局元素。

                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

                 xmlns:local="clr-namespace:LiveExplorer"

                 xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"

                 xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"

                 xmlns:s="clr-namespace:System;assembly=mscorlib">

  

     

        

        

     

 

     

        

        

           

           

              

                 

              

           

           

               

                 

              

           

           

              

                 

              

           

        

     

 

     

                           AllowMixedOrientation="True"

                           BorderBrush="Black"

                           BorderThickness="1"

                           Theme="{Binding ElementName=_themeCombo, Path=SelectedItem.Tag}">

        

           

              

                 

                 

              

           

        

        

           

              

                 

                                            AutoHideWidth="240"

                                         IconSource="../Images/property-blue.png">

                    

                        SelectedObject="{Binding ElementName=_layoutRoot, Path=LastFocusedDocument.Content}"/>

                 

              

              

                  

                    

                          

你可能感兴趣的:(WPF)