Book Image

Windows Phone 7.5 Data Cookbook

By : Ramesh Thalli
Book Image

Windows Phone 7.5 Data Cookbook

By: Ramesh Thalli

Overview of this book

Windows Phone 7.5 Mango contains support for apps written in Silverlight or XNA. These apps can store data on the device, and also load and manipulate data from "the cloud" and other web services.This Windows Phone 7.5 Data Cookbook has a range of recipes to help you apply data handling concepts. You will be able to apply the knowledge gained from these recipes to build your own apps effectively. This Windows Phone 7.5 Data Cookbook starts with data binding concepts at the UI layer and then shows different ways of saving data locally and externally in databases. The book ends with a look at the popular MVVM software design pattern. The recipes contained in this book will make you an expert in the areas of data access and storage.
Table of Contents (15 chapters)
Windows Phone 7.5 Data Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Searching OData services


In this recipe let's search OData using $filter. Netflix OData API supports $filter.

Getting ready

Let's create a new solution and name it Recipe3_NetflixSearch or copy the project from Recipe1_Netflix under the folder Ch4_Recipes.

How to do it...

  1. Open MainPage.xaml and add a text block, textbox, and a search button:

    <Grid x:Name="LayoutRoot" Background="Transparent" DataContext="{Binding}">
      <Grid.RowDefinitions>
        <RowDefinition Height="152"/>
        <RowDefinition Height="234"/>
        <RowDefinition Height="382*"/>
      </Grid.RowDefinitions>
    
      <!--TitlePanel contains the name of the application and page title-->
    
      <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
    
      <TextBlock x:Name="ApplicationTitle" Text="Ch4 Recipes" Style="{StaticResource PhoneTextNormalStyle}"/>
      <TextBlock x:Name="PageTitle" Text="Netflix Search" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
    
      &lt...