属性向控件及其父级指示
问:
最近,我询问了一个有关设置 (Visible
) 属性的问题,当我将其设置为 true 时,我在将其设置为 true 后跟踪时感到惊讶。它的值仍然是 false。答案对我来说是一个惊喜:
- "The Visible property has a special
property: when you read the value it
not only reports on the control
itself but also on it's parent. The
value you get is the "real"
visibility."
我的问题是:是否有任何属性,您之前遇到的行为方式与(Visible
)相同?我们应该如何最好地使用它们?
Q:
Lately,i asked about an issue concerning setting the (Visible
)property ,when i set it to true , i surprised in tracing after setting it to true.that its value is still false. the answer was a surprise for me :
- "The Visible property has a special
property: when you read the value it
not only reports on the control
itself but also on it's parent. The
value you get is the "real"
visibility."
My question is : is there any property, you meet before behave in the same manner like (Visible
)? and how we should use them in the best way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,我不知道,尝试这个查询:
您只需要编写
HasBehaviourLikeVisibleProperty
方法。注意:您可能需要反射才能获取所有属性。 (查看此处以获取属性)
Hmm, I don't know, try this query:
You just need to write
HasBehaviourLikeVisibleProperty
method.Note: You might need reflection to get all properties. (Have a look here to get properties)
Enabled 可以是这种方式的一个属性。
Enabled could be one property in this fashion.