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

Sampling the PositionChanged Event with Rx

If the built-in Geolocator class is assigned too low a MovementThreshold value, the event handler for the Geolocator.PositionChanged event may be raised more frequently than needed, which can potentially degrade the performance of your app. The Reactive Extensions (Rx) can eliminate this issue by modulating, or sampling, the event, restricting calls to the PositionChanged event handler to a certain number each second.

Rx is a managed library that has been included as part of the Windows Phone Framework Class Library (FCL). At its essence, Rx allows events to be treated as a data stream. Rx allows you to subscribe to this data stream and to manipulate and filter the data stream before it is handled by ...

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