如何计算应用控件的缩放变换的大小
如何计算WPF中缩放变换应用控件的增加的宽度和高度?
How to calculate increased width and height of the scale transform applied control in WPF?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何计算WPF中缩放变换应用控件的增加的宽度和高度?
How to calculate increased width and height of the scale transform applied control in WPF?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以使用
ActualHeight
和ActualWidth
属性。它们返回控件的真实值,而不是您请求的值。尽管这是呈现控件之后的值。如果您想知道高度和宽度,那么您可以将转换应用于请求大小,但这些可能与实际值不匹配。
MSDN 有更多信息。
You can use the
ActualHeight
andActualWidth
properties. These return the true values of the controls, not the values you have requested. Though this is the value after the control has been rendered.If you want to know what the height and width will be then you could apply your transformation to the request sizes, but these might not match what the actual values will be.
The MSDN has more information.