Was wondering if anyone may be able to help with this. Im new to the design side of silverlight and cant figure out why applying a style to a textbox caused the data annotations to stop working.
I actually got this style from one of the Telerik demos and i really like it...hoping i can still use it!
i tried the obvious of removing this or that but couldnt figure it out. the data annotations (validation in the setters) do not fire once it is applied
<Style x:Key="DefaultTextBoxStyle" TargetType="TextBox">
<Setter Property="FontSize" Value="11" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Grid x:Name="RootElement">
<vsm:VisualStateManager.VisualStateGroups>
<vsm:VisualStateGroup x:Name="CommonStates">
<vsm:VisualState x:Name="Normal" />
<vsm:VisualState x:Name="MouseOver" />
<vsm:VisualState x:Name="Disabled" />
<vsm:VisualState x:Name="ReadOnly">
<Storyboard>
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="ReadOnlyVisualElement"
Storyboard.TargetProperty="Opacity">
<SplineDoubleKeyFrame KeyTime="0" Value="1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
</vsm:VisualStateGroup>
<vsm:VisualStateGroup x:Name="FocusStates">
<vsm:VisualState x:Name="Focused" />
<vsm:VisualState x:Name="Unfocused" />
</vsm:VisualStateGroup>
</vsm:VisualStateManager.VisualStateGroups>
<Grid>
<Border x:Name="ReadOnlyVisualElement" Opacity="0"
Background="#72F7F7F7" />
<Border BorderBrush="#FF017FDD" BorderThickness="1,1,1,1"
CornerRadius="4,4,4,4">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF032C58" />
<GradientStop Color="#FF032854" Offset="0.61699998378753662" />
<GradientStop Color="#FF072449" Offset="1" />
</LinearGradientBrush>
</Border.Background>
<ScrollViewer x:Name="ContentElement" BorderThickness="0"
IsTabStop="False" Padding="{TemplateBinding Padding}" />
</Border>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>