I have the following xaml:
<ListView x:Name="SomeClass_SomeListProperty">
<ListView.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<WrapPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="{Binding Type}"/> <!--This is a string-->
<TextBlock Text=": "/>
<TextBlock Text="{Binding Number}"/> <!--This is a long-->
</WrapPanel>
<Grid Grid.Column="1" HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Stretch="None"
Source="{Binding BoolThatDependsOnType,
Converter={StaticResource BoolToImageConverter},
ConverterParameter='large'}" />
<Button Grid.Column="1" Content="Settings"
cal:Message.Attach="MethodCallThatDependsOnType"/>
</Grid>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Can I somehow bind the bool "BoolThatDependsOnType" depending on the value of Type? The problem I'm having is that the image source is set depending on if a certain bool is true or false. I want to select which bool to bind to depending on if Type is "type1", "type2" or "type3" for the particular list item.