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

Implementing Implicit Themes in Silverlight 4

2 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sigd
Top achievements
Rank 1
Sigd asked on 29 Oct 2010, 11:52 AM
I am trying to use an implicit theme for my RadGridView control to colour my rows in Silverlight 4.  My problem is that in my Style element in the XAML editor I get the error "Type 'telerik:GridViewRow' was not found".

The example given in the Telerik performance Issues page is as follows:-

<UserControl.Resources>
   <Style TargetType="telerik:GridViewRow">
 <Setter Property="Background" Value="Blue"/>   
   </Style>        
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Margin="100">   
  <telerik:RadGridView ItemsSource="{Binding Data}" />
</Grid>

I do have the namespace reference.
xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
 
I am using the Silverlight telerik Controls Q1 2010 SP2.

Cheers,
Sigd.

2 Answers, 1 is accepted

Sort by
0
Paul Brun
Top achievements
Rank 2
answered on 29 Oct 2010, 04:11 PM
I have tried the following suggestion from Telerik:

If you want to avoid similar errors, please use a global unified namespace:


then was referred to this forum, but it hasn't helped me as I am getting the following error in Expression Blend (works in VS 2010).

This is using the latest release libraries (2010.2.924.1040)

Paul
0
Vanya Pavlova
Telerik team
answered on 31 Oct 2010, 12:26 PM
Hi Sigd,

If you follow this matter you should change the namespaces in your xaml file in this way:

<UserControl
    xmlns:gridRow="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    xmlns:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
    x:Class="ImplicitRowStyle.MainPage"
    Width="640" Height="480">
<UserControl.Resources>
    <Style TargetType="grid:GridViewRow">
        <Setter Property="Background" Value="Red"/>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource SampleDataSource}}">
        <gridRow:RadGridView ItemsSource="{Binding Collection}"/>
    </Grid>
</UserControl>

In order to minimize similar errors I would recommend you to use the following global namespace:


Kind regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Sigd
Top achievements
Rank 1
Answers by
Paul Brun
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or