Skip to content

Using the Rating Control in Windows Phone 7

October 15, 2010

n.b.: an update on the “half star”

For every UI framework you have a set of controls coming with it: textbox, button, listbox, etc. If you want more you need either to buy a license from third-party providers such as Telerik or develop your own custom controls which is not always trivial. Microsoft provides additional controls in a package called Silverlight Toolkit. Some will be integrated in the next release of the framework but  in the meantime you can use them and — since the source code is provided — modify them.

Silverlight for Windows Phone is hardly better: since Microsoft needed to ship the mobile OS as soon as possible they were not able to ship as many controls as in the desktop version. So here is a much-needed toolkit for Windows Phone including  WrapPanel, DatePicker etc.

But even the toolkit doesn’t come with all the controls shipping with the desktop version and among the missing is the rating control:


But you can grab the code and compile it on Silverlight for Windows Phone. Here’s the result of my import. You need to get all the classes from the toolkit and some from the common package. The default style is inside the generic.xaml file under the Themes folder (it’s a convention-based configuration. Since WPF all controls have their UI defined in a separate class from their behaviors).

I imported the “Half Star” style from the samples project inside the App.xaml file.

rating control on windows phone

Here’s the Visual Studio project with the control.

8 Comments leave one →
  1. Shane Wilson permalink
    January 2, 2011 4:37 pm

    Nice job. Really helpful

  2. Lidan permalink
    April 8, 2012 5:35 pm

    Thanks for sharing! You’ve helped me a lot

  3. July 24, 2012 4:51 am

    Thank you very much dude!! Been searching for this everywhere on the net!


  1. Windows Phone 7 Developer Links « C Is For Coder
  2. Update on the rating control « Windows Phone 7 Wonders
  3. Listbox with more than one Controls in WP7 using C# | PHP Developer Resource
  4. Rate control star for rating purpose in windows phone 8 | BlogoSfera

Leave a Reply

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

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google 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

%d bloggers like this: