Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Catastrophic failure with map control on UWP during resize of app

$
0
0

Catastrophic failure when having a map control on a UWP app when resizing the app while the map is visible.

It is simply being added using:

public class BlackhawkMapViewRenderer : ViewRenderer<View, MapControl>
{
      MapControl Map { get; set; }
  public BlackhawkMapViewRenderer()
      {
              Map = new MapControl();
      }

>

      protected override void OnElementChanged(ElementChangedEventArgs<View> e)
      {
              base.OnElementChanged(e);
              if (e.OldElement != null || Element == null)
              {
              return;
              }

          SetNativeControl(Map);
      }

}

where the map control is created and set to the native control. But nothing else is done. removing the map fixes the problem. you can resize the app when the map (ie on a different view) is not visible and then show the map and it correctly shows.

Has anyone been able to get a map control working in UWP without this behaviour?

this happens on all current and PreRelease versions of Xamarin.Forms


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>