Q1 2013 RadButton Default Border

6 posts, 1 answers
  1. di
    di avatar
    7 posts
    Member since:
    Feb 2011

    Posted 09 May 2013 Link to this post

    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
  2. Paul
    Admin
    Paul avatar
    60 posts

    Posted 10 May 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. di
    di avatar
    7 posts
    Member since:
    Feb 2011

    Posted 14 May 2013 Link to this post

    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
  5. Answer
    Paul
    Admin
    Paul avatar
    60 posts

    Posted 16 May 2013 Link to this post

    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?
  6. Joe
    Joe avatar
    16 posts
    Member since:
    Oct 2013

    Posted 14 Aug 2014 Link to this post

    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
  7. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 19 Aug 2014 Link to this post

    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.
     
Back to Top
UI for WinForms is Visual Studio 2017 Ready