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.
在 WPF 中,元素可以具有“可见性”的可见性,但实际上在屏幕上不可见,因为它的父级(或父级的父级)具有折叠的可见性。
我希望能够知道元素是否实际呈现在屏幕上,而不必遍历可视化树检查父级。
有谁知道实现这一目标的方法?
提前致谢!
我不确定您打算在哪里进行检查,但您可以使用IsVisible属性。