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
Praveen Raghuvanshi
NA
7
15.9k
Infinite Scrolling in Canvas
Sep 12 2011 4:00 PM
Hi,
I am working on canvas and need to implement infinite scrolling towards the top and bottom.
I have a grid which contains the scrollviewer whose content is the custom canvas. The canvas contains some custom objects which have been drawn over the canvas and bears the drag and drop functionality.
When I drag any object towards right/bottom, scroll bars appear and gives space to put the object.
However, this functionality is not there for top/left scrolling. So, when a object is dragged towards left/top and it reaches the end, the canvas is not resized in order to accomodate the new position of object.
I know, its because canvas has a origin as 0,0 and width and height as infinite.
Currently, user has to 'Select All' all the displayed objects in the canvas and drag towards the right/bottom in order to create a new object towards left/top of it.
Searched and found this link
http://www.eggheadcafe.com/software/aspnet/32319058/wpf--scroll-canvas-to-objects-beyon-top-or-left-side.aspx
[] of some help, unfortunately unable to mimic the behavior in my application.
Is the use of MeasureOverride() and ArrangeOverride() method appropriate in this situation? Please share any good link for explanation of these API's.
The best example for infinite scrolling towards right/bottom is Excel sheet. I am looking for the same behavior for left and top.
Please let me know for any clarifications.
Thanks in advance!!!
Reply
Answers (
0
)
How do I make a menu of three-dimensional? How do I book page flip effect?
Browser button in wpf using c#