I have an application that requires my map to be built in code so that the extent and maximum resolution can be set to a particular user. The extent varies per user and i need to set the maximum resolution for each user to limit the zoom slider on the navigation control. The problem is, even though i explicitly set the max and min resolution for my map in code, the navigation control zoom slider still "minimizes" when the map loads. or atleast appears to be happening at the map.loaded event. this is all being done using mvvm too. anybody have any ideas?<UserControl x:Class="MVVM_MapDev.MainPage"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
xmlns:viewModel="clr-namespace:MVVM_MapDev.ViewModel;assembly=MVVM_MapDev.ViewModel"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="Black">
<Grid.DataContext>
<viewModel:MainPageViewModel/>
</Grid.DataContext>
<ContentPresenter Content="{Binding Path=BaseMap}"/>
<esri:Navigation Map="{Binding Path=BaseMap}"/>
</Grid>
</UserControl>
void SetBaseMap()
{
try
{
BaseMap = new Map();
BaseMap.BorderBrush = new SolidColorBrush(Colors.Gray);
BaseMap.BorderThickness = new Thickness(1.0);
BaseMap.Extent = GetMapExtent();
BaseMap.IsLogoVisible = false;
BaseMap.Layers = MapLayers;
BaseMap.MinimumResolution = GetMinResolution();
BaseMap.ExtentChanged += new EventHandler<ExtentEventArgs>(BaseMap_ExtentChanged);
}
catch
{
throw;
}
}