Thanks Dennis,
In the mapsuite 12 we use a lot of multiple threading things. The Map_CurrentExtentChanged will be triggered once the extentchanged. But the map may not real setup the new extent. So the map.CurrentExtent in Map_CurrentExtentChanged method could be the old one. to verify this you could use this code.
private void Map_CurrentExtentChanged(object sender, CurrentExtentChangedMapViewEventArgs e)
{
System.Diagnostics.Trace.WriteLine("C:" + map.CurrentExtent.ToString());
System.Diagnostics.Trace.WriteLine("O:" + e.OldExtent.ToString());
System.Diagnostics.Trace.WriteLine("N:" + e.NewExtent.ToString());
System.Diagnostics.Trace.WriteLine("----------------------------------------------------");
}
private void Button_Click(object sender, RoutedEventArgs e)
{
System.Diagnostics.Trace.WriteLine("C:" + map.CurrentExtent.ToString());
System.Diagnostics.Trace.WriteLine("----------------------------------------------------");
}
You will find the currentextent could the same as the oldExtent. So we recommend use e.NewExtent if you want to use the new extent immediately.
Thanks
Frank