AnsweredAssumed Answered

Draw status changed

Question asked by saurabhPGE on Feb 8, 2019
Latest reply on Feb 15, 2019 by saurabhPGE

Hello,

 

I'm working on some offline development and showing the spinner when map draw status changed. When I do window lock and unlock my window then I see that draw status changed event happens only one time, after that it's not executing.

 

Here is the sample code which I am using.

 

private void PgeMapView_DrawStatusChanged(object sender, DrawStatusChangedEventArgs e)
{
try
{
//Update the load status information
Dispatcher.Invoke(delegate ()
{
// Show the activity indicator if the map is drawing
if (e.Status == DrawStatus.InProgress)
{
labelMessage.Visibility = System.Windows.Visibility.Visible;
labelMessage.Text = "Loading layers..";
ProgressSpinner_lyr.Visibility = System.Windows.Visibility.Visible;
ProgressSpinner_lyr.Spin = true;
ProgressSpinner_lyr.Refresh();

//MapStatusProgressBar.IsEnabled = true;
//MapStatusProgressBar.Visibility = System.Windows.Visibility.Visible;
}
else
{
labelMessage.Visibility = System.Windows.Visibility.Collapsed;
ProgressSpinner_lyr.Visibility = System.Windows.Visibility.Collapsed;

}
pgeMapView.DrawStatusChanged -= PgeMapView_DrawStatusChanged;
pgeMapView.DrawStatusChanged += PgeMapView_DrawStatusChanged;
});

}

catch (Exception ex)
{
string message = ex.Message;
}
}

Outcomes