Wednesday, May 26, 2010

Full Text search in Silverlight 4 using WCF RIA service and Entity Framework

Check here how to create SQL SERVER – 2008 Full Text Catalog and using Full Text Search.

Get started of WCF RIA and Entity Framework here

In this sample I will use the tools below:
1.Visual Studio 2010
2. Microsoft Silverlight 4 Tools for Visual Studio 2010
3. AdventureWorks 2008R2 RTM sample database

Create Entity Framework domain model (.edmx):

 Generate model from database:
 Select Employee table:

Create domain service class selecting Employee entity:

Now open the domain service class write FullTextSearchEmployee method:
Now build project.
Now in Silverlight application open the page in design view and open DataSource tab.

Drag the Employee into the page:

Page will be generated like above.
Try it now!
This is the magic of VS2010 , WCF RIA service v1 with Entity Framework and MSSQL server 2008 full text search in Silverlight 4.0

Saturday, May 15, 2010

Silverlight 4 modify style runtime - using new BasedOn property of Style

You can create a new style based on a specific Style.
Setter of your new style has priority high. Other setter will be merged from the basedOn style.

Suppose you have style like below:
And applied like below:

Default Output:

Now in the Button event we can modify the style like below:

Suppose you have another boder style and want to use some setter.
Suppose the Style2 like below:

Now in the button event you can merge two style like below:

Check demo below:

Friday, May 7, 2010

Adjust XAML Formatting as required in Visual Studio 2008 / 2010

You will find the xaml editor options in Visual Studio 2008 /2010 like below:
Tools >> Options >>Text Editor >>XAML>>

Some of the options like below: