Home > Silverlight > How to create a lookup window in Silverlight

How to create a lookup window in Silverlight

I am looking for a nice way to create a lookup window in Silverlight. What is needed, is a Control Library + a Modal Window + a back end service to perform the query on the database and return the results.

The target is the Silverlight 4 which at this time (4 March 2010) is in Beta version.

1. Control Library:  I could not find any project template for Silverlight Control Library in Visual Studio 2010 but there is a Silverlight Control Library project template for Expression Blend .Net4.  So that is the way to go.

2. Modal Window:  Silverlight 3 (and 4) includes a cool item template called Silverlight Child Window which is a modal window. It is very easy to use:

    private void Button_Click(object sender, RoutedEventArgs e)
      ChildWindow1 dialog = new ChildWindow1();

The following article gives a nice walk-through on how to create a modal dialogue using Silverlight Child Window:


3. Back end service:  This can be done using a WCF service, but there is a simpler solution. Using the WCF RIA Services helps to simplified the details around creating a WCF service. For the purpose of our look up we need a service library which provides us a single service to return the data as a IQuerable so it can be bind to the grid and the paging and sorting will be managed automatically. The following article is a walkthrough on Creating a RIA Services Class Library.


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: