MapControl.TrySetViewBoundsAsync(GeoboundingBox, IReference<Thickness>, MapAnimationKind) MapControl.TrySetViewBoundsAsync(GeoboundingBox, IReference<Thickness>, MapAnimationKind) MapControl.TrySetViewBoundsAsync(GeoboundingBox, IReference<Thickness>, MapAnimationKind) MapControl.TrySetViewBoundsAsync(GeoboundingBox, IReference<Thickness>, MapAnimationKind) Method

Definition

Sets the view of the map displayed in the MapControl to the contents of the specified GeoboundingBox with the specified margin. The view change uses the specified animation.

public : IAsyncOperation<Platform::Boolean> TrySetViewBoundsAsync(GeoboundingBox bounds, IReference<Thickness> margin, MapAnimationKind animation)
IAsyncOperation<bool> TrySetViewBoundsAsync(GeoboundingBox bounds, IReference<Thickness> margin, MapAnimationKind animation) const;
public IAsyncOperation<bool> TrySetViewBoundsAsync(GeoboundingBox bounds, Nullable<Thickness> margin, MapAnimationKind animation)
Public Function TrySetViewBoundsAsync(bounds As GeoboundingBox, margin As Nullable(Of Thickness), animation As MapAnimationKind) As IAsyncOperation(Of bool)

Parameters

bounds
GeoboundingBox GeoboundingBox

The geographic area to display in the view.

margin
Nullable<Thickness> Nullable<Thickness>

The margin to use in the view.

animation
MapAnimationKind MapAnimationKind

The animation to use when changing the view. For more info, see MapAnimationKind.

Returns

true if the asynchronous operation succeeded; otherwise, false.

Remarks

If the area specified by the GeoboundingBox doesn't fill the MapControl, the control also displays the surrounding area outside the GeoboundingBox.

See also