Like PropertyNumber와 OwnerNumber 조합과 같이 조합하여 유효성을 검사 할 수있는 방법은 데이터베이스에 존재해서는 안됩니다. 지금은 IDataErrorInfo
을 사용하고 있지만 한 번에 하나의 값만 유효성을 검사합니다.두 개의 다른 텍스트 상자에서 값의 조합을 확인하는 방법은 무엇입니까?
<Label DockPanel.Dock="Top" Width="Auto" Height="16"/>
<TextBox Name="PropertyNumber" DockPanel.Dock="Top" Text="{Binding
UpdateSourceTrigger=PropertyChanged, Mode=TwoWay, Path=SelectedPropertyNumber,
ValidatesOnDataErrors=True}" Width="115" Height="22"
HorizontalAlignment="Left" IsEnabled="{Binding
PropertyNumbersEnabled,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" />
<Label DockPanel.Dock="Top" Width="Auto" Height="16"/>
<TextBox Name="OwnerNumber" Text="{Binding BindingGroupName=NGLDataFormGrp,
Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True,
Path=OwnerNumber}" DockPanel.Dock="Top" HorizontalAlignment="Left"
Width="115" Height="22" IsEnabled="{Binding
UpdateSourceTrigger=PropertyChanged,
Path=OwnerNumberEnabled, Mode=TwoWay}"/>
IdataError를 사용하여 어떻게 검증하고 있습니까? 최상의 솔루션을 제공하는 데 도움이되는 코드를 게시하십시오. – Bathineni