WPF 是否可以Label
自动将自身拆分为几行?在下面的示例中,文本在右侧被裁剪。
<Window x:Class="..." xmlns="..." xmlns:x="..." Height="300" Width="300">
<Grid>
<Label>
`_Twas brillig, and the slithy toves did gyre and gimble in the wabe:
all mimsy were the borogoves, and the mome raths outgrabe.
</Label>
</Grid>
</Window>
难道我做错了什么?
不幸的是,采用其他控件不是一个好的选择,因为我需要访问密钥的支持。
将 替换Label
为TextBlock
(have TextWrapping="Wrap"
),并调整其控制模板以识别访问键可能是一种解决方案,但这不是矫枉过正吗?
编辑:标签的非标准样式会破坏蒙皮,所以如果可能的话,我想避免它。