Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是一个简单的问题:
我如何获得Widtha TextBlock?
Width
TextBlock
在 XAML 中,其宽度TextBlock设置为 Auto。
我如何通过代码获得Width这个?TextBlock
使用ActualWidth物业
ActualWidth
只需使用该属性
TextBlock.ActualWidth