I am looking to make a selection rectangle in Wpf items control just as in MS Excel.I have looked at decorators and adoners but got little help.I need the thick border around the cells that i select using mouse(check screenShot)

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 have a solution for you, that seems to work fairly well with just an attached property for you to attach to an items control such as a listbox.
The code makes guesses as to whether or not selected items are contiguous by just checking that they are contiguous by index. With say a uniformgrid with some row count that won’t work, but this should get you started.
Usage in XAML: