15,898,134 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by XiaoChuan Yu (Top 3 by date)
XiaoChuan Yu
4-Aug-11 12:43pm
View
Deleted
Good idea. I've updated my tip to set HandleEventsToo in XAML. I also added a paragraph about your second comment and modified my initial XAML a bit to demonstrate. If I have time, I will make a class as you described probably using AttachedProperty. I probably won't add it to this Tip since its quite long already.
XiaoChuan Yu
30-Jul-11 13:20pm
View
Deleted
Thanks, you made some very good points especially about using MouseDown with HandleEventsToo flag instead of PreviewMouseDown. I've updated my tip. Please look at the middle section and ending section. I kinda edited it in hurry; hope I didn't make any mistakes.
XiaoChuan Yu
27-Jul-11 18:49pm
View
Deleted
Hi, thanks for the comment. Sorry I didn't make it clear that I wanted the "built-in" handler of the control to handle the event; not handle it myself. What I forgot to say in my tip was that I needed multiple selection in my ListView and I didn't want to implement that logic myself in a handler (by using HandleEventsToo parameter in UIElement.AddHandler(...) like you said). I needed the user to be able select text in cells as well as select multiple rows with Ctrl+ or Shift+ with mouse or with arrow keys. This is the reason why I came up with the hacky solution I posted. I will revise my tip to make it clearer. Please re-vote if you think what I've said here is credible, thanks.