This is a migrated thread and some comments may be shown as answers.

Set Width and Remove the Mouse Over Effect

1 Answer 94 Views
Rating
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 06 Dec 2011, 01:03 PM
I put the Telerik Rating Control. Below is the Code:

 <telerik:RadRating Value="{Binding Score}" ToolTipService.ToolTip="{Binding Score,Converter={StaticResource ScoreConverter}}"  
                                                    Grid.Row="0" Grid.Column="1" Precision="Exact"/>

In the above i want the following thing

1) I need to remove the Mouse Over Effect.
2) I want to set the width of rating Control i.e Size of each star to be reduced.
3) I want a Tooltip.

Note: When I set the IsEnabled=False Property, then the ToolTip does not come.

Please give the Feedback ASAP.

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 09 Dec 2011, 12:58 PM
Hello Kevin,

 In order to increase/decrease the RadRatingItems' size depending on the Width and height of the RadRating, you can use ViewBox in the Template like so;

<Setter Property="Template">
               <Setter.Value>
                   <ControlTemplate TargetType="telerik:RadRating">
                       <Viewbox>
                           <Grid x:Name="Root">
                               <VisualStateManager.VisualStateGroups>
Unfortunately, controlling the MouseOver effect cannot be made by Style only since this logic is mainly build in code behind. Even setting Transparent colors and removing the MouseOver VisualState won't help.
As for the tooltip issue, usually in Silverlight this is workarounded like so:
<Border ToolTipService.ToolTip="Custom Tooltip" Background="Transparent" x:Name="border" HorizontalAlignment="Center" VerticalAlignment="Center">
           
          <telerik:RadRating Width="350"
                             HorizontalAlignment="Center"
                             VerticalAlignment="Center"
                             IsEnabled="false"
                             Precision="Exact"
                             x:Name="rating"
                             Style="{StaticResource RadRatingStyle1}"
                             ToolTipService.ToolTip="{Binding Score}"
                             Value="{Binding Score}" />
 
      </Border>
Unfortunately, showing the tooltip breaks the Disabled colors in the Radrating which is a bug.
Please feel free to ask if you need further assistance. Greetings,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Rating
Asked by
Kevin
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or