4 Answers, 1 is accepted
0
Accepted
Hi RJ,
Thank you for writing.
The easiest way to achieve this is by using a timer. Here is a small sample:
I hope this helps.
Regards,
Stefan
Telerik
Thank you for writing.
The easiest way to achieve this is by using a timer. Here is a small sample:
protected override void OnLoad(EventArgs e){ base.OnLoad(e); System.Windows.Forms.Timer timer = new Timer(); timer.Interval = 200; timer.Tick += timer_Tick; timer.Start();}void timer_Tick(object sender, EventArgs e){ if (radButton1.ButtonElement.ButtonFillElement.BackColor == Color.Red) { radButton1.ButtonElement.ButtonFillElement.ResetValue(FillPrimitive.BackColorProperty, ValueResetFlags.Local); radButton1.ButtonElement.ButtonFillElement.ResetValue(FillPrimitive.GradientStyleProperty, ValueResetFlags.Local); } else { radButton1.ButtonElement.ButtonFillElement.GradientStyle = GradientStyles.Solid; radButton1.ButtonElement.ButtonFillElement.BackColor = Color.Red; }}I hope this helps.
Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
RJ
Top achievements
Rank 1
answered on 03 Feb 2014, 03:41 PM
Hi Stefan,
Thanks so much, this works perfectly. In the buttons click event, I stopped the timer and tried to reset the button but the buttons border stayed red. How can I bring it back to its default state.
RJ
Thanks so much, this works perfectly. In the buttons click event, I stopped the timer and tried to reset the button but the buttons border stayed red. How can I bring it back to its default state.
RJ
0
RJ
Top achievements
Rank 1
answered on 03 Feb 2014, 04:37 PM
Hi Stefan,
I just released that the border was showing because the button still had focus.
Thank you for all your help.
RJ
I just released that the border was showing because the button still had focus.
Thank you for all your help.
RJ
0
Hello,
You are welcome. I hope everything is OK now.
Regards,
Stefan
Telerik
You are welcome. I hope everything is OK now.
Regards,
Stefan
Telerik
TRY TELERIK'S NEWEST PRODUCT - APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
