in

WPF Design and Development

IdentityMine Team Blogs

Jobi K Joy

An Experiment to create a Rating control

I guess most of you have noticed the Community Server’s Blog rating control above. Since I learned some basics of making WPF controls through the IdentityMine training program, I thought of implementing this small control. Initially the idea that came to my mind was to create a user control and put as many styled buttons (or images or any Content Control) in to a panel as the maximum rating required for the control. When I started coding a fresh control I realized that the dependency properties are exactly matching with that of a Slider control. A WPF look less rating control can be made up of a Rating Range and a Rating Value as its minimum DP. A Slider also has Minimum, Maximum and Value as DP properties. So this approach doesn't require a single line of C# code to extent the Slider to Rating control. Some of my experiments are shown below.  Here I styled the Track and RepeatButton of the Slider control template to achieve this. Hope someone out here can style it for a perfect look as in Community Server or even better.

I am attaching my the source code also here.

Thanks

Jobi K Joy

Comments

 

Daily News Faq List said:

Jobi K Joy's first blog post covers a Community Server rating control Jobi wrote with Windows Presentation
November 22, 2006 8:07 AM
 

Community Server Bits said:

Jobi K Joy's first blog post covers a Community Server rating control Jobi wrote with Windows Presentation
March 12, 2007 5:48 AM
© 2007 IdentityMine, Inc.
Powered by Community Server (Commercial Edition), by Telligent Systems