views:

103

answers:

1

I want the Role to be either TopLevelHeader OR TopLevelItem as well as IsPressed. Is this possible without specifying two MultiTriggers?

<MultiTrigger>

  <MultiTrigger.Conditions>

  <!--  IsPressed -->
  <Condition Property="IsPressed" Value="True"/>
  <Condition Property="Role" Value="TopLevelHeader"/>

  </MultiTrigger.Conditions>

    <Setter TargetName="Border" Property="Background" .../>

</MultiTrigger>

TIA

+2  A: 

Charlie Robbins has posted an article on How to use a MultiTrigger with an "or" condition:

MultiTrigger (and MultiDataTrigger) both take have a property called 'Conditions' of type ConditionCollection. Each Condition object within these ConditionCollections can be used in one of two ways:

  1. You can set the Property and Value properties to setup an ordinary property condition.
  2. You can set the Binding and Value properties to setup a data condition.

Now if you want to accomplish an or condition in either case you will actually use a MultiDataTrigger. The gotcha here is that we can use the Binding property of the Condition class in conjunction with a MultiValueConverter to get the desired behavior... read more

He's posted a sample solution as well.

Metro Smurf
Thank you Metro Smurf!
Brad
I managed to get it to work but I'm a little hesitant to implement it in fear of the fallout from maintenance monkeys. Wait, that's me. To hell with me, it's going in! <g> Thanks Again
Brad
As a fellow maintenance monkey, err smurf, I fling my little blue poo at you! :P
Metro Smurf