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

[Solved] Setting theme in styles

3 Answers 124 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Deven
Top achievements
Rank 1
Deven asked on 20 Sep 2010, 03:33 PM
Hi,

I am using GridView with the office theme. However, I am not using the same theme for other controls. I am using styles for all the controls.  Is there a way I can set the theme in the Style, instead of inline with the control?

Thanks
Deven

3 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 22 Sep 2010, 09:45 AM
Hi Deven,

There is no problem to set a theme in Style Setter that is targeted at particular control,supported by that theme.I have created an example for you that demonstrates this approach using RadGridView and RadDateTimePicker,that are styled in our Transparent Theme. 
Please let me know if you need any further assistance.

All the best,
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
0
Deven
Top achievements
Rank 1
answered on 02 Nov 2010, 02:23 PM
Hi,
Sorry for delay in my reply. I tried this but it is this not working in Silverlight 3. The difference I found is that your xaml references to Telerik Presentation, where as my xaml refers to Telerik Controls. Is that causing a problem?

Thanks
Deven
0
Vanya Pavlova
Telerik team
answered on 04 Nov 2010, 07:31 PM
Hi Deven,

In Silverlight 3 you should follow the markup below:

<UserControl
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls; assembly=Telerik.Windows.Controls"
    xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    x:Class="StyleManagerInStyle.MainPage"
    Width="640" Height="480">
<UserControl.Resources>
<Style x:Key="style1" TargetType="telerikGridView:RadGridView">
        <Setter Property="telerik:StyleManager.Theme" Value="Vista"/>
    </Style>
</UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
        <telerikGridView:RadGridView Style="{StaticResource style1}"  Margin="48,56,40,176"/>
    </Grid>
</UserControl>


Sincerely yours,
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
GridView
Asked by
Deven
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Deven
Top achievements
Rank 1
Share this question
or