Hi Simo,
This issue has been recreated. It’s a bug since v13.3.0.
I heard from my coworker that you guys are on v14.1.1 and pretty close to a release. As a result, here I created a workaround for you as following, and you can keep using v14.1.1 and avoid updating to a newer version.
Create a sub MapView:
class MyMapView : MapView
{
[NonSerialized]
private Canvas allEventCanvas;
protected override Task DrawAsyncCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType, CancellationToken cancellationToken)
{
if (allEventCanvas.ActualHeight < ActualHeight * 2)
{
allEventCanvas.Height = ActualHeight * 2;
allEventCanvas.Width = ActualWidth * 2;
allEventCanvas.Margin = new Thickness(-ActualWidth / 2, -ActualHeight / 2, 0, 0);
}
return base.DrawAsyncCore(targetExtent, overlayRefreshType, cancellationToken);
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
allEventCanvas = (Canvas)GetTemplateChild("AllEventCanvas");
}
}
and use it in the xaml:
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpf="clr-namespace:ThinkGeo.UI.Wpf;assembly=ThinkGeo.UI.Wpf"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<local:MyMapView x:Name="Map" Loaded="mapView_Loaded"/>
</Grid>
</Window>
Let me know if it works.
Thanks,
Ben