Skip to main content
A newer version of this page is available. .
All docs
V23.1

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.v23.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public static bool EnableSnapLayouts { get; set; }

Property Value

Type Default Description
Boolean true

true to enable snap layouts; otherwise, false.

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

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:

static App()
{
    ThemedWindow.EnableSnapLayouts = false;
}

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.

See Also