Thursday, 12 September 2013

Seleceted Value from a ListBox WPF .NET 3.5

Seleceted Value from a ListBox WPF .NET 3.5

I have a listbox in my WPF app. The definition is given below:
<ListBox Margin="17.493,33.32,22.491,26.656" Name="lstData"
PreviewMouseLeftButtonDown="ListBox_MouseDown"
IsTextSearchEnabled="False" />
In the code behind, I bind the ListBox to a List. When the value is
selected from the List Box, in my code behind, I want to be able to
retrieve that value. How do I do it? Sample C# code will be helpful.
Thanks.

No comments:

Post a Comment