I want to only allow my WPF window to be resized horizontally. How best can I achieve this?
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:
In code-behind:
private void window_Loaded(object sender, RoutedEventArgs e)
{
this.MinWidth = this.ActualWidth;
this.MinHeight = this.ActualHeight;
this.MaxHeight = this.ActualHeight;
}