Reputation: 137
How to get the text from the selected item? How to assign a variable of type string text ListPicker?
<toolkit:ListPicker x:Name="EncodingList">
<toolkit:ListPickerItem HorizontalAlignment="Center" Content="UTF-8" />
<toolkit:ListPickerItem HorizontalAlignment="Center" Content="Windows-1251" />
</toolkit:ListPicker>
Upvotes: 1
Views: 1671
Reputation: 1576
How to get the text from the selected item?
The simplest way is:
var content = ((ListPickerItem)EncodingList.SelectedItem).Content;
Upvotes: 3