How to trigger an action in WPF when the Property is not null? This is a working solution when is null:
You can use DataTrigger
class in Microsoft.Expression.Interactions.dll that come with Expression Blend.
Code Sample:
Using this method you can trigger against GreaterThan
and LessThan
too.
In order to use this code you should reference two dll's:
System.Windows.Interactivity.dll
Microsoft.Expression.Interactions.dll
And add the corresponding namespaces:
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ie="http://schemas.microsoft.com/expression/2010/interactions"