Search code examples
wpfvisibilityvisual-tree

Actual Visibility in WPF


In WPF an element can have a Visibility of "Visible", but not be actually visible on the screen because it's parent (or parent of parent) has Visibility of Collapsed.

I want to be able to know if a element is actually rendered on the screen, without having to traverse up the visual tree checking parents.

Does anyone know of a way to accomplish this?

Thanks in advance!


Solution

  • I'm not sure where you are intending to check this but you can use the IsVisible property.