question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ListBox does not select properly with repeated items

See original GitHub issue

Only one of the top three lines will be selected wherever you click

<ListBox >
    <ListBox.Items xmlns:sys="clr-namespace:System;assembly=mscorlib">
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
      <sys:String>Hello</sys:String>
      <sys:String>Cruel</sys:String>
      <sys:String>World</sys:String>
    </ListBox.Items>

   
    <ListBox.ItemsPanel>
      <ItemsPanelTemplate>
        <StackPanel Spacing="2" />
      </ItemsPanelTemplate>
    </ListBox.ItemsPanel>
    <ListBox.ItemTemplate >
      <DataTemplate >
        <StackPanel Orientation="Horizontal">
          <StackPanel Orientation="Horizontal" Height="24">
            <TextBlock Width="80" Text="{Binding}"></TextBlock>
          </StackPanel>
        </StackPanel>
      </DataTemplate>
    </ListBox.ItemTemplate>
  </ListBox>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
grokyscommented, Jun 4, 2019

I’ll try and fix this tomorrow.

0reactions
FoggyFindercommented, Jun 4, 2019

any updates? Workaround probably will be simple: just add Id property to the object.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot select multiple items in Listbox
1 Answer 1 ... Instead of finding the rows in the drop down and adding the same rows to the ListBox, try creating...
Read more >
Userform listbox highlight not refreshing properly
When you click either the first item or the last item, the list is rearranged correctly. If you select anything in the middle...
Read more >
Selection of Listbox Items: not working with last
I can´t select the last items in the listbox. When I click an item, the list is scrolled automatically up and the item...
Read more >
Cannot Select Items in a List Box - QlikView App Dev
One list box in a dashboard suddenly stopped working properly in our web client. All linked list boxes for the same dimension are...
Read more >
Listbox Pattern | APG | WAI
A listbox widget presents a list of options and allows a user to select one or more of them. A listbox that allows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found