Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

listBox.SelectedItem problem

$
0
0

Im using D&D from list box to textBox and the problem is that the you can just click on item(the item markedwith blue color) let say the first item in the list and than you can go to the list and with the mouse drag different item let say the last item in the list but the item that was actually dragged is the item which you selected via click which is marked with blue color...      i.e. the first item.

while debug I Saw that the item which you get in the following code is first item which you click and mark as blue and not the item that you actually dragged,any idea how to solve it?

you can click and mark any item on the listBox but drag different item while the previous item is marked with blue color...

var listBox = sender asListBox;if(listBox.SelectedItem!=null){var mySelectedItem = listBox.SelectedItemasUser;


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>