Implementing Implicit Themes in Silverlight 4

3 posts, 0 answers
  1. Sigd
    Sigd avatar
    8 posts
    Member since:
    Oct 2010

    Posted 29 Oct 2010 Link to this post

    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. Paul Brun
    Paul Brun avatar
    41 posts
    Member since:
    May 2010

    Posted 29 Oct 2010 Link to this post

    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
  3. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 31 Oct 2010 Link to this post

    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
Back to Top