TextBoxValidationExtensions binding for (In)ValidBrush

Jul 6, 2012 at 8:51 PM

Style="{StaticResource Input}"
Watermark="Rule Name..."
xyzc:TextBoxValidationExtensions.ValidBrush="{Binding ValidColor}"


When I try using binding as above I always get the default of light red and white. When I change to using:

TextBoxValidationExtensions.SetValidBrush(ruleName, new SolidColorBrush(value));

The value given (from Windows.UI.Colors) actually shows up in the UI.

Valid color was just a basic property of the class in the .xaml.cs class backing onto this .xaml page that had the above snippet.






Jul 13, 2012 at 10:13 PM

Is ValidColor a Color type or a Brush type? It would not convert a color to a brush automatically.