HorizontalAlignment=Stretch, MaxWidth, and Left aligned at the same time?

前端 未结 8 2428
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 14:47

This seems like it should be easy but I\'m stumped. In WPF, I\'d like a TextBox that stretches to the width of it\'s parent, but only to a maximum width. The problem is that

8条回答
  •  生来不讨喜
    2020-12-04 15:46

    Functionally similar to the accepted answer, but doesn't require the parent element to be specified:

    
    

提交回复
热议问题