Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to know child control visibility change at parent control level.

$
0
0

Hi

I Have a Grid in my WPF client application and have so many(approx 100) child controls in it. My child controls visibility is binded to properties in Viewmodel. the visibility of controls can be changed from server.

If any controls Visibility is changed(either Hidden or Visible) i need to do some thing. I can do it by handling at each child control, but it doesn't sounds good to do.

Is there any generic way of doing this? Mean Handling the visibility change event of child controls at the Parent (here parent is Grid) level.

I have searched and got some thing called "LAYOUT UPDATED EVENT" which will be called when layout is updated, but i am not able to know which control property is changed as sender will be always null.

I want similar event where i can get the information about the control which has been changed.


Please mark the post as answer if it is helpfull to you - Hiran Repakula


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>