DateTimePicker Validation Error Block Calendar Button

I had a lot of user complaints about the tooltip for the DateTime Picker for Silverlight showing the error tooltip over the Calendar button. It made it so that it was next to impossible to actually select a date, since you couldn’t click the button.

I opened the DateTimePicker template and voila! The tard who made such a nice control set the error template to sit next to the TextBox instead of the Button.

Simple fix. Just generate the  DateTimePicker template (Expression Blend) and change the following section:
i.e. Search for ToolTipService.ToolTip

<ToolTip x:Name="validationTooltip" Template="{StaticResource CommonValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding ElementName=Button}" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
<EventTrigger RoutedEvent="Canvas.Loaded">
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
<DiscreteObjectKeyFrame KeyTime="0">

Using Change the above to Button instead of TextBox. Super easy!

Happy Coding!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.