TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hamid Rashidi
NA
1
0
Drawing rubber-band lines and shapes on mouse events in WPF
Jul 6 2010 10:57 AM
Hello,
I would like to draw lines and shapes smoothly and dynamically on mouseDown, mouseMove and mouseUp events on a WPF window and would like the behavior to be like this: On mouseDown the drawing procedure starts (The first point is taken), on mouseMove the drawing continues and previous shapes are cleared (The temporary and undecided second point is taken), on mouseUp the last shape is drawn and the procedure is done (The second point is decided). I tried to make a simple code to do that but it didn't look so smooth, I also couldn't clear the shapes already drawn on each mouseMove event. I wonder what is the best way to accomplish this with best performance.
Any help will be appreciated.
Reply
Answers (
0
)
wpf datagrid image
Load Images dynamically in Listbox through Data Binding using ObservableCollection data object