How can you determine if Control.Visible is set via property or if the value is inherited
Posted
by JDMX
on Stack Overflow
See other posts from Stack Overflow
or by JDMX
Published on 2010-04-16T21:38:28Z
Indexed on
2010/04/16
21:43 UTC
Read the original article
Hit count: 288
I need to find a way to determine if the Visible property of a control is set via a property change or if is inheriting it value from its parent. Using the Reflector, I find that the functions this.GetVisibleCore() and this.GetState() are both internal methods so I cannot call them.
The widgets themselves are created dynamically so I do not want to attach a method to the VisibleChanged event just after the creation of each widget so can try to monitor this property. If I have to, I guess I will but I am looking for something jsut a bit more elegant.
© Stack Overflow or respective owner