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
F Scheltens
NA
2
531
Get the center of visible part of a transformed image
Jan 13 2017 5:51 PM
Hi,
i have made a control that zooms an image in and out, using an example i found online as a basis. It is a class which is subclassed from Border and applies transforms to its child. It zooms and pans its child by applying a RenderScaleTransform for zooming in and out, and a RenderTranslateTransform for panning.
When using the mouse this works really well. But when I use a keyboard I am unable to make it zoom in and out with the center of the visible part of the image as origin.
How do I correctly calculate the coordinates that are the middle of the visible part of the image?
I have attached the project folders to this post. The zoomborder is in a library. Project with a client and example image is included. (Solution file is in the Zoomborder folder)
Attachment:
2017-01-07_ZoomBorder.zip
Reply
Answers (
1
)
Want to create Resume Parser
How to access all header text of gridview to other gridview