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

RadRibbonGallery apper error

1 Answer 38 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Ke
Top achievements
Rank 1
Ke asked on 16 Apr 2012, 04:54 AM
When I change a radribbonview control's theme ,RadRibbonGallery lost its scroll bar and button. Any suggestions?
first capture image is before use theme, second is after use theme.

code:       
         Theme ConvertToTheme(string themeName)
        {
            if (string.IsNullOrWhiteSpace(themeName))
                return new Windows7Theme();
            return (Theme)typeof(Theme).Assembly.CreateInstance(string.Format("Telerik.Windows.Controls.{0}Theme", themeName));
        }
    

        void SetGlobalTheme(Theme theme)
        {
            StyleManager.ApplicationTheme = theme;
            StyleManager.SetTheme(radRibbonView1, theme);

        }

        private void RadRibbonRadioButton_Click(object sender, RoutedEventArgs e)
        {
            RadRibbonRadioButton radioButton = (RadRibbonRadioButton)sender;
            Theme currentTheme = ConvertToTheme(radioButton.Text);//Button's content is theme name, like Office_Silver
            SetThemeToAllViews(currentTheme);
        }


1 Answer, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 18 Apr 2012, 10:29 AM
Hello Ke Yin,

 You shouldn't change at runtime the ApplicationTheme статиц property. You should only use the StyleManager.SetTheme method. Also you may try the new Implicit styles themes coming with the Q1.Sp1 release. 
You may examine the online demo of the Ribbon and changing the themes. (or your local wpf examples)

Kind regards,
Miro Miroslavov
the Telerik team

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

Tags
RibbonView and RibbonWindow
Asked by
Ke
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or