This is a migrated thread and some comments may be shown as answers.
RadRating even if ItemsSource=null
2 Answers 23 Views
This is a migrated thread and some comments may be shown as answers.
Kacem
Top achievements
Rank 1
Kacem asked on 02 Sep 2011, 02:53 PM
Hi,

With this code :
 <telerik:RadRating ItemsSource="{Binding}" Value="{Binding}" />
and in code behind :
DataContext = null;

The RadRating control is shown with 5 stars ... How can i disable it (using XAML) if DataContext = null ? 

Thanks

Kacem

2 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Stanoev
Telerik team
answered on 02 Sep 2011, 03:38 PM
Hi Kacem,

If the DataContext is null you can set the NumberOfItemsToGenerate="0". This will force RadRating not to show any stars. Let me know if this helps.

Best wishes,
Kiril Stanoev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Kacem
Top achievements
Rank 1
answered on 03 Sep 2011, 02:03 PM
Thank you it work ;)
Asked by
Kacem
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Kacem
Top achievements
Rank 1
Share this question
or