I've got a list view that is populated by a Binding, on a class named House.
Here's an example of my code:
<DataTemplate DataType="house">
<TextBlock Text="{Binding sold_status}" />
</DataTemplate>
As you can see, one of my variable names is sold_status. This is a bool.
I want to show either "SOLD" or "NOT SOLD" for 1 and 0 respectively.
Is it possible to fashion an if statement based on the value?
So just so that you can visualise what I want to achieve:
<DataTemplate DataType="house">
<TextBlock Text="({Binding sold_status} == 1) 'SOLD' else 'NOT SOLD'" />
</DataTemplate>