How to create Silverlight Business Application using Silverlight 3 Ria Services?

Creating Silverlight Business Application using Silverlight 3 Ria Services

Tools that I have used in this tutorial project:

SQL Server 2005 Standard Edition

Visual Studio 2008 Professional/Team System Edition with its SP1

Silverlight 3

Silverlight 3 SDK

Microsoft Expression Blend 3

Microsoft Expression Blend 3 SDK

Microsoft Silverlight 3 Tools for Visual Studio 2008 SP1 – ENU

WCF RIA Services Beta

WCF RIA Services Toolkit (April 2011)

WCF RIA Services v1.0 SP1

This is my main page,

This is my city listing page,

This is my city listing xaml,

<navigation:Page xmlns:riaControls=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria”  xmlns:data1=”clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data”  x:Class=”MySilverlight3BusinessApplication.Views.CityListing”







           xmlns:data= “clrnamespace:System.Windows.Controls;assembly=System.Windows.Controls.Data”



           d:DesignWidth=”640″ d:DesignHeight=”480″


    <Grid x:Name=”LayoutRoot”>


            <LinearGradientBrush EndPoint=”0.5,1″ StartPoint=”0.5,0″>

                <GradientStop Color=”#FF072A39″ Offset=”1″/>

                <GradientStop Color=”#FF0878AB”/>




            <RowDefinition Height=”0.112*”/>

            <RowDefinition Height=”0.888*”/>


        <riaControls:DomainDataSource x:Name=”CityDataSource” QueryName=”GetTblCityQuery” AutoLoad=”True”>





        <TextBlock Style=”{StaticResource HeaderTextStyle}” HorizontalAlignment=”Left” Margin=”8,8,0,19″ Width=”212″ Text=”City List” TextWrapping=”Wrap”/>

        <data1:DataGrid x:Name=”CityGrid” Grid.Row=”1″ Background=”White” ItemsSource=”{Binding ElementName=CityDataSource, Path=Data}”></data1:DataGrid>

        <!–<data1:DataGrid x:Name=”CityGrid” Grid.Row=”1″ Loaded=”CityGrid_Loaded”></data1:DataGrid>–>



Here is my code in C# of course,

using System;

using System.Collections.Generic;

using System.Linq;

using System.Net;

using System.Windows;

using System.Windows.Controls;

using System.Windows.Documents;

using System.Windows.Input;

using System.Windows.Media;

using System.Windows.Media.Animation;

using System.Windows.Shapes;

using System.Windows.Navigation;

using System.Windows.Controls.Data;

using MySilverlight3BusinessApplication.Web.Services;

namespace MySilverlight3BusinessApplication.Views


    public partial class CityListing : Page


        public CityListing()




        // Executes when the user navigates to this page.

        protected override void OnNavigatedTo(NavigationEventArgs e)



        //private void CityGrid_Loaded(object sender, RoutedEventArgs e)


        //    TestDbDomainContext context = new TestDbDomainContext();

        //    CityGrid.ItemsSource = context.tblCities;

        //    context.Load(context.GetTblCityQuery());




You notice that there are commented out portion on both xaml and my code. I base and follow the steps in this tutorial. Here is my reference link below,

This entry was posted in ASP.NET 3.5 And Silverlight 3, Silverlight 3, WCF RIA Services. Bookmark the permalink.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s