O'Reilly logo

Programming Reactive Extensions and LINQ by Paul Betts, Jesse Liberty

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

Creating Observables from Events

One of the fascinating ways you can create an observable collection is from a series of events. In this way the keyboard or mouse can be thought of as a collection of key-presses or mouse movements, respectively.

Example: Searching Wikipedia

A series of events can easily be turned into an observable collection using the FromEvent construct. Once more, an example is worth a thousand words, so in our next example, we're going to walk you through an app that makes use of an observable collection of events to capture the user's input and to search Wikipedia with whatever the user has typed. Figure 3-2 shows the output to expect when you run the program.

To get started, open Visual Studio and create a new Windows Phone ...

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