Thanks for the response. I was able to fix the problem I was having by using an attached dependency property. The reason I put the map control in the VM before was because I didn't think I could bind to the extent and resolution properties. I'm not really sure how this works, but I saw that someone else had done it this way and it appears to do what I want it to.
<Grid x:Name="LayoutRoot" Background="Black">
<Grid.DataContext>
<viewModel:MainMapViewModel/>
</Grid.DataContext>
<esri:Map x:Name="map_BaseMap" Layers="{Binding Path=MapLayers}" helpers:MapHelper.ZoomGeometry="{Binding Path=MapExtent}"/>
<esri:Navigation Margin="5" Map="{Binding ElementName=map_BaseMap}"/>
<esri:MapProgressBar Map="{Binding ElementName=map_BaseMap}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,5" MinWidth="150"/>
</Grid>
public static class MapHelper
{
static readonly DependencyProperty zoomGeometry =
DependencyProperty.RegisterAttached("ZoomGeometry", typeof(Geometry), typeof(MapHelper), new PropertyMetadata(new PropertyChangedCallback(OnZoomGeometryChanged)));
public static Geometry GetZoomGeometry(DependencyObject d)
{
return (Geometry)d.GetValue(zoomGeometry);
}
public static void SetZoomGeometry(DependencyObject d, Geometry value)
{
d.SetValue(zoomGeometry, value);
}
private static void OnZoomGeometryChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
Map map = d as Map;
if (map == null)
throw new ArgumentException("DependencyObject must be of type ESRI.ArcGIS.Client.Map");
Geometry newZoomGeometry = GetZoomGeometry(map);
if (map.Extent == null)
{
map.Extent = newZoomGeometry.Extent;
map.MaximumResolution = map.Resolution;
}
else
map.ZoomTo(newZoomGeometry);
}
}