Ok - so I wanted to change the cursor to a HAND if you hover over a textblock that has a tooltip that is not null.
From what I've read on the interweb condition's can only be done on EQUAL. NOT EQUAL is not an option.
After struggling with this I came up with a workaround - although it seems a bit of a hack.
The above XAML changes the CURSOR to a HAND on IsMouseOver - and then the MultiTrigger.Condition changes is BACK to an ARROW if the ToolTip is null.
This actually works - which surprised me. I thought it would error out with conflicting triggers.
Any other way to do this? Is this actually acceptable?
From what I've read on the interweb condition's can only be done on EQUAL. NOT EQUAL is not an option.
After struggling with this I came up with a workaround - although it seems a bit of a hack.
Code:
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
<Condition Property="Control.ToolTip" Value="{x:Null}"/>
</MultiTrigger.Conditions>
<MultiTrigger.Setters>
<Setter Property="Cursor" Value="Arrow" />
</MultiTrigger.Setters>
</MultiTrigger>
</Style.Triggers>
This actually works - which surprised me. I thought it would error out with conflicting triggers.
Any other way to do this? Is this actually acceptable?