Displaying Location Using the GeoLocationView Page

The view has two buttons, which are bound to the viewmodel’s StartCommand and StopCommand (see Listing 17.7).

The GeoLocationView contains several TextBlock elements that are bound to viewmodel properties.

A Slider is bound to the viewmodel’s SampleIntervalMs property, allowing the user to control the sample frequency. The sampling feature is explored later in the chapter.

A Windows Phone Toolkit ToggleSwitch is bound to the viewmodel’s UseMockLocator property and changes the IGeoLocator implementation that is used during tracking.

LISTING 17.7. GeoLocationView Page (excerpt showing main content panel)

<StackPanel Grid.Row="1" Margin="21,30,21,0">    <StackPanel ...

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.