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

前端 未结 8 2400
隐瞒了意图╮
隐瞒了意图╮ 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条回答
  •  萌比男神i
    2020-12-04 15:48

    In my case I had to put textbox into a stack panel in order to stretch textbox on left side. Thanks to previous post. Just for an example I did set a background color to see what’s happens when window size is changing.

    
        
        
    
    

提交回复
热议问题