Using the Route Calculator

The MapViewModel class contains two string properties: FromAddress and ToAddress, which are populated using two TextBox controls in the view.

When the viewmodel’s RouteSearchCommand is executed, the viewmodel’s Message property and a Busy Boolean flag are set, which are materialized using the ProgressIndicator of the page’s System Tray, as shown:

<shell:SystemTray.ProgressIndicator>    <shell:ProgressIndicator IsIndeterminate="{Binding Busy}"                                IsVisible="{Binding Busy}"                                Text="{Binding Message}" /></shell:SystemTray.ProgressIndicator>

The SearchRoute method then awaits for the result of the RouteCalculator object’s CalculateAsync ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.