Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

IDataErroInfo not displaying as tool tip

$
0
0

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


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>