picture az map with zoom in c# form application - c#

I have picture that I should use it as map in my C# form application.
Is there any way that I can put some points or buttons on this picture that when user click on it some things happens.
A thing that is important for me is that I want user can zoom on the map. But if the user zoom on map buttons wouldn't move.
I want locate some click-able points in the map that can be zoomed and moved too.
Thanks.

Related

Xamarin C# XAML Cross-Platform With Buttons Bound To Custom Graphic

Here's the basic idea of what I'm trying to do; have this (see image link) graphic with roots going into the ground and the roots split off into different directions. At the end of each root I'd like to place a round button with a number in it which will take them to a new page. (the image only shows a few buttons but later on, for updates i'll have more lessons, meaning more buttons, and so the page would scroll down revealing more buttons)
What I have tried; I tried drawing a dynamic root system graphic, which worked and resized properly based on the screen size. But Skiasharp doesn't really work with absolute layouts and adding buttons on top of the SKCanvas. From my understanding absolute layouts are the only way to but buttons in customs spots.
I'd like to have the Graphic dynamic and locked onto the buttons. I'v tried just placing the buttons over the top of a background image that already had the root graphic on it. But, they don't always align properly.
Is there a way to make this work, or another way to draw the graphic and have the buttons bound to the end of the roots? Or am I just stuck with not having them align with a static background image?
Concept image for app page is below:

How to locally disable sliding in a panoramic app WP8

I am making an app with panoramic view where the user can select a color hue, saturation and value from a color wheel and SV graph like this:
http://i.imgur.com/JM1FD1z.jpg
http://i.imgur.com/51ymotz.jpg
The user can either tap or drag a pointer across the square, coordinates determine the values. But when they drag(mousemove), the app will also slide to the next screen.
Is there a way I can disable the slide to next page if the sliding is done within the graph? It should function normally outside the graph area.
Something like a disable panoramic slide function that can be implemented within the graphs mousemove event handler?
Putting the hue wheel and SV-graph on separate pages will dramatically reduce the combined dynamic functionality of the two so I'd prefer them to be on one panoramic page.
This doesn't seem a good use of a panorama. This will lead to "gesture competition" between the touch action on the controls and the panorama itself. The same problem arises if you use a Pivot control.
If you want Hue and SV on the same page, why don't you put them on the same page and allow switching of the mode by a button, say on the app bar?
You can have both controls in the XAML tree and show the one which is active and hide the other. You can do this by changing the Visibility of each control.

How to get cordinates on a Image Control on clicked

I have an ImageMap on which i want to get the cordinates once user clicks on a particular region. How can this be done. I want to get x,y od every single location wherever user clicks.
Later i want to use this coordinates to draw a hotspot. Can anyone guide me how to go about the same?
You can easily do so by using an image submit button.

AjaxToolkit ModalPopup, how to dynamically set x and y coordinates?

I have used Modal Pop-up extender in an image gallery project which shows the actually size of images when somebody click's on thumbnail inside a datalist.
Everything works fine, beside the location on ModalPop-up is appears at the random location on the screen and sometimes push the image off the screen to right side, If I hard code x and y coordinates then the small image appears and extreme right not in sync.
If I click, re-size or change the scroll position then it re positions to the center of the page but not otherwise.
Kindly suggest a work around to either change the scroll bar position as soon as ModalPop-up is shown (using client script), or an CSS property which I can use to set it.
Thanks a lot in advance.

Convert screen coordinates to picture coordinates

I have the following problem: A program displays a picture using a PictureBox. The picture contains two rectangles A and B that are drawn after the image is loaded.
The image inside the picture box is zoomed and the rectangles A and B are painted using the Graphics object of the loaded image. Is there a simple method to determinate if a user clicked the area inside these rectangles e.g. converting screen coordinates to picture coordinates.
Edit: No longer relevant, found another solution.
Edit 2: My solution was to use two picture boxes at the A and B location instead of modifying the image directly. It has some minor disadvantages specific to my solution, but I had to finish the project in time
This SO post discusses the zoom factor of a picture box and that you cannot determine it.
Therefore I think, without getting the zoom factor, you may not be able to calculate the position.

Categories

Resources