Handling null when binding to an Image in XAML

I used x:Null with TargetNullValue, that way you get an easy blank image…

<Image Source="{Binding LogoPath, TargetNullValue={x:Null}}" />

That way you don’t need to mess around with Triggers or BitmapImages as static resources.

Leave a Comment