Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm pretty new to wpf, only started about a month ago,
learning on the job basically.

I currently have a tool that gives me buildings in a city which i can select from a list, which will then show me some tabs with data and statistics. My goal now
is to replace that list with a more user friendly overview.
I want to show a image of the city, as a topdown world map kinda thing. And instead of having all the buildings in a list, I'd like the draw a polygon which is clickable with some text on it, on the position of the building. (I already have the pixel to world unit conversion, this is all pulled from a 3d scene, and I know the points of the polygons etc.

so what I want to achieve is:
-limited zoom (no need to let ppl zoom in too far in or out.)
-limited panning (I want my image to always cover the whole area of my usercontrol,
as in, i dont want it to be like, a free floating image that i could drag off the screen)
-draw shapes / preRendered shape textures with some text on it and have it move too
- recolor the selected shape to show it's been selected.

what I currently have:
- simple zoom and pan (just what i gathered from various places online)

I read that the shapes could be done with adorners. But I've been told that adorners aren't very nice.

If you know of other posts that have useful information do link it, I'm generally alright with just picking out stuff i need from various sources.

thanks

What I have tried:

I have looked here and other sites and have puzzled together a pan and zoom feature, I've limited the zoom, but I'm not sure how to stop the image form moving out of bounds.

I looked into adorners for the overlay, but I wasn't convinced it was right for what i need.
Posted
Updated 30-Mar-18 0:37am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900