Given Silverlight TabItem, determine if there are any visible PropertyStatus controls

Given Silverlight TabItem, determine if there are any visible PropertyStatus controls

Old forum URL: forums.lhotka.net/forums/t/7156.aspx


skagen00 posted on Tuesday, June 23, 2009

My goal is to provide a button to go to the first error preventing the user from saving an object (in place of the save button, there'll be a save button with a bit of a red exclamation on it).

My main record entry involves a tabcontrol, and I'd like to hop through each tabitem and basically drill down and determine if there are any visible CSLA property status controls.

Once I hit the user control, I think my options really disappear in terms of drilling into the object. UserControl's content property is not publicly accessible.

An option that I've considered is to introduce a base usercontrol class to provide for some sort of an "IsErrorShown" method, but I'd rather not introduce a base usercontrol class for all my usercontrol objects unless I need to.

An interface would seem to require me to implement the same sort of code in every UserControl.

Any good ideas or am I looking something obvious?

Copyright (c) Marimer LLC