How to stretch in width a WPF user control to its window?

后端 未结 7 1757
执念已碎
执念已碎 2021-01-31 14:52

I have a Window with my user control and I would like to make usercontrol width equals window width. How to do that?

The user control is a horizontal menu and contains a

相关标签:
7条回答
  • 2021-01-31 15:26

    Instead use Width and Height in user controls, use MinHeight and MinWidth. Then you can configure the UC well, and will be able to stretch inside other window.

    Well, as Im seeing in WPF Microsoft made a re-thinking about windows properties and behaviors, but so far, I didn't miss anything from olds windows forms, in WPF the controls are there, but in a new point of view.

    0 讨论(0)
提交回复
热议问题