Hi,
we have a rather odd requirement: The visibility of any control in our WPF-Application is to be driven by a database-table.
That means we have a table which stores the name of the element and its visiblity.
Now I am looking for an elegant way to implement this feature on the client side.
I could create my own UserControl and inherit from it everywhere, providing a InitializeComponent Template Method. But what if someone programmatically adds more childcontrols?
I don't want my controls to know about this mechanism at all. I want to hook in/intercept at a certain point (pre control-rendering) and adjust the visibility of the control according to the database.
Is that somehow possible? And if not, how would you design it?