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

Themes Broken ?

8 Answers 115 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 24 Oct 2011, 05:16 AM
Hi everyone, so i am using the latest release of silverlight telerik controls and i am trying to implement theming for all of my rad controls.

I use a number of telerik controls but for testing purposes i am trying to reskin a raddocking control. (Although i have test on gridviews/radpanes/toolbar e.t.c and nothing works.

No matter what theme i use , my visuals dont change. Am i missing something here ? Below is my xaml, i can change the theme to anything and its visual state doesnt change from its default behaviour.

I have all the theme references setup as well.

<telerik:RadDocking x:Name="Docking" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" ElementLoaded="Docking_ElementLoaded" PaneStateChange="Docking_PaneStateChange" telerik:StyleManager.Theme="Office_black">


8 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 24 Oct 2011, 01:42 PM
Hello Darren,

In the XAML snippet you posted, there is a minor spelling mistake, the theme should read "Office_Black" with "B" being a capital letter. The more important thing, however, is that you are applying the default theme, which is by default already applied, so a visual change in the RadDocking control will not be observed.

Please, also verify that you have added assembly reference to each theme you wish to use. If you are still experiencing difficulties using any theme, please share more details on your scenario. It would be best if you could send a sample project duplicating the issue.

Kind regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Darren
Top achievements
Rank 1
answered on 25 Oct 2011, 03:28 AM
Thanks for correcting the spelling mistake. I am aware it is the default theme but i have tried all the others (Vista e.t.c) with no change.
What telerik controls support themes ?

Grids/radpanes/raddocking/radtoolbar e.t.c ?


0
Dani
Telerik team
answered on 25 Oct 2011, 10:19 AM
Hello Darren,

All RadControls are supported in our Theming mechanism, i.e. all RadControls use themes.

I attach here a very basic sample using the Vista theme.

If you still have difficulties working with themes, please, send us a sample reproducing your issue which we can test.

Greetings,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Darren
Top achievements
Rank 1
answered on 26 Oct 2011, 08:47 AM
Thanks for this, it turns out one of my other projects was missing one of the theme.dlls which is why it wasnt appearing.
I do have another question though.

On my ribbon bar i have a theme selector combo (see below). This will then change my CurrentTheme property in my viewmodel. I then have my ribbon bar stylemanager set to bind to the currenttheme. This works in that it reskins the ribbon, however it doesnt reskin any of the menus/submenus/text on that ribbonbar. Do i need to somehow refresh its content ?

EDIT : The ribbonbar goes completely blacnk, if i minimise it and try to maximise it i get the following error

"

SCRIPT5022: Unhandled Error in Silverlight Application
Code: 2531
Category: ParserError
Message: Failed to assign to property 'System.Windows.Controls.ContentPresenter.Content'.
File:
Line: 4156
Position: 19
"

 

 

 

<telerik:RadRibbonSplitButton Text="Change" LargeImage="/Images/displayoptions.png" Size="Large

 

telerik:ScreenTip.Title="Change Theme"> 

 

<telerik:RadRibbonSplitButton.DropDownContent>

 

<telerik:RadContextMenu BorderThickness="0"> 

 

<telerik:RadMenuItem Header="Office_Black" Command="{Binding ToggleThemeCommand}" CommandParameter="Office_Black"/>

 

<telerik:RadMenuItem Header="Office_Blue" Command="{Binding ToggleThemeCommand}" CommandParameter="Office_Blue"/>

 

<telerik:RadMenuItem Header="Office_Silver" Command="{Binding ToggleThemeCommand}" CommandParameter="Office_Silver"/> 

 

<telerik:RadMenuItem Header="Expression_Dark" Command="{Binding ToggleThemeCommand}" CommandParameter="Expression_Dark"/></telerik:RadContextMenu> 

 

</telerik:RadRibbonSplitButton.DropDownContent> 

 

</telerik:RadRibbonSplitButton>


Currently the ToggleTHeme command simply does

 

public void ToggleTheme(string theme)

{

 

this.CurrentTheme = ThemeManager.FromName(theme as string);

}


and my ribbonbar xaml

 

 

<telerik:RadRibbonBar ApplicationButtonVisibility="Collapsed" TitleBarVisibility="Collapsed" telerik:KeyTipService.IsKeyTipsEnabled="True" MinimizeButtonVisibility="Visible" telerik:StyleManager.Theme="{Binding CurrentTheme}">


0
Darren
Top achievements
Rank 1
answered on 27 Oct 2011, 05:50 AM
Hi Dani,

a little more information about the problem here
http://www.telerik.com/community/forums/silverlight/docking/changing-docking-theme-loses-its-content.aspx

would appreciate any help :)
0
Tina Stancheva
Telerik team
answered on 31 Oct 2011, 10:30 AM
Hi Darren,

This is a known issue in the ribbon implementation. Currently you can change the theme of the control in run-time from outside the control. Basically if you move the RadRibbonSplitButton with the Themes outside of the RadRibbonBar definition, the theme of the control will be properly changed.
<telerik:RadRibbonBar ApplicationButtonVisibility="Collapsed"
                        MinimizeButtonVisibility="Visible"
                        telerik:KeyTipService.IsKeyTipsEnabled="True"
                        telerik:StyleManager.Theme="{Binding CurrentTheme}"
                        TitleBarVisibility="Collapsed">
    <telerik:RadRibbonTab Header="Home">
        <telerik:RadRibbonGroup Header="Themes" />
    </telerik:RadRibbonTab>
</telerik:RadRibbonBar>
<telerik:RadRibbonSplitButton Grid.Row="1"
                                VerticalAlignment="Top"
                                LargeImage="/Images/displayoptions.png"
                                Size="Large"
                                telerik:ScreenTip.Title="Change Theme"
                                Text="Change">
    <telerik:RadRibbonSplitButton.DropDownContent>
        <telerik:RadMenu BorderThickness="0" Orientation="Vertical">
            <telerik:RadMenuItem Command="{Binding ToggleThemeCommand}"
                                    CommandParameter="Office_Black"
                                    Header=" Office_Black" />
            <telerik:RadMenuItem Command="{Binding ToggleThemeCommand}"
                                    CommandParameter="Office_Blue"
                                    Header="Office_Blue" />
            <telerik:RadMenuItem Command="{Binding ToggleThemeCommand}"
                                    CommandParameter="Office_Silver"
                                    Header="Office_Silver" />
            <telerik:RadMenuItem Command="{Binding ToggleThemeCommand}"
                                    CommandParameter="Expression_Dark"
                                    Header="Expression_Dark" />
        </telerik:RadMenu>
    </telerik:RadRibbonSplitButton.DropDownContent>
</telerik:RadRibbonSplitButton>

Also, due to the many known limitations of the current implementation of the RadRibbonBar control, with the Q2 release of the RadControls for Silverlight and WPF we announced the new RadRibbonView control. It keeps the RibbonBar API but it significantly improves the design-time and databinding support of the control, as well as its functionality. In this blog post you can find more info about the differences between the two controls and a list of improvements that the RadRibbonView control brings to the "ribbon" UI.

Unfortunately the run-time theme change issue is not resolved in the RibbonView control as well, but it is logged in our PITS and we will do our best to fix it as soon as possible.

Moreover, please keep in mind that the RadContextMenu control is designed to behave as a ContextMenu that is opened on an element after a right-click action. And when it is used as a DropDownContent of a Button it might not behave properly. This is why we recommend using a RadMenu or a ListBox control to define a list of options inside the RadRibbonSplit/DropDownButtons.

Greetings,
Tina Stancheva
the Telerik team

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

0
Darren
Top achievements
Rank 1
answered on 01 Nov 2011, 02:21 AM
Hi tina, thanks for the detailed response. I have since changed my code a little but i am still getting errrors with dynamic theme switching on ribbon bars.

I also see the same behaviors with docking controls, is that also a known issue ?

<telerik:RadComboBox x:Name="comboTheme" Visibility="Collapsed" SelectionChanged="comboTheme_SelectionChanged" SelectedIndex="0" HorizontalContentAlignment="Center" Width="150">

 

<telerik:Office_BlackTheme/>

 

<telerik:Office_BlueTheme/>

 

<telerik:Office_SilverTheme/>

 

<telerik:MetroTheme/>

 

<telerik:VistaTheme/>

 

<telerik:Windows7Theme/>

 

<telerik:SummerTheme/>

 

<telerik:Expression_DarkTheme/>

 

</telerik:RadComboBox>

 

 

<telerik:RadRibbonBar x:Name="RibbonBarControl" ApplicationButtonVisibility="Collapsed" TitleBarVisibility="Collapsed" telerik:KeyTipService.IsKeyTipsEnabled="True" MinimizeButtonVisibility="Visible" telerik:StyleManager.Theme="{Binding ElementName=comboTheme,Path=SelectedItem,Mode=TwoWay}">

<telerik:RadRibbonTab Header="Home">


0
Petar Mladenov
Telerik team
answered on 03 Nov 2011, 06:25 PM
Hello Darren,

 Could you please check out our test project which demonstrates how the theme of RadRibbonBar and RadDocking is changed dynamically and let us know if we have missed something? 

Greetings,
Petar Mladenov
the Telerik team

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

Tags
General Discussions
Asked by
Darren
Top achievements
Rank 1
Answers by
Dani
Telerik team
Darren
Top achievements
Rank 1
Tina Stancheva
Telerik team
Petar Mladenov
Telerik team
Share this question
or