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

How to have different groups or do nested condition checking using MultiDataTrigger.Conditions

$
0
0

I want to be able to do something like.

<MultiDataTrigger>
     <MultiDataTrigger.Conditions>


      
<Condition Binding="{Binding CheckGroup1}" Value=true>           Value="false" />
<Condition Binding="{Binding ElementName=txtbox1, Path=(Validation.HasError)}"
           Value="false" />
      <Condition Binding="{Binding ElementName=txtbox2, Path=(Validation.HasError)}"
           Value="false" />
</Condition>

  
<Condition Binding="{Binding CheckGroup2}" Value=true> 
    <Condition Binding="{Binding ElementName=txtbox3, Path=(Validation.HasError)}"
           Value="false" />
      <Condition Binding="{Binding ElementName=txtbox4, Path=(Validation.HasError)}"
           Value="false" />
<Condition>

So I ewant to check txtbox1 and txtbox2 only if CheckGroup1 boolean property is true.

Similarly I want to check txtbox3 and txtbox4 only if CheckGroup2 is true.

Please help


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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