Searching for a Route Using the View

The MapView page contains a Border control named RouteSearchView. This control is used to prompt the user for the origin (from) and destination (to) addresses (see Figure 18.2).

Image

FIGURE 18.2 The RouteSearchView Border control allows the user to search for a route.

A visual state is used to hide and show the Border. When the Border is shown, it provides the user with the means to enter two addresses. When the user taps the Search button, the viewmodel’s SearchCommand executes.

The following excerpt shows the RouteSearchView Border:

<Border x:Name="RouteSearchView"        Height ...

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

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