[RIA Services] Use Shared class for metadatas

With WCF RIA Services and DomainServices, the metadatas file is generated from selected entities of the ADO.NET Entity Data Model. But if you want to add the “FullAddress” property in the metadatas, this error appears: “The associated metadata type for type ‘SharedInfos.Web.Customers’ contains the following unknown properties or fields: FullAddress. Please make sure that the names of these members match the names of the properties on the main type.” Shared classes allow completing this metadatas with properties and/or methods. This file has the .share.cs extension (or .shared.vb). Notice that the namespace must be the same as the Web project. namespace … Continue reading [RIA Services] Use Shared class for metadatas

[WP7] Add images in the Windows Phone 7 Media Library

The Windows Phone 7 emulator included in the beta developer tool doesn’t contain any images in the Media Library. It’s not very easy to test an application that asks the user to choose an image to use the application. This is a few lines of code which helps you to add images in the Media Library emulator. Please note that images are not being saved when you close the emulator ! When you look the media library in the WP7, there is nothing: You must add in the project the assembly Microsoft.Xna.Framework.Media. It allows you to access the Media Library … Continue reading [WP7] Add images in the Windows Phone 7 Media Library

[Silverlight] Three new Silverlight applications templates

Three new templates are available for Silverlight applications, both Silverlight Business Application and Silverlight Navigation Application. Furthermore style elements of these new themes are available to download, you can use them in any Silverlight applications. Finally these new themes include the new WCF RIA Services templates. These three new templates are : Windows 7 Cosmopolitan AccentColor   There are downloadable at this address, and these templates can easily be installed in Visual Studio 2010 : And Expression Blend 4 :

[OData] Use OData data with WCF Data Services and Silverlight 4

As seen before, OData (Open Data Protocol) is a protocol on top of HTTP, with a REST architecture and provide XML formatted data (e.g.: ATOM). WCF Data Services, included in Silverlight 4,will help us to handle data with OData. The purpose is to build a Silverlight master-detail application composed of a ComboBox control to choose a customer and a DataGrid Control to see all the Customer orders. We will use Customers and Orders tables from Northwind OData feed which is at this address : http://services.odata.org/Northwind/Northwind.svc/ We create a Silverlight 4 application and we add, in the Silverlight project, a reference … Continue reading [OData] Use OData data with WCF Data Services and Silverlight 4