Change Color Border For DateTimePicker ?

5 posts, 0 answers
  1. Paulo
    Paulo avatar
    3 posts
    Member since:
    Nov 2016

    Posted 10 Nov 2016 Link to this post

    Hello 
    i want Change Change Color Border For  DateTimePicker 

    i want put change color border buttom only and disable color for top,left , right 

  2. Dimitar
    Admin
    Dimitar avatar
    2960 posts

    Posted 11 Nov 2016 Link to this post

    Hello Paulo,

    Thank you for writing.

    The following snippet shows how you can achieve this:
    var border = radDateTimePicker1.DateTimePickerElement.Children[1] as BorderPrimitive;
     
    border.BoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders;
    border.TopColor = Color.Transparent;
    border.LeftColor = Color.Transparent;
    border.RightColor = Color.Transparent;
    border.BottomColor = Color.Green;

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. Paulo
    Paulo avatar
    3 posts
    Member since:
    Nov 2016

    Posted 11 Nov 2016 in reply to Dimitar Link to this post

    Thank you bro 

    u can give me code for vb.net not c#

  4. Paulo
    Paulo avatar
    3 posts
    Member since:
    Nov 2016

    Posted 11 Nov 2016 in reply to Paulo Link to this post

    and i work win from not web
  5. Dimitar
    Admin
    Dimitar avatar
    2960 posts

    Posted 11 Nov 2016 Link to this post

    Hi Paulo,

    Here is the code:
    Dim border = TryCast(radDateTimePicker1.DateTimePickerElement.Children(1), BorderPrimitive)
     
    border.BoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders
    border.TopColor = Color.Transparent
    border.LeftColor = Color.Transparent
    border.RightColor = Color.Transparent
    border.BottomColor = Color.Green

    You can use the following converter as well: VB Converter.

    In addition, this answer applies for the WinForms suite.

    Please do not hesitate to contact us with any additional questions or concerns. 
     
    Regards,
    Dimitar
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top