none
Progress Ring over Bing Map RRS feed

  • Question

  • I have a Windows 8.1 store app that allows the user to bring up a bottom app bar, click a button, and display pushpins for all the locations returned in the search. Works great.

    If the search region is a large area, it can take 20 seconds for the search/drawing pins on map to complete. I'd like to put up a Progress Ring over the map while searching.

    I tried the code below, and set IsActive for my ProgressRing in my code behind for the start and end of my search. I never see the ProgressRing appear over the Bing Map.

    Any suggestions?

    Thanks...

    <local:MapBing x:Name="mainPageMapBing" Grid.Column="1"/>
    <ProgressRing x:Name="queryProgressRing" IsActive="False" Grid.Column="1" VerticalContentAlignment="Top" VerticalAlignment="Center" HorizontalAlignment="Center"/>


    Randy

    Monday, January 20, 2014 5:36 PM

Answers

  • To make it large just set width and height values:

    <ProgressRing x:Name="queryProgressRing" IsActive="True" Grid.Column="1" Width="400" Height="200" VerticalContentAlignment="Top" VerticalAlignment="Center" HorizontalAlignment="Center"/>

    As for setting IsActive, if it is not updating when you set it in C# and you are calling a service, make sure it is being done on the same thread and isn't being blocked by your service call. Perhaps try using a Dispatcher to update the UI


    http://rbrundritt.wordpress.com

    Monday, January 20, 2014 7:04 PM

All replies

  • It turns out the code above actually did work, sort of. If I start a query then change the zoom level of the map, I can see the ProgressRing. Now my questions are the following:

    • Any idea how to refresh the ProgressRing in C# after setting IsActive to true? I'm assuming this will make the ProgressRing visible.
    • Any idea how to make the ProgressRing bigger, and maybe change the color of the dots? Against the map background, it's a little hard to see.

    Thanks...


    Randy

    Monday, January 20, 2014 6:03 PM
  • To make it large just set width and height values:

    <ProgressRing x:Name="queryProgressRing" IsActive="True" Grid.Column="1" Width="400" Height="200" VerticalContentAlignment="Top" VerticalAlignment="Center" HorizontalAlignment="Center"/>

    As for setting IsActive, if it is not updating when you set it in C# and you are calling a service, make sure it is being done on the same thread and isn't being blocked by your service call. Perhaps try using a Dispatcher to update the UI


    http://rbrundritt.wordpress.com

    Monday, January 20, 2014 7:04 PM
  • I'm developing on a clunky old laptop, and testing on a tablet-like Dell XPS12 Dell Ultrabook. On the tablet, the ProgressRing appeared even without changing the size. I see the ProgressRing on both when I include the Width/Height values as shown above. i've marked as answered and helpful. Thanks for the help!


    Randy

    Tuesday, January 21, 2014 2:13 PM