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

Theme Issue: RadVScrollbar Added Dynamically

1 Answer 58 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Joshua Greenberg
Top achievements
Rank 1
Joshua Greenberg asked on 25 Oct 2008, 09:00 PM

I'm having a theme issue regarding a rad scroll bar that is dynamically added to a custom component.

I have loaded the RadThemeManager and am able to check the count to see in fact that the RadThemeManager is loaded with our themes, everything looks to be loaded as expected.

I create the RadVScrollBar control and set correct the theme name.

However, when the page is loaded the scroll bar is still using the default theme.  Here are some code excerpts:

    public partial class ThumbViewer : RadPanel
    {
        public ThumbViewer()
        {
            InitializeComponent();

            // This will get all the themes loaded into a theme manager
            themeEngine = new APCM.App_Code.ThemeEngine();
            radThemeManager = themeEngine.GetControlThemes();
            MessageBox.Show(radThemeManager.LoadedThemes.Count.ToString());
            
            // Create and add the scrollbar
            scroll = new RadVScrollBar();
            scroll.ThemeName = "OurTheme";
            scroll.Dock = DockStyle.Right;
            scroll.ValueChanged += new EventHandler(scroll_ValueChanged);
            MessageBox.Show(scroll.ThemeName);
        }
    }

Like I said, the rad scroll bar is NOT loaded with the expected theme.

Thanks In Advance,
Josh

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 29 Oct 2008, 10:17 AM
Hi Joshua Greenberg,

Thank you for reporting this issue.

I was able to reproduce it. It will be addressed in one of our next versions. For the time being, please set the ThemeName after the RadVScrollBar is added to the controls collection:
scroll = new RadVScrollBar();  
scroll.BeginInit();  
scroll.Dock = DockStyle.Right;  
scroll.EndInit();  
this.Controls.Add(scroll);  
scroll.ThemeName = "ScrollBarCustomTheme"

I hope this helps. Your Telerik points account is updated for the report. If you have additional questions, feel free to contact me. 

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Themes and Visual Style Builder
Asked by
Joshua Greenberg
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or