What is the best way to stop a user from resizing the top-level window of an application written in WPF?

Thomas Bratt picture Thomas Bratt · Nov 10, 2008 · Viewed 21.7k times · Source

What is the best way to stop a user from resizing the top-level window of an application written in WPF?

Answer

Todd White picture Todd White · Nov 10, 2008

You will want to use the ResizeMode.NoResize on the window.

<Window x:Class="WpfApplication5.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    ResizeMode="NoResize">
</Window>