Wonder how to make Rating control in Windows phone 8.1 as there is no toolkit support available for Windows RT apps :(
But No worry We have solutions for this.
Get the Rating control from Nuget.
But No worry We have solutions for this.
Get the Rating control from Nuget.
- https://www.nuget.org/packages/JISoft.Rating/
- Or use Package manager console to download
It's available for Windows RT apps (aka Windows phone 8.1 and Windows 8.1)
Now How to use
Now How to use
- It works in same way as Windows phone toolkit rating control works.
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App3"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:RatingControl="using:JISoft.RatingControl"
x:Class="App3.Page1"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<RatingControl:Rating HorizontalAlignment="Center" VerticalAlignment="Center"
AllowSelectingZero="True" ReadOnly="True"
RatingItemCount="5" Value="3">
<RatingControl:Rating.FilledItemStyle>
<Style TargetType="RatingControl:RatingItem">
<Setter Property="Background" Value="Goldenrod"/>
</Style>
</RatingControl:Rating.FilledItemStyle>
<RatingControl:Rating.UnfilledItemStyle>
<Style TargetType="RatingControl:RatingItem">
<Setter Property="Background" Value="Black"/>
</Style>
</RatingControl:Rating.UnfilledItemStyle>
</RatingControl:Rating>
</Grid>
</Page>
- It's complete code for Rating control, once u will put this code in XAML file it will start rendering the rating control
- Following properties are supported now
- RatingItemCount - max no of Stars
- Value - Allocated rating
- FilledItemStyle - Rating field style
- UnFilledItemStyle - Rating Empty style
- AllowSelecteingZero - Can user give zero rating
- ReadOnly - User allowed to Rate
Hi,
ReplyDeleteCan we set rating from its UI, if yes, please specify the property, I need that, thanks.
This comment has been removed by the author.
ReplyDelete"RatingCount" property will set max no of star
ReplyDelete"Value" property will set the rating
Both of these property can be set from UI.
Hi,
ReplyDeleteCan I set value by clicking?
set "ReadOnly" to false - then user can set by tapping/clicking.
ReplyDeleteOk, but how can I know which value I click?
Deleteso after clicking u will get the data from "Value" property
ReplyDeleteHi
ReplyDeleteHow do I let the user select a rating by clicking a star instead of dragging from left to right?
Hey!
ReplyDeleteWhen I set "ReadOnly" to false than I can set the rating by swiping, but tapping is not possible. Is there a way to do this?
Not right now. Will put that feature also.
DeleteHey, I wanna have a tapped rating control rather than a slider rating.Can you please help???
ReplyDeleteI am developing that part, Will update soon,
DeleteHi there. Thanks for your Rating control.
ReplyDeleteJus two things I noticed... if you set the RatingItemCount less than five the control becomes stretched. And the hitbox for clicking a single item is to small... you really have to hit the middle of each star (other than swiping which works perfect).
A few problems:
ReplyDelete- setting explicit height deforms the control because width is not computed accodrdingly
- when put in a viewbox to make it proportionally smaller, the stars ale aligned center, not recpecting that I set horizontal content alignment to left
Will test it and get the solutions for these problems.
DeleteThank you for the valuable feedback.
Hi,
ReplyDeleteCould you please publish your license terms for this component?
how to change that background color black
ReplyDeleteWill there be any upates to this? Would love to see the possibility to select a rating by tapping.
ReplyDelete