creating a 5-stars style rating control in XAMLHi there,<br><br>I'm a designer getting to grips with WPF, I'm trying to make a 5/10-star rating slider type control, mirroring the functionality on my website <a title="http://www.blowersworld.com/index.php?option=com_hotornot2&amp;Itemid=26" href="http://www.blowersworld.com/index.php?option=com_hotornot2&amp;Itemid=26">http://www.blowersworld.com/</a> (not as rude as it sounds) - I have tried styling a slider control with stars instead of ticks, but can't seem to drill down to an individual tick mark.<br><br>I am starting to think about using a row of radio or toggle buttons. Anyone have any better ideas?<br><br>Thanks!<br><br>felix<br>© 2009 Microsoft Corporation. All rights reserved.Sun, 07 Jun 2009 12:35:33 Z38e7296a-9892-4719-a69d-a89dea1549c0http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#38e7296a-9892-4719-a69d-a89dea1549c0http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#38e7296a-9892-4719-a69d-a89dea1549c0felixthehathttp://social.msdn.microsoft.com/Profile/en-US/?user=felixthehatcreating a 5-stars style rating control in XAMLHi there,<br><br>I'm a designer getting to grips with WPF, I'm trying to make a 5/10-star rating slider type control, mirroring the functionality on my website <a title="http://www.blowersworld.com/index.php?option=com_hotornot2&amp;Itemid=26" href="http://www.blowersworld.com/index.php?option=com_hotornot2&amp;Itemid=26">http://www.blowersworld.com/</a> (not as rude as it sounds) - I have tried styling a slider control with stars instead of ticks, but can't seem to drill down to an individual tick mark.<br><br>I am starting to think about using a row of radio or toggle buttons. Anyone have any better ideas?<br><br>Thanks!<br><br>felix<br>Fri, 03 Aug 2007 10:14:17 Z2007-08-09T04:16:27Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#5dc9701c-e04f-476d-b0d9-3289ffe8ea61http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#5dc9701c-e04f-476d-b0d9-3289ffe8ea61Zhou Yonghttp://social.msdn.microsoft.com/Profile/en-US/?user=Zhou%20Yongcreating a 5-stars style rating control in XAML<font size=2><span style="font-family:Verdana">Using a row of toggle buttons can be an option to go, here is an example:</span><br style="font-family:Verdana"></font><pre class=code style="font-family:Verdana"><font size=2><span style="color:rgb(0,0,255)">&lt;</span><span style="color:rgb(163,21,21)">StackPanel</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">x:Class</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Mp3TagReader.RatingCell</span>&quot;<br><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">xmlns</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">http://schemas.microsoft.com/winfx/2006/xaml/presentation</span>&quot;<br><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">xmlns:x</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">http://schemas.microsoft.com/winfx/2006/xaml</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Orientation</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Horizontal</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">HorizontalAlignment</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Center</span>&quot;<span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">StackPanel.Resources</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Style</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">x:Key</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">ratingButton</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">TargetType</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Type ToggleButton}</span>&quot;<span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Setter</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Property</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Template</span>&quot;<span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Setter.Value</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ControlTemplate</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">TargetType</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Type ToggleButton}</span>&quot;<span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Path</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Name</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">starPath</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Fill</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Gray</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Data</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">M 9,0 L 7,6 L 0,6 L 6,11 L 4,17 L 9,12 L 14,17 L 12,11 L 18,6 L 11,6 L 9,0</span>&quot;<span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Path.LayoutTransform</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ScaleTransform</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">ScaleX</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">0.8</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">ScaleY</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">0.8</span>&quot;<span style="color:rgb(0,0,255)"> /&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">Path.LayoutTransform</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">Path</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ControlTemplate.Triggers</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Trigger</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Property</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">IsChecked</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Value</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">True</span>&quot;<span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">Setter</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">TargetName</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">starPath</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Property</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Fill</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Value</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">Gold</span>&quot;<span style="color:rgb(0,0,255)">/&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">Trigger</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">ControlTemplate.Triggers</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">ControlTemplate</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">Setter.Value</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">Setter</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">Style</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;/</span><span style="color:rgb(163,21,21)">StackPanel.Resources</span><span style="color:rgb(0,0,255)">&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ToggleButton</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">FocusVisualStyle</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Null}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Tag</span><span style="color:rgb(0,0,255)"> =</span>&quot;<span style="color:rgb(0,0,255)">1</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Width</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Height</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Style</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{StaticResource ratingButton}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Click</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">RatingButtonClickEventHandler</span>&quot;<span style="color:rgb(0,0,255)"> /&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ToggleButton</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">FocusVisualStyle</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Null}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Tag</span><span style="color:rgb(0,0,255)"> =</span>&quot;<span style="color:rgb(0,0,255)">2</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Width</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Height</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Style</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{StaticResource ratingButton}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Click</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">RatingButtonClickEventHandler</span>&quot;<span style="color:rgb(0,0,255)">/&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ToggleButton</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">FocusVisualStyle</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Null}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Tag</span><span style="color:rgb(0,0,255)"> =</span>&quot;<span style="color:rgb(0,0,255)">3</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Width</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Height</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Style</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{StaticResource ratingButton}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Click</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">RatingButtonClickEventHandler</span>&quot;<span style="color:rgb(0,0,255)">/&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ToggleButton</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">FocusVisualStyle</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Null}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Tag</span><span style="color:rgb(0,0,255)"> =</span>&quot;<span style="color:rgb(0,0,255)">4</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Width</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Height</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Style</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{StaticResource ratingButton}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Click</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">RatingButtonClickEventHandler</span>&quot;<span style="color:rgb(0,0,255)">/&gt;<br> &lt;</span><span style="color:rgb(163,21,21)">ToggleButton</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">FocusVisualStyle</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{x:Null}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Tag</span><span style="color:rgb(0,0,255)"> =</span>&quot;<span style="color:rgb(0,0,255)">5</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Width</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Height</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">20</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Style</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">{StaticResource ratingButton}</span>&quot;<span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">Click</span><span style="color:rgb(0,0,255)">=</span>&quot;<span style="color:rgb(0,0,255)">RatingButtonClickEventHandler</span>&quot;<span style="color:rgb(0,0,255)">/&gt;<br>&lt;/</span><span style="color:rgb(163,21,21)">StackPanel</span><span style="color:rgb(0,0,255)">&gt;<br><br></span><span style="color:rgb(0,0,255)">using</span> System;<br><span style="color:rgb(0,0,255)">using</span> System.Collections.Generic;<br><span style="color:rgb(0,0,255)">using</span> System.Text;<br><span style="color:rgb(0,0,255)">using</span> System.Windows;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Controls;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Controls.Primitives;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Data;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Documents;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Input;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Media;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Media.Imaging;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Navigation;<br><span style="color:rgb(0,0,255)">using</span> System.Windows.Shapes;<br><br><span style="color:rgb(0,0,255)">namespace</span> Mp3TagReader<br>{<br> <span style="color:rgb(0,0,255)">public</span> <span style="color:rgb(0,0,255)">partial</span> <span style="color:rgb(0,0,255)">class</span> <span style="color:rgb(43,145,175)">RatingCell</span> : <span style="color:rgb(43,145,175)">StackPanel<br></span> {<br> <span style="color:rgb(0,0,255)">public</span> RatingCell()<br> {<br> InitializeComponent();<br> }<br><br> <span style="color:rgb(0,0,255)">public</span> <span style="color:rgb(0,0,255)">static</span> <span style="color:rgb(0,0,255)">readonly</span> <span style="color:rgb(43,145,175)">DependencyProperty</span> RatingValueProperty = <span style="color:rgb(43,145,175)">DependencyProperty</span>.Register(<br> <span style="color:rgb(163,21,21)">&quot;RatingValue&quot;</span>,<br> <span style="color:rgb(0,0,255)">typeof</span>(<span style="color:rgb(43,145,175)">Int32</span>),<br> <span style="color:rgb(0,0,255)">typeof</span>(<span style="color:rgb(43,145,175)">RatingCell</span>),<br> <span style="color:rgb(0,0,255)">new</span> <span style="color:rgb(43,145,175)">PropertyMetadata</span>(0, <span style="color:rgb(0,0,255)">new</span> <span style="color:rgb(43,145,175)">PropertyChangedCallback</span>(RatingValueChanged)));<br><br> <span style="color:rgb(0,0,255)">public</span> <span style="color:rgb(43,145,175)">Int32</span> RatingValue<br> {<br> <span style="color:rgb(0,0,255)">get</span> <br> { <br><br> <span style="color:rgb(0,0,255)">return</span> (<span style="color:rgb(43,145,175)">Int32</span>)GetValue(RatingValueProperty); <br> }<br> <span style="color:rgb(0,0,255)">set</span> <br> {<br> <span style="color:rgb(0,0,255)">if</span> (<span style="color:rgb(0,0,255)">value</span> &lt; 0)<br> {<br> SetValue(RatingValueProperty, 0);<br> }<br> <span style="color:rgb(0,0,255)">else</span> <span style="color:rgb(0,0,255)">if</span> (<span style="color:rgb(0,0,255)">value</span> &gt; 5)<br> {<br> SetValue(RatingValueProperty, 5);<br> }<br> <span style="color:rgb(0,0,255)">else<br></span> {<br> SetValue(RatingValueProperty, <span style="color:rgb(0,0,255)">value</span>);<br> }<br> }<br> }<br><br> <span style="color:rgb(0,0,255)">private</span> <span style="color:rgb(0,0,255)">static</span> <span style="color:rgb(0,0,255)">void</span> RatingValueChanged(<span style="color:rgb(43,145,175)">DependencyObject</span> sender, <span style="color:rgb(43,145,175)">DependencyPropertyChangedEventArgs</span> e)<br> {<br> <span style="color:rgb(43,145,175)">RatingCell</span> parent = sender <span style="color:rgb(0,0,255)">as</span> <span style="color:rgb(43,145,175)">RatingCell</span>;<br> <span style="color:rgb(43,145,175)">Int32</span> ratingValue = (<span style="color:rgb(43,145,175)">Int32</span>) e.NewValue;<br> <span style="color:rgb(43,145,175)">UIElementCollection</span> children = parent.Children;<br><br> <span style="color:rgb(43,145,175)">ToggleButton</span> button = <span style="color:rgb(0,0,255)">null</span>;<br> <span style="color:rgb(0,0,255)">for</span> (<span style="color:rgb(43,145,175)">Int32</span> i = 0; i &lt; ratingValue; i++)<br> {<br> button = children<img height=19 alt=Idea src="http://forums.microsoft.com/MSDN/emoticons/emotion-55.gif" width=19> <span style="color:rgb(0,0,255)">as</span> <span style="color:rgb(43,145,175)">ToggleButton</span>;<br> button.IsChecked = <span style="color:rgb(0,0,255)">true</span>;<br> }<br><br> <span style="color:rgb(0,0,255)">for</span> (<span style="color:rgb(43,145,175)">Int32</span> i = ratingValue; i &lt; children.Count; i++)<br> {<br> button = children<img height=19 alt=Idea src="http://forums.microsoft.com/MSDN/emoticons/emotion-55.gif" width=19> <span style="color:rgb(0,0,255)">as</span> <span style="color:rgb(43,145,175)">ToggleButton</span>;<br> button.IsChecked = <span style="color:rgb(0,0,255)">false</span>;<br> }<br> }<br><br> <span style="color:rgb(0,0,255)">private</span> <span style="color:rgb(0,0,255)">void</span> RatingButtonClickEventHandler(<span style="color:rgb(43,145,175)">Object</span> sender, <span style="color:rgb(43,145,175)">RoutedEventArgs</span> e)<br> {<br> <span style="color:rgb(43,145,175)">ToggleButton</span> button = sender <span style="color:rgb(0,0,255)">as</span> <span style="color:rgb(43,145,175)">ToggleButton</span>;<br> RatingValue = <span style="color:rgb(43,145,175)">Int32</span>.Parse((<span style="color:rgb(43,145,175)">String</span>)button.Tag);<br> }<br> }<br>}<br><br>This is a resuable user control, you can place it anywhere you like:<br></font><span style="color:rgb(0,0,255)">&lt;</span><span style="color:rgb(163,21,21)">cc:RatingCell</span><span style="color:rgb(0,0,255)"> </span><span style="color:rgb(255,0,0)">RatingValue</span><span style="color:rgb(0,0,255)">=</span>&quot;<font color="#0000ff">5</font>&quot;<span style="color:rgb(0,0,255)"> /&gt;<br><br>Sheva<br></span><font size=2><br></font></pre><font size=2><br style="font-family:Verdana"></font>Fri, 03 Aug 2007 10:57:13 Z2007-08-09T04:16:27Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#add41f31-e2e9-46ec-985d-7ee5d1b2f61ahttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#add41f31-e2e9-46ec-985d-7ee5d1b2f61aNickehttp://social.msdn.microsoft.com/Profile/en-US/?user=Nickecreating a 5-stars style rating control in XAML<p align=left><font face=Arial size=2>Great sample! </font><font face=Arial size=2>I made some minor changes to your code and fixed some small issues and blogged about it here: <a title="http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html" href="http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html">http://nickeandersson.blogs.com/blog/2008/02/a-rating-contro.html</a>.</font></p>Wed, 20 Feb 2008 19:01:10 Z2008-02-20T19:01:10Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#a2859581-f703-4459-b271-357d3324efaehttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#a2859581-f703-4459-b271-357d3324efaefelixthehathttp://social.msdn.microsoft.com/Profile/en-US/?user=felixthehatcreating a 5-stars style rating control in XAMLGod did I never reply to this? Sorry - I believe this was when I left one job to start another, how rude of me. Nonetheless I shall give it a whirl tomorrow and incorporate into my next projext <img height=19 alt=Smile src="http://forums.microsoft.com/MSDN/emoticons/emotion-1.gif" width=19><br><br>Thanks again!<br>Wed, 20 Feb 2008 21:18:43 Z2008-02-20T21:18:43Zhttp://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#94e1498e-360d-4266-8976-17099a8d29c0http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/38e7296a-9892-4719-a69d-a89dea1549c0#94e1498e-360d-4266-8976-17099a8d29c0ls782http://social.msdn.microsoft.com/Profile/en-US/?user=ls782creating a 5-stars style rating control in XAMLThis looks really useful thanks for posting <br/> <br/>  can Anyone tell Help me read / set the rating value in visual basic code.  I have tried loads of things but not sure .<br/>  <br/> <br/> <br/> I think it works by assigning a style to each button so i need to do this in vb ?<br/> <br/> <br/> Any help would be really good <br/> <br/> cheers<br/> <br/> lukeSun, 07 Jun 2009 12:35:33 Z2009-06-07T12:35:33Z