Multiple selection problem in ListBox of WPF ?
In this recource , I post a solution of WPF ListBox problem while selecting multiple records by hold down control key with mouse click , which is mentioned below :
Multiple selection problem in ListBox of WPF using hold down control key [CTRL]with left mouse click
I have two Listbox in my project and one of them is used for bind all offices from database and another one is used for selected offices .
But it creates a problem When select multiple items by hold down control key [CTRL] with left mouse click and then move them in another listbox on move button click event with scroll but it is not able to count all the selected items , it counts only some of the selected items.
I try to solve from many tricks and solution but all are not work and finally I use following lines of code in Stylesheet for Listbox :-
Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}"
Setter Property="ScrollViewer.CanContentScroll" Value="False"
Style
and it is work perfectly , what I want
I also posted my problem and solution on Microsoft Forum , which is mentionted in below URL
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/7ba19e8b-dd43-493d-9a05-fa5db2e989df
If you have any queries regarding this post , you feel free to ask me.
Reference: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/7ba19e8b-dd43-493d-9a05-fa5db2e989df