Articles in this section
Category / Section

How to enable Windows Docking for WPF ChromelessWindow?

1 min read

To enable the WPF ChromelessWindow to dock to the Windows screen, set the UseNativeChrome to true. When the UseNativeChrome property is set, the ChromelessWindow behaves in the same way as the normal Window and can be docked to the left or right. It also enables the maximization of the window when the window is docked to the top of the screen.

The following code example demonstrates how to set the UseNativeChrome from code-behind and XAML.

XAML

<syncfusion:ChromelessWindow x:Class="ChromelessWindow_118877.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
        Title="MainWindow" Height="350" Width="525" UseNativeChrome="True">
    <Grid>       
    </Grid>
</syncfusion:ChromelessWindow>

C#

public partial class MainWindow : ChromelessWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            this.UseNativeChrome = true;
        }
    }

 

To arrange the windows side by side,

  1. Drag the title bar of a window to the left or right side of the screen until an outline of the expanded window appears.
  2. Release the mouse to expand the window.
  3. Repeat steps 1 and 2 with another window to arrange the windows side by side.

To return the window to its original size, drag the title bar away from the top of the desktop and then release.

Keyboard gestures:

To snap an active window to the side of the desktop by using the keyboard, press either the ‌Windows logo key Picture of Windows logo key+Left Arrow or‌ Windows logo key Picture of Windows logo key+Right Arrow.

 

The following screenshots illustrate the windows docking of the ChromelessWindow.

Figure 1: ChromelesWindow maximizes when docked to the top of the Screen

Figure 2: Docking the ChromelessWindow to the right side

Figure 3: Two ChromelessWindows snapped side by side



Conclusion

I hope you enjoyed learning on how to enable Windows Docking for WPF ChromelessWindow.

You can refer to our WPF Chromless Window feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WPF Chromless Window example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!



Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied