WPF Window - Only allow horizontal resize
问题 I want to only allow my WPF window to be resized horizontally. How best can I achieve this? 回答1: If you set the MinHeight and MaxHeight attributes of the window to the desired height the window will have a fixed height 回答2: If you want to use the MinHeight and MaxHeight approach but still allow the window to automatically size itself to fit the size of its content: <Window x:Class="MyWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft