WPF Window - Only allow horizontal resize

后端 未结 8 1096
一生所求
一生所求 2021-01-03 23:02

I want to only allow my WPF window to be resized horizontally. How best can I achieve this?

8条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-03 23:41

    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:

    To allow automatic content sizing don't use the Loaded event. Use the ContentRendered event instead.

提交回复
热议问题