This question is locked. New answers and comments are not allowed.
Whats the code to have the item selected on the InfiniteListBox?
I have:
radInfiniteLIstBox is my listbox populated by your example items
resultText is Textblock showing the result string of the selection.
This code works with regular Listbox, but not with InfiniteListBox...is there a logic error or are things handled differently?
Thanks!
private void radInfiniteListBox_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
{
object item = radInfiniteListBox.SelectedItem;
InfiniteListBoxItem listboxItem = item as InfiniteListBoxItem;
if (listboxItem == null)
{
resultText.Text = "No item currently selected.";
}
else
{
resultText.Text = listboxItem.Content.ToString();
}
}
I have:
radInfiniteLIstBox is my listbox populated by your example items
resultText is Textblock showing the result string of the selection.
This code works with regular Listbox, but not with InfiniteListBox...is there a logic error or are things handled differently?
Thanks!
private void radInfiniteListBox_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
{
object item = radInfiniteListBox.SelectedItem;
InfiniteListBoxItem listboxItem = item as InfiniteListBoxItem;
if (listboxItem == null)
{
resultText.Text = "No item currently selected.";
}
else
{
resultText.Text = listboxItem.Content.ToString();
}
}