I have a Listview in my app that has a ItemTemplate that has three TextBlocks. the Listview's ItemsSource property is set to a List named "units" in my class named "ConversionEngine"...
so my problem is: I want to Bind the second and third TextBlocks in the ItemTemplate to another List in the same "ConversionEngine" class. but I can't, bucause the Listview's ItemsSource property is set to "units" List of string and all the subitems of ItemTemplate inherit the "units" list. how can I Bind the sub items to another list, in the same class of ConversionEngine, or another classes that I define? Thanks... here are my codes:
The Listview:
<ListView x:Name="allunits" **ItemsSource="{Binding units}**" SelectionMode="Single" IsItemClickEnabled="True" ItemClick="allunit_itemclick" SelectedIndex="-1" ItemTemplate="{StaticResource Standard500x130ItemTemplate}"/>
The ItemTemplate Code:
<DataTemplate x:Key="Standard500x130ItemTemplate">
<Grid Height="110" Width="480" Margin="10" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
<Image Source="{Binding Image}" Stretch="UniformToFill"/>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
**<TextBlock Text="{Binding}" Style="{StaticResource TitleTextStyle}"/>**
**<TextBlock Text="{Binding ??}" Style="{StaticResource TitleTextStyle}/>**
**<TextBlock Text="{Binding ??}" Style="{StaticResource TitleTextStyle}"/>**
</StackPanel>
</Grid>
</DataTemplate>