MapControl.TrySetViewBoundsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.