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

Q1 2013 RadButton Default Border

5 Answers 193 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
di
Top achievements
Rank 1
di asked on 10 May 2013, 12:17 AM
Dear Telerik Team

         see the screen dump
         how to set orange border of new RadButton disappear as old RadButton do.
because orange border will make theme of dialog look no perfect.

Regards
DiWu

5 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 10 May 2013, 02:18 PM
Hello Di Wu,

Thank you for writing.

The best way to solve this issue is to customize the button layout in the theme you are using. To do that, you need to open the theme with Visual Style Builder, and then navigate to RadButton - RadButtonElement - ButtonBorder and set the InnerColor to transparent in the RadButtonElement.IsDefault state. After that you may export it to a new location and use it from there. This is the code you will have to change:
ThemeResolutionService.LoadPackageFile(@"C:\ButtonNoBorder.tssp");
ThemeResolutionService.ApplicationThemeName = "ButtonNoBorder";

I have also attached the theme so you may use it if you wish. 

If you however need to use code then you will have to change several properties and subscribe for two events. You will have to remove the BackgroundShape = null. Set the BorderVisibility to true. Set the desired BorderColor and set some BorderRadius. After that you will have to subscribe to the MouseEnter and MouseLeave events and change the BorderColor when the corresponding event occurs. But even after doing all of these you will experience undesired behavior when you move the mouse out of the button with the mouse key pressed. You will notice that the border would not change its color until you release the mouse button.

Please feel free to use the way that suits your needs the most.

I have attached a project where you may see everything in action. The second option has been commented so please feel free to remove the uncomment it and check how it behaves.

Hope this helps. Please do not hesitate to contact us, should you have any further questions.

Greetings,
Paul
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
0
di
Top achievements
Rank 1
answered on 14 May 2013, 08:21 AM
Hi Paul

Thank you very much for your reply.
I choose theme solution because it seems to be simple. and it does work.

However, I found some problems.
see screen dump.

1. border sharp of Radbutton is different with original button sharp when it is focused, although it is no easy to identify. (radbutton-sharpdiff.png)
2. RadDock->RadPageViewContentAreaElement's background color is Yellow. I could modify background color. but I could not saved it.
   it said "Type not found: Telerik.WinControls.UI.TrackBarThumbElement".

Regards
DiWu
0
Accepted
Paul
Telerik team
answered on 17 May 2013, 04:47 AM
Hello,

Thank you for writing back.

Regarding the border radius of the button, you are right it changes when the button gets on focus. The default border radius is two pixels, but when the button gets on focus it becomes one pixel. This is done because of the focus cues (the dashed rectangle which gives a clue which element is on focus at the moment). The focus cues is Microsoft implementation and we cannot control it, so it always has a rectangular shape. Having this in mind we have decided to keep the border-radius of the button which is on focus to one pixel. However if you want to change it, feel free to do it. I am attaching an image showing where exactly you need to make the necessary change.

Regarding the theme, I have sent you the latest version by mistake. The official release will be next month and it would not work before that. I am sending you now the latest official released theme, please work with it.

Hope that helps. Please let me know if you have any further inquiries.

Regards,
Paul
the Telerik team
RadChart for WinForms is obsolete. Now what?
0
Joe
Top achievements
Rank 1
answered on 14 Aug 2014, 08:01 PM
Paul,

How do you remove the this non-focus border color from the Vista skin using CSS or programmatically? Very annoying because the embedded skin is applied last and overrides all of my rules and upgrading the Telerik package makes it a pain to make all the necessary cosmetic changes.

Thanks,

Joe
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Aug 2014, 10:55 AM
Hello Joe,

Thank you for writing.

Please note that this forum concerns the Telerik UI for WinForms suite, and it seems that your question is not related to it If this is the right product you are using, could you please specify in more details the exact requirement? It would be greatly appreciated if you provide some screenshots, illustrating the exact desired design. However, if you use another Telerik product, I would kindly ask you to post your question in the appropriate forum. Thank you for your understanding.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
di
Top achievements
Rank 1
Answers by
Paul
Telerik team
di
Top achievements
Rank 1
Joe
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or