C++ Storeapp ListviewItem Selection Foreground color chaining in RunTime
I have some problem with list view item foreground color change during the run time, by default set the color using the Data binding property. I need to change the color value during the selection, added a code snippet along with
this, need urgent help.
<ListView Background="WhiteSmoke" x:Name="inboxListview_" Grid.Row="1" ScrollViewer.VerticalScrollMode="Enabled" ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollMode="Enabled" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ItemsSource="{Binding Source={StaticResource mailsCVS_}, Mode=TwoWay}" SelectionChanged="MailSelectionChanged" PointerPressed="OnPointerPress"
ItemContainerStyle="{StaticResource InboxListViewItemStyle}" Height="365" VerticalAlignment="Top" Margin="0,0,0,0">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,5">
<TextBlock Text = "{Binding Subject}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{Binding Color}" FontSize="12" FontWeight="Bold" VerticalAlignment="Bottom" Margin="10,0" Width="700"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>