Learn WCF RIA Service: Day 5

Learn WCF RIA Service: Day 1

Learn WCF RIA Service: Day 2

Learn WCF RIA Service: Day 3

Learn WCF RIA Service: Day 4

Using the Silverlight Business Application Template

Till Day 4, we have discussed various primary but important aspect of WCF RIA Service and Domain Service class. Today we will learn creating of WCF RIA Solution using Silverlight Business Application template. You will get Silverlight Business Application template installed under the Silverlight tab as below,

clip_image001

Go ahead and create Silverlight project choosing Silverlight Business Application template. After successful creation of the project run the Silverlight without amending anything in the solution. You will notice at output you are getting a default screen with options of different views like Home, About and Login

clip_image003

Closely examine Silverlight project in solution explorer and you will find different folders like View, Model etc.

clip_image004

If you want to add new page in the business application, very first you need to add Silverlight page in the View Folder. I have added a Silverlight page named MyLearning.xaml in the View folder as below,

clip_image005

After adding page you need to add link on the MainPage.xaml to navigate to this page from home page. For that open MainPage.xaml and inside URI mapper add a mapping for MyLearning.xaml.

MainPage.Xaml

clip_image006

Once you have added URI mapping add a link on the main grid of MainPage.xaml as below,

MainPage.Xaml

clip_image008

Above we are binding content of hyper link with resource from Application resources. Now go ahead and add an entry for MyLearningPageTitle in ApplicationStrings.rescx file

ApplicationStrings.rescx

clip_image009

After adding entry if you run application, you will get a link at home page to navigate to newly added xaml as below,

clip_image010

If click on login link then application will prompt you for authentication.

clip_image011

You can create a new user as well on clicking on Register Now Link. There is default validation implemented as well. If you violate the validation you will get prompt error message as below,

clip_image012

On clicking button a new user will get created.

There are many things and features of Business Application Template are yet to be covered. Today we just touched the basic that would help you to start and explore more on this template.

See on Day 6  Smile

Learn WCF RIA Service: Day 1

Learn WCF RIA Service: Day 2

Learn WCF RIA Service: Day 3

Learn WCF RIA Service: Day 4

3 responses to “Learn WCF RIA Service: Day 5”

  1. […] Learn WCF RIA Service: Day 5 (Dhananjay Kumar) […]

Leave a Reply

Fill in your details below or click an icon to log in:

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 )

Connecting to %s

Create a website or blog at WordPress.com