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

radwaitingbar theming issue

1 Answer 117 Views
WaitingBar
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 21 Dec 2007, 03:13 AM
Hi,

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?

Cheers
Peter

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 21 Dec 2007, 08:53 AM
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";  
            radWaitingBar1.EndInit();  
            this.Controls.Add(radWaitingBar1); 

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

Kind regards,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
WaitingBar
Asked by
Peter
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or