Quantcast
Viewing all articles
Browse latest Browse all 18858

IDataErroInfo not displaying as tool tip

hi,

My problem is error is not displaying as tool tip but display in ContentPresenter! Both codes are given below.


//this is working fine.

<ContentPresenter Grid.Row="1" Grid.Column="2" Content="{Binding ElementName=txtCd, Path=(Validation.Errors).CurrentItem.ErrorContent}" />

//but this code is not working 

<Style x:Key="EntryText" TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" /> </Trigger> </Style.Triggers> </Style>

<TextBox x:Name="txtCd" Grid.Column="1" Grid.Row="1" Height="25" Width="150" HorizontalAlignment="Left" Text="{Binding CurrentPost.Cd,ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource EntryText}"/>


Looking for a solution, thanks in advance.




Viewing all articles
Browse latest Browse all 18858

Trending Articles