How do you keep the WPF window sized to content with an Expander after resize

前端 未结 5 546
伪装坚强ぢ
伪装坚强ぢ 2021-01-31 14:07

I\'ve got a WPF window with SizeToContent=\"Height\". This window contains an that displays a list of recent activity. What I\'d lik

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 14:40

    As I discovered in my question, setting the Height to Double.NaN causes it to reset to SizeToContent happiness. I don't know if it will remember the size of your expander though. You might try Kent's Resizer control to move the sizing behavior to the expander rather than the containing window.

提交回复
热议问题