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

How to dynamically disable validation when the control is hidden or diisabled?

$
0
0

How to dynamically disable validation when the control is hidden or diisabled?Again I want to enable the validation when the control is visible and enabled.?

The Xaml looks like 

<TextBox x:Name="txtDuplicationCount"
Grid.Column="1"
Text="{Binding ObjProductionWellModel.DuplicationCount,UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=true, NotifyOnValidationError=true,Mode=TwoWay}"
ToolTip="{VRange.InfoDuplicationCount}"
TabIndex="9"   >

In the above code ValidatesOnDataErrors and NotifyOnValidationError are statically set to true.
I want to change them at runtime.
I tried to use binding on ValidatesOnDataErrors and NotifyOnValidationError but it doesn't work.
Please help.

Regards,
Rajesh

 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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