Non-resizable windows with windowStyle=None

.net, c#, window, wpf

Solution

Probably you can get desired result by: ResizeMode= XAML object property which can take have following states:

- NoResize - A window cannot be resized. The Minimize and Maximize buttons are not displayed in the title bar.

- CanMinimize - A window can only be minimized and restored. The Minimize and Maximize buttons are both shown, but only the Minimize button is enabled.

- CanResize - A window can be resized. The Minimize and Maximize buttons are both shown and enabled.

- CanResizeWithGrip - A window can be resized. The Minimize and Maximize buttons are both shown and enabled. A resize grip appears in the bottom-right corner of the window.

Problem

Basically, I want to create a window that looks like the following: alt text http://www.thex9.net/screenshots/2009-10-15_1347.png However, the window shouldn't be resizable (the one in the screenshot is) but must retain the glass border. The XAML for the window in the screenshot is as follows: ``` <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="WpfApplication1.MainWindow" x:Name="Window" Title="MainWindow" WindowStyle="None"> <Grid x:Name="LayoutRoot"/> </Window> ``` Is it possible to create a window which looks similar to the one in my screenshot but is not resizable? Any help would be very much appreciated.

Original source

Related problems