Using WCF RIA Services in Windows Phone 7

Unfortunately, there is no “Rich Client Experience” built-in support for Windows Phone 7 in RIA Services V1.0

With that said, you can still enable a Windows Phone 7 application to communicate with a DomainService since Windows Phone 7 has support on talking to WCF Service and here is how…

A. Let get all the tools:

  1. Install the latest Silverlight Tools from here (contains RIAServices, SL4 Sdk, SL4 Runtime etc)
  2. Install the RIA Services March 2009 Toolkit from here
  3. Install the Mobile Tools CTP from here

B. Create a new DomainService on server-side

C. Expose WCF endpoints:

D. Consume the WCF endpoints. . An example explains how you can do CRUD operation with the SOAP endpoint of a DomainService. You can find it here.



Ten Cool Features in Visual Studio 2010

1. Pinning variables when debugging


2. Box selection


Brittany Behrens from the Visual Studio Editor Team has an excellent 3 minute video that shows off a few cool VS 2010 multi-line code editing scenarios with box selection

3. On-the-fly search

When pressing Crtl and , (comma) the new Navigate To window appears. This is a real-time search window offering basically the same functionality as the Find and Replace window (opened by Crtl + Shift + F) but doing it on-the fly

4. Zooming


5. View call hierarchy


6. Sequence diagrams


7. Dependency graphs


8. IntelliTrace and dump debugging

9. Multi-monitor support

Click on the document tab or tool window and drag outside the IDE to any location on any monitor.


10. Intellisense improvements

a. When selecting any variable, all instances of it are highlighted

b. Search is not limited to prefixes


Data binding User Settings in Windows Phone applications


The canonical example of user settings is a “Show this welcome screen at startup” checkbox so that your application can offer a nice out-of-box experience.

By writing a simple type with some properties, adding a few helper files, and setting up a two-way data binding, you can store any settings without having to write special code.

Here’s what the completed project’s two-way data binding looks like for the checkbox:

  1. <CheckBox
  2. IsChecked="{Binding Source={StaticResource MySettings}, Path=IsFirstRun, Mode=TwoWay}"
  3. Content="Show this page at startup"
  4. />
  • Source is a static resource, a strongly typed settings class you define
  • Path points to the property name to bind to
  • Binding is two-way so that the value is stored automatically
  • Value and type converters can be applied as always in bindings if necessary
Creating your configuration/settings type

Next, we need to create a strongly typed configuration class that derives from my SettingsProvider type. This class must:

  • Implement INotifyPropertyChanged, so that bindings work well
  • Have properties of the appropriate type for the settings you are interested in. Optionally, include the DefaultValue attribute to provide defaults.
  1. using System.ComponentModel; 
  2. using JeffWilcox.Settings; 
  3. namespace Sample 
  4. /// <summary>
  5. /// My settings class for storing application data and setting specific to
  6. /// the user.
  7. /// </summary>
  8. public class MySettings : SettingsProvider 
  9.     { 
  10. private bool _isFirstRun; 
  11. private string _hello; 
  12. public MySettings() : base("MySettings.xml") { } 
  13.         [DefaultValue("What’s up?")] 
  14. public string HelloWorld 
  15.         { 
  16. get { return _hello; } 
  17. set
  18.             { 
  19.                 _hello = value; 
  20.                 NotifyPropertyChanged("HelloWorld"); 
  21.             } 
  22.         } 
  23.         [DefaultValue(true)] 
  24. public bool IsFirstRun 
  25.         { 
  26. get { return _isFirstRun; } 
  27. set
  28.             { 
  29. bool old = _isFirstRun; 
  30.                 _isFirstRun = value; 
  31. if (value != old) 
  32.                 { 
  33.                     NotifyPropertyChanged("IsFirstRun"); 
  34.                 } 
  35.             } 
  36.         } 
  37.     } 

Via Jeff Wilcox – Data binding user settings in Windows Phone applications

A guide to what has changed in the Silverlight 4 RC

This is not all-inclusive, but I think a list of some that most will want to know about.



Via A guide to what has changed in the Silverlight 4 RC