diff --git a/CS/DXDockingForLayoutPurposes/MainWindow.xaml b/CS/DXDockingForLayoutPurposes/MainWindow.xaml index f2d4cd1..5598550 100644 --- a/CS/DXDockingForLayoutPurposes/MainWindow.xaml +++ b/CS/DXDockingForLayoutPurposes/MainWindow.xaml @@ -1,4 +1,4 @@ - - - - - + dx:ThemeManager.ThemeName="VS2019Light"> + + @@ -90,11 +87,8 @@ - - - - + diff --git a/CS/DXDockingForLayoutPurposes/MainWindow.xaml.cs b/CS/DXDockingForLayoutPurposes/MainWindow.xaml.cs index 7192e67..111b6cf 100644 --- a/CS/DXDockingForLayoutPurposes/MainWindow.xaml.cs +++ b/CS/DXDockingForLayoutPurposes/MainWindow.xaml.cs @@ -1,31 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -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.Markup; using DevExpress.Xpf.Core; -using DevExpress.Xpf.Ribbon; -using DevExpress.Xpf.Layout.Core; -using DevExpress.Xpf.Docking; -using DevExpress.Xpf.Docking.Base; -using DevExpress.Xpf.Docking.VisualElements; -using DevExpress.Xpf.Grid; -using DevExpress.Xpf.Core.Native; using System.ComponentModel; using System.Collections.ObjectModel; -namespace DXDockingForLayoutPurposes { +namespace DXDockingForLayoutPurposes +{ /// /// Interaction logic for MainWindow.xaml /// - public partial class MainWindow : DXRibbonWindow { + public partial class MainWindow : ThemedWindow { public MainWindow() { InitializeComponent(); DataContext = new DataSource(); diff --git a/Readme.md b/Readme.md index 9320ec8..fe3fcda 100644 --- a/Readme.md +++ b/Readme.md @@ -1,21 +1,28 @@ - -![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/128643681/21.1.5%2B) -[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/E4845) -[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) - - -*Files to look at*: - -* [DockLayoutManagerExt.cs](./CS/DXDockingForLayoutPurposes/DockLayoutManagerExt.cs) (VB: [DockLayoutManagerExt.vb](./VB/vb_DXDockingForLayoutPurposes/DockLayoutManagerExt.vb)) -* [Helpers.cs](./CS/DXDockingForLayoutPurposes/Helpers.cs) (VB: [Helpers.vb](./VB/vb_DXDockingForLayoutPurposes/Helpers.vb)) -* [MainWindow.xaml](./CS/DXDockingForLayoutPurposes/MainWindow.xaml) (VB: [MainWindow.xaml](./VB/vb_DXDockingForLayoutPurposes/MainWindow.xaml)) -* [MainWindow.xaml.cs](./CS/DXDockingForLayoutPurposes/MainWindow.xaml.cs) (VB: [MainWindow.xaml.vb](./VB/vb_DXDockingForLayoutPurposes/MainWindow.xaml.vb)) - -# How to limit LayoutGroup customization at runtime - - -

We have prepared an example demonstrating how to limit LayoutGroup customization at runtime.

To provide this functionality, we created a DockLayoutManager class descendant and the attached DisableCrossingGroupBoundaries property. The DisableCrossingGroupBoundaries property can be attached only to the LayoutGroup.

In this case, the LayoutGroup with the property assigned to true allows any customization and prevents moving inner elements outside LayoutGroup boundaries. For the LayoutGroup without this property, the default logic is used for arranging elements.

- -
- - + +[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/E4845) +[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) + + +# WPF Dock Layout Manager - Limit LayoutGroup Customization at Runtime + +This example limits [LayoutGroup](https://docs.devexpress.com/WPF/DevExpress.Xpf.Docking.LayoutGroup) customization at runtime. + + + +The example contains a [DockLayoutManager](https://docs.devexpress.com/WPF/DevExpress.Xpf.Docking.DockLayoutManager) class descendant and the attached `DisableCrossingGroupBoundaries` property. You can attach the `DisableCrossingGroupBoundaries` property only to the [LayoutGroup](https://docs.devexpress.com/WPF/DevExpress.Xpf.Docking.LayoutGroup). + +In this case, a [LayoutGroup](https://docs.devexpress.com/WPF/DevExpress.Xpf.Docking.LayoutGroup) with the property assigned to `true` allows users to customize the group and prevents them moving inner elements outside [LayoutGroup](https://docs.devexpress.com/WPF/DevExpress.Xpf.Docking.LayoutGroup) boundaries. For the [LayoutGroup](https://docs.devexpress.com/WPF/DevExpress.Xpf.Docking.LayoutGroup) without this property, the default logic is used for arranging elements. + + + +## Files to Look At + +* [DockLayoutManagerExt.cs](./CS/DXDockingForLayoutPurposes/DockLayoutManagerExt.cs) (VB: [DockLayoutManagerExt.vb](./VB/vb_DXDockingForLayoutPurposes/DockLayoutManagerExt.vb)) +* [Helpers.cs](./CS/DXDockingForLayoutPurposes/Helpers.cs) (VB: [Helpers.vb](./VB/vb_DXDockingForLayoutPurposes/Helpers.vb)) +* [MainWindow.xaml](./CS/DXDockingForLayoutPurposes/MainWindow.xaml) (VB: [MainWindow.xaml](./VB/vb_DXDockingForLayoutPurposes/MainWindow.xaml)) +* [MainWindow.xaml.cs](./CS/DXDockingForLayoutPurposes/MainWindow.xaml.cs) (VB: [MainWindow.xaml.vb](./VB/vb_DXDockingForLayoutPurposes/MainWindow.xaml.vb)) + + +## Documentation + +- [Runtime Layout Customization](http://docs.devexpress.devx/WPF/7222/)