Archive for category SilverLight

RIA Services Overview

So for the last couple of weeks I have been doing some work with Silverlight RIA Services which has been very cool. So Im going to start to do a series of posts on RIA services in order to document what I have done!

RIA Services Downloads

Optional Stuff for RIA Services and SilverLight 3

  • Microsoft Expression Blend 3 + SketchFlow Trial: You definatly want Expression Blend to do graphical manipulation of SilverLight controls, currently this isnt supported in Visual Studio so this is your only option.
  • SilverLight Spy: Allows you to decompile SilverLight xap files back to their component bits, much like the awesome reflector for .NET binaries.

Note Worthy Blogs

All of the above blogs contain some great information and since I cant thank them in person here it is “Thanks guys for all your amazing work and help!”

Help I’m Stuck (Great Forums)

  • SilverLight.NET RIA Forum: The place to go, some extremly knowledgable people here that can help you out.
  • StackOverflow: Some good stuff in here as well both on RIA and SilverLight in general

Shameless Self Promotion

  • Of course in this blog there will, hopefully, be some RIA and SilverLight stuff that will inspire you, just click here to see!

3 Comments

How to remove the validation summary from a dataform

>When creating forms with SilverLight 3 an really handy new way of doing this is by using the dataform object.
Essentially a dataform object can automatically create a form that a user can input data into and then save it to the current context before submitting changes.

I was recently creating an interface to Active Directory for one of my clients and was using a lot of the new validation features in RIA Services (which I will talk about latter) but there was one thing that I didn’t like about the dataform, the summary on the bottom like shown below:

Dataform with validation summary

Dataform with validation summary

Since there already is a visual clue to the user in the form of the highlighted box I thought that this was overkill.

The question is how to get rid of it and there are actually a couple of ways, with Expression Blend and through Visual Studio but unless there is interest Ill only show the expression blend way.

Expression Blend 3 Way

  1. Open the page in Expression Blend 3.
  2. Right click on the dataform and then select Edit Additional Templates -> Edit ValidationSummaryStyle->Edit a copy like below
  3. EB3EditingValidation

  4. Choose where to save the style (doesn’t really matter, I actually like to keep it in the page) and then remove the SummaryListBox as seen below:
Remove the Summary List item

Remove the Summary List item

And you are done, by the way you can also completely change how the summary items are presented in here as well but lets wait for another time.

So once this is done we remove the summary but still have the coolness of the red highlighted boxes which is awesome!!

Much nicer validation

Much nicer validation

2 Comments

If you get the ‘The Silverlight project you are about to debug users RIA services. RIA services will fail unless the Silverlight project is hosted in and launched from the same web project that contains the RIA services’

I sometimes get this, especially when checking out the latest version from my subversion repository but its easy to fix.

The actual error will look like this:

SilverLight error

SilverLight error

So to fix it you need to do a couple of things:

  1. Set the start up project to the Web project by clicking on the Project and choosing ‘Set as Start Up Project’
  2. Not necessary but set a start up page as well, in RIA this will be called “ApplicationName.aspx”

Thats it, you should now be ready to go!!

1 Comment