O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required