<Button DockPanel.Dock="Left" Padding="8" Content="Zoom to" Click="Button_Click"/>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="20" Text="{Binding Path=Scale, StringFormat='{}{0:n}', ElementName=PART_Map}" FontSize="16" />
private void Button_Click(object sender, RoutedEventArgs e)
{
var random = new Random();
Point point = new Point(random.Next(0, (int) PART_Map.ActualWidth), random.Next(0, (int) PART_Map.ActualHeight));
point.X -= 10000;
point.Y -= 10000;
var mapPoint = PART_Map.ScreenToMap(point);
var extent = new Envelope(mapPoint, new MapPoint { X = mapPoint.X + 1000, Y = mapPoint.Y + 1000});
PART_Map.ZoomTo(extent);
}
Is this something that might be fixed in the next release?
Hi,
Thank you very much for reporting this. I will enter an issue for further investigation and we will review whether it is possible to address this in the next release.
Cheers
Mike
Excellent ![]()