ThemedWindow.EnableSnapLayouts Property
Gets or sets whether the snap layouts functionality is enabled for windows in the current application.
Namespace: DevExpress.Xpf.Core
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | true |
|
Remarks
Snap layouts allow users to arrange multiple windows on their desktops. Users can access the snap layouts menu by hovering over a window’s maximize button or by pressing the Windows key + Z. In the menu, users can click on a zone to snap a window to that area and then use Snap Assist to complete the entire layout.
Note
The snap layouts feature is available for any window on Windows 11.
The image below illustrates the snap layouts feature:
Snap layouts are automatically enabled for each ThemedWindow in your app. Menu behavior and appearance are determined by the Operating System (you cannot customize these menus). However, you can enable/disable snap layouts for the entire app or for a specific window.
Set the static EnableSnapLayouts
property to false
to disable snap layouts for the entire app. Place that code into the static constructor of the App class:
If you want to enable snap layouts for a specific element, set the attached WindowChromeHelper.IsSnapLayoutsElement property to true
:
<Button Content="Button" dx:WindowChromeHelper.IsSnapLayoutsElement="True"/>
In this case, the snap layouts menu appears when users hover over the specified button.
If you want to disable snap layouts for a specific element, set the attached WindowChromeHelper.DisableSnapLayouts property to true
:
<Button Content="Button" dx:WindowChromeHelper.DisableSnapLayouts="True"/>
If you disable snap layouts for a specific window, you also disable the feature for its child windows. However, the snap layouts menu of other windows is still available for users.