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

Change Color Border For DateTimePicker ?

4 Answers 912 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 11 Nov 2016, 12:41 AM

Hello 
i want Change Change Color Border For  DateTimePicker 

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

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 11 Nov 2016, 10:16 AM
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.
0
Paulo
Top achievements
Rank 1
answered on 11 Nov 2016, 10:38 AM

Thank you bro 

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

0
Paulo
Top achievements
Rank 1
answered on 11 Nov 2016, 10:55 AM
and i work win from not web
0
Dimitar
Telerik team
answered on 11 Nov 2016, 12:01 PM
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Paulo
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Paulo
Top achievements
Rank 1
Share this question
or