Silverlight TV 45: Building a Bing Web and Image Search App for Windows Phone 7 Using Blend and Silverlight

Sign in to queue


Want to build a Bing web and image search using Silverlight for Windows Phone 7? Kirupa Chinnathambi of the Expression team shows you just how to do that in this week's episode. Kirupa covers a lot of topics as he builds the app, including how to:

  • wire up the app
  • add the image templates
  • use the Pivot control
  • apply the built in resources to pick up the selected theme in the phone
  • use sample data
  • template a ListBox's ItemsPanel
  • use the WrapPanel from the toolkit
  • handle orientation changes of the phone
  • customize the ApplicationBar

And Kirupa does all of this through Expression Blend!

Note: The WrapPanel used in this episode was from the Silverlight 3 Toolkit. Today the Silverlight for Windows Phone Toolkit was released, which includes the WrapPanel. Check out what other controls are in the toolkit in John's post.

Relevant links:

Follow us on Twitter @SilverlightTV or on the web at 


Are you developing with Windows Phone 7? You can pre-order Learning Windows Phone Programming by Jaime Rodriguez, Yochay Kiriaty, and John Papa! Or check out the book's website.



Download this episode

The Discussion

  • User profile image

    Hey Now John,


    Great Vid & Nice Shades!


    Thx 4 the info,


  • User profile image
    Simon (Darkside) Jackson

    The sample does not compile in the WP7 dev tools RTM using the latest version of the silverlight toolkit for windows phone.
    Bad reference and then complains about the WrapPanel not being a recognised XML attribute.

  • User profile image

    Great tutorial - thanks

  • User profile image

    @Simon (Darkside) Jackson: You need to have the Silverilght 3 Toolkit installed because the video was recorded before we had the Silverlight Toolkit for Windows Phone out. I'll send John an updated link with a revised version of the sample shortly :P

  • User profile image

    I've installed the "Silverlight for Windows Phone Toolkit" at then replace the reference to "Microsoft.Phone.Controls.Toolkit". And changed the following in MainPage.xaml: xmlns:controlsToolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"It is working fine. 

  • User profile image

    @Dale: How did you get this this to work? I sit for hours trying to figure it out( mind you I have not programming experience). I finally got the app to load, but now when I do a search the app crashes. What am I doing wrong?

  • User profile image

    Dwayne - the reason might be that you never specified your own Bing API Developer ID on Line 42 in MainPage.xaml.cs.

    You can get your own ID for free from here:

    Kirupa =)

  • User profile image

    Btw - here is the link to the source that works with the Windows Phone Toolkit itself: TV - WP7 Demo


  • User profile image

    @kirupa: Thanks. The link worked and I have a Bing AppID.

  • User profile image

    I added the refrence and give my bing AppID but i got this error when i run the code and click go (for search):


    System.ServiceModel.FaultException was unhandled
      Message=Client error
           at System.ServiceModel.DiagnosticUtility.ExceptionUtility.BuildMessage(Exception x)
           at System.ServiceModel.DiagnosticUtility.ExceptionUtility.LogException(Exception x)
           at System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(Exception e)
           at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
           at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
           at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
           at BingDemo2.BingWebService.BingPortTypeClient.BingPortTypeClientChannel.EndSearch(IAsyncResult result)
           at BingDemo2.BingWebService.BingPortTypeClient.BingDemo2.BingWebService.BingPortType.EndSearch(IAsyncResult result)
           at BingDemo2.BingWebService.BingPortTypeClient.EndSearch(IAsyncResult result)
           at BingDemo2.BingWebService.BingPortTypeClient.OnEndSearch(IAsyncResult result)
           at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
           at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
           at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception)
           at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.CallComplete(Boolean completedSynchronously, Exception exception)
           at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishSend(IAsyncResult result, Boolean completedSynchronously)
           at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.SendCallback(IAsyncResult result)
           at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
           at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception)
           at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.OnGetResponse(IAsyncResult result)
           at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClassa.<InvokeGetResponseCallback>b__8(Object state2)
           at System.Threading.ThreadPool.WorkItem.doWork(Object o)
           at System.Threading.Timer.ring()

Add Your 2 Cents