Is there a way to set an invalid default silverlight control state in a user control?

I am making a fairly simple user control that combines only a few other default controls along with some user logic.

Errors from the INotifyDataError interfaces do not appear on my control. As far as I can see, the generally accepted practice of displaying validation errors on a user control is to implement several visual states on it and switch them when receiving associated data.

But to be honest, I hate working with this stuff and part of the whole interface.

Is there a way to display the default rectangular invalid state around the square content? For example, it would be great to inherit from such a control or use it as lead content with switchable states.

+3
source share
1 answer

Have you looked at the control DataFormfrom the Silverlight Toolkit? You can place your own custom control layout in EditTemplate.

In addition, you may be lucky with the static method VisualStateManager.GoToState(Control control, string stateName, bool useTransitions).

+1
source

All Articles