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

Example: Drag and Drop

This section is based on a video, Writing Your First Rx Application, posted by the Rx Team,2 one we very much like because it treats your mouse as an observable collection of locations. You can then subscribe to that collection and as new locations (points) become available, you will be notified.

To get started, let's create a new Windows Phone application. Replace the grid with a canvas, and add a TextBlock and an image, as shown in the following code:

<Canvas>    <TextBlock       Name="textBlock"       Text="Rx for Silverlight" />    <Image       Name="image"       Source="avatar.png"       Width="191"       Height="206"       Canvas.Left="12"       Canvas.Top="50" /> </Canvas>

Note that you will need to download

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