Maintain Extent Behavior
This sample demonstrates the maintain extent behavior, which forces a Map control to maintain its current extent when resized. When using the sample, attempt to resize the browser window and observe that the extent of the Map control is maintained. The sample XAML shows that using this behavior only requires declaring it within a Map element.
Download Sample Application<UserControl x:Class="ArcGISWPFSDK.LocalMaintainExtentBehavior" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"> <Grid x:Name="LayoutRoot" > <esri:Map x:Name="MyMap" WrapAround="True" Extent="-15000000,2000000,-7000000,8000000" MinimumResolution="2445.98490512499"> <esri:ArcGISLocalTiledLayer ID="Shaded Relief" Path="..\\Data\\TPKs\\Topographic.tpk"/> <i:Interaction.Behaviors> <esri:MaintainExtentBehavior /> </i:Interaction.Behaviors> </esri:Map> </Grid> </UserControl>
5/16/2014