Dela via


MapControl.TrySetViewBoundsAsync 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:
 virtual IAsyncOperation<bool> ^ TrySetViewBoundsAsync(GeoboundingBox ^ bounds, IReference<Thickness> ^ margin, MapAnimationKind animation) = TrySetViewBoundsAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<bool> TrySetViewBoundsAsync(GeoboundingBox const& bounds, IReference<Thickness> const& margin, MapAnimationKind const& animation);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<bool> TrySetViewBoundsAsync(GeoboundingBox bounds, System.Nullable<Thickness> margin, MapAnimationKind animation);
function trySetViewBoundsAsync(bounds, margin, animation)
Public Function TrySetViewBoundsAsync (bounds As GeoboundingBox, margin As Nullable(Of Thickness), animation As MapAnimationKind) As IAsyncOperation(Of Boolean)

Parameters

bounds
GeoboundingBox

The geographic area to display in the view.

margin

IReference<Thickness>

Nullable<Thickness>

The margin to use in the view.

animation
MapAnimationKind

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

Returns

true if the asynchronous operation succeeded; otherwise, false.

Attributes

Remarks

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

Applies to

See also