cancel zooming in map control Windows Phone - c#

I am working with map control in my Windows Phone application. After I have set route between two points, map control automaticaly zoom in. How can I implement not zoom in after seting a rote?

I would expect that you can't.
The map control automatically adjusts zoom levels when it pans and moves around and I haven't found a way around this other than keeping track of the original zoom level and resetting it after the control does its thing.

You should just disable the map control, like this:
map1.IsEnabled = false;

Related

Animate zoom factor programmatic in a ScrollViewer

Is there a way that I can animate changing the zoom factor of a ScrollViewer for Windows Runtime?
I'd like to be able to have an image inside one respond to a tapped event by returning to a default zoom of 1. While it seems that in Windows 8.1 Change View lets you animate the scrolling, not the zooming I'd like to be able to animate both.
The best solution I found was to take a part of the WinRT XAML Toolkit which has a functioning example and an extension for ScrollViewer which does just this.
Also by setting the ScrollViewer to have size of Auto and simply re-sizing the width properties of whatever element is contained within you can achieve largely the same effect.

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.

Parent controls lose manipulation features when child controls ManipulationMode is set to other than 'None'

Basically, I have a SemanticZoom control with a GridView inside it, and the GridView has a custom control inside it, but for simplicity, let's assume it's a simple red Border. The problem is that I'm trying to handle the Border's manipulation when scaling (set ManipulationMode to Scale) so that I can know when the user does a pinch out gesture and "Zoom In" into the Border (which is really another page), but by handling the Manipulation, I lose the ability to (1) use the SemanticZoom and (2) Scrolling the grid.
If you have used the Windows 8 photo app, you'll notice that they implement this feature somehow. If you pinch in into an image, the Page will go into SemanticZoom, but if you pinch out it will go into full screen mode. I want similar functionality, but I don't know how to achieve it.
Any ideas?
Thanks in advance.
I will use 2 SemanticZoom controls to achieve Photo App Effect.

Windows Phone 7 map control: panning the map while keeping the pushpin constant

I'm working on a WP7 (mango) app which has a Bing Maps control with one pushpins on the screen. I need to be able to drag/pan the map so that the map view changes while the pushpin remains in a constant position relative on the screen. How can I achieve this? The pin always seems to be attached to the map and moves with the map.
(This is basically an alternative to dragging the pushpin around the map i.e. dragging the map around the pushpin).
Don't add a Location to the Pushpin. Instead just set it's Margin to the values you want. The margins are calculated from the absolute center of the Map control
That way it'll be in a fixed position. Alternatively, you can add the map on a Canvas, and just draw any element on top of the Canvas.
But why you want to do this, I really cannot imagine.
Normally a Pushpin is fixed according to a GeoLocation (a GPS coordinate), and stays at that fixed point, when you pan/drag/zoom the map. That's what the Pushpin.Location property/attribute is for.

How to resize dynamic controls in Windows Forms/Window Mobile applications?

I have a panel that has lots of labels and checkboxes. I want to grab all these controls and resize them?
How would I do this? Would this be like going through the panel for all the controls then resizing them?
Or do you think it would be better to re render the whole form again with the new sizes. However this would require me to do another request to the webservice to get the information.
I need to resize the controls because I want allow user to switch from portrait mode to landscape.
Use Dock, or for more precise control use the Anchor property. By setting Anchor to Left, Right, Top, Bottom the control will scale with the window. By setting Anchor to Right the control will move with the right border. By setting Anchor to Top and Bottom the control will scale vertically, but have a fixed width.
you can also use tablelayoutpanel and flowlayoutpanel controls.
For mobile, I think these controls are not available.
First of all, you should not just store the values from the web service in controls. They should be safely tucked away in one or more objects somewhere, to be easily accessed from your form.
I'm afraid you ahve to resize and/or change location of your controls depending on which mode you are in.
For developing resolution aware applications for .NET CF, see here:
http://msdn.microsoft.com/en-us/library/ms838174.aspx

Categories

Resources