Hopefully I phrased the question correctly. If not, let me explain. I want to bind an Image element's Source property to a the ImageUrl property of my DataContext object. Here is the XAML:
<Image
x:Name="EmployeeImage"
Grid.Column="0"
Grid.Row="0"
Grid.RowSpan="2"
Source="{Binding Path=ImageUrl}"
Stretch="UniformToFill">
</Image>
Obviously I can just perform the binding in code-behind and perform any checks there, but is there a way to declaratively provide an alternative Url for the image source if the ImageUrl property is null or empty?
Edit: I added a converter which checks the ImageUrl and returns a default path if it is null or empty. If there is another way, I'm interested to hear it.
Thanks!