I am using the following code to load map from a mobile package:
MobileMapPackage mmpk = await MobileMapPackage.OpenAsync(packagePath);
Map map = mmpk.Maps;
MainMapView.Map = map;
scale.Text = Convert.ToInt32(MainMapView.MapScale).ToString("N0");
After the map is assigned to the map view, I expect the view to initialize and return a valid MapScale. This does not happen however, the while loop above is never exited. If I comment out the three lines above, the map is loaded in the view as expected, but a valid MapScale is returned only after I pan or zoom the map. Is there a way to access MapScale immediately after the map is loaded?
Any suggestions are welcome. I am using WPF Runtime 100.1.0.