How add dynamically Validation.Error = "ValidationErrorHandler" in C#

example XAML:

<Grid VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="grid1" Validation.Error="ValidationErrorHandler" >


thanks