C#WPF,包含和限制............... [英] C# WPF, contains and bounds ...............

查看:101
本文介绍了C#WPF,包含和限制...............的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道C#中某个对象触摸另一个对象的代码,包含界限,但我不知道C#wpf的代码,有人可以帮忙吗?

I know the code in C# for an object touching another object, contains bounds but i don''t know it for C# wpf, can some one please help?

推荐答案

您可以使用ActualWidth和ActualHeight属性获取元素的大小.然后,您可以比较大小,与C#相同.宽度和高度属性没有用.
You can use the ActualWidth and ActualHeight properties to get the size of elements. Then you can compare sizes, same as C#. The Width and Height properties are useless.


这篇关于C#WPF,包含和限制...............的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆