radwaitingbar theming issue

2 posts, 0 answers
  1. Peter
    Peter avatar
    6 posts
    Member since:
    Nov 2006

    Posted 20 Dec 2007 Link to this post


    I am creating a waitingbar control at runtime and when the control is displayed the default theming of the control is not applied. White bar is shown.

    radWaitingBar1 = new Telerik.WinControls.UI.RadWaitingBar();
    radWaitingBar1.Location = new System.Drawing.Point(110, 38);
    radWaitingBar1.Name = "radWaitingBar1";
    radWaitingBar1.Size = new System.Drawing.Size(150, 15);
    radWaitingBar1.TabIndex = 0;
    radWaitingBar1.WaitingSpeed = 10;
    radWaitingBar1.ThemeClassName = "Telerik.WinControls.UI.RadWaitingBar";

    If I place the control on the form at design time, the theming is shown. (green bar)

    I was hoping to avoid having to set the UI primitives. What properties should I be setting to get the control's default theme?

  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 21 Dec 2007 Link to this post

    Hello Peter,

    Thank you for contacting us with this question.
    When you create a RadWaitingBar at run-time, you should set the theme name.

    The default control theme is ControlDefault, so the code is:

                RadWaitingBar radWaitingBar1 = new Telerik.WinControls.UI.RadWaitingBar();  
                radWaitingBar1.Location = new System.Drawing.Point(110, 38);  
                radWaitingBar1.Name = "radWaitingBar1";  
                radWaitingBar1.Size = new System.Drawing.Size(150, 15);  
                radWaitingBar1.TabIndex = 0;  
                radWaitingBar1.WaitingSpeed = 10;  
                radWaitingBar1.ThemeClassName = "Telerik.WinControls.UI.RadWaitingBar";  
                radWaitingBar1.ThemeName = "ControlDefault";  

    Should you have addtional questions, do not hesitate to contact us.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top