更新时间:2023-10-07 18:37:40
我确定这是一个重复的问题,但我找不到答案相同的问题.
I'm sure this is a duplicate, but I can't find a question with the same answer.
将 HorizontalContentAlignment="Stretch"
添加到您的列表框.这应该够了吧.请小心使用自动完成功能,因为很容易错误地获取 HorizontalAlignment
.
Add HorizontalContentAlignment="Stretch"
to your ListBox. That should do the trick. Just be careful with auto-complete because it is so easy to get HorizontalAlignment
by mistake.