how to select items in listbox, if start dragging from one item to the end of the dragging?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found this approach on a question on msdn but I can’t find it again so I can’t link it.. Anyway, this works pretty good, only problem being when dragging and scrolling at the same time, then it can miss a few items. I’ve created a custom control library called MultiSelectLibrary which you can use like this
Add a reference to MultiSelectLibrary which can be downloaded from here (Source here)
Add the namespace and the MultiSelectListBox with SelectionMode=”Extended” and it should work.
If you rather just use some code behind you can do it like this (doing the same thing as the library)
And in code behind