Creating the Silverlight Application
The next step is to create the Silverlight Application that will interact with this web service. To do so, right-click on the references in the Silverlight project and choose Add Service Reference

Figure 3-10. Adding a reference to the Web Service
When the Add Service Reference comes up click on Discover and choose Services in Solution. The service you created will be found. Before clicking OK notice that by clicking on the Service, the operation you created (GetCustoemrByLastName is discovered

Figure 3-11. Choosing the operations you want to Add (Click to view full-size image)
Clicking OK adds the service to your project. You will access the Web Service (and its method) through this reference.

Figure 3-12. The reference added to your project
Creating the XAML
In the Page.xaml I'll create a very simple UI that will consist of a top row to enter the user's last name and a bottom row to display the results. To start, I'll layout the Grid's rows and columns,
<Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True">
<Grid.RowDefinitions>
<RowDefinition Height="10" /> <!--0 Margin-->
<RowDefinition Height="50" /> <!--1 Prompts-->
<RowDefinition Height="*" /> <!--2 DataGrid-->
<RowDefinition Height="10" /> <!--3 Margin-->
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" /> <!--0 Margin-->
<ColumnDefinition Width="*" /> <!--1 Controls-->
<ColumnDefinition Width="10" /> <!--2 Margin-->
</Grid.ColumnDefinitions>
</Grid>
Notice that I've set ShowGridLines to true while I'm working to ensure that I'm getting the results I hope for, and that the third row and second column use star sizing; indicating that they should take up all the remaining space.
The Grid has small margins on all sides and two rows, a top small row and a very large bottom row,

Figure 3-13. The grid in design mode