Aditya Patil

Aditya Patil

  • NA
  • 535
  • 134.1k

Highlight specific value of Listbox Dynamically C#

Jul 23 2014 1:12 AM
In Windows Phone application, I have 3 values in Listbox
Low
Medium
High
 
Its XAML Code is
<ListBox HorizontalAlignment="Left" Height="103" VerticalAlignment="Top" Width="456" Name="priority" Margin="10,302,-10,0" Visibility="Visible">
<ListBoxItem x:Name="high" Content="High" Foreground="Black"/>
<ListBoxItem x:Name="medium" Content="Medium" Foreground="Black"/>
<ListBoxItem x:Name="low" Content="Low" Foreground="Black"/>
</ListBox>
 
When I click on button, I want to show "Low" value as Highlighted of Listbox (means dynamically), How I can write code for it in C# ?

Answers (1)