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

How to achieve black DatePicker on white background?

3 Answers 107 Views
DatePicker and DateSelector
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mirko
Top achievements
Rank 1
Mirko asked on 27 Aug 2013, 01:46 PM
Hi,
We're developing app, that has by default white background and black/colored controls. The problem is RadDatePicker is by default white and It's not possible (although it definitely should be) to change these colors by changing Background/Foreground/BorderBrush properties.

Do we have to manually change all DatePicker Styles and Templates, or is there a simple way, how to change the colors of:
Header text
DatePicker border
DatePicker content
and also to have the fullscreen picker: black with white background?

Thanks

3 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 30 Aug 2013, 01:35 PM
Hi Mirko,

Thank you for using RadDatePicker for Windows Phone 8.

By default RadDatePicker uses phone's resources. If you don't want to change the style and/or template of the control, another option that you have is to override the brushes that it uses: PhoneForegroundBrushPhoneChromeBrush and PhoneSubtleBrush in a way similar to this:

SolidColorBrush foregroundBrush = this.Resources["PhoneForegroundBrush"] as SolidColorBrush;
foregroundBrush.Color = Colors.Red;

If you change these brushes you will easily see where each of them is used.

I hope this information helps.
 
Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Mirko
Top achievements
Rank 1
answered on 02 Sep 2013, 01:35 PM
Hi,
We fixed the issue ourselves, although it required about 200 lines of various style ans template overrides.

Anyway, it would be in my opinion much more convenient for me when styling Telerik controls to just set my own Foreground and BorderBrush values and achieve the same effect, just like it works in default <Button /> control, instead of complicated template styling.
0
Deyan
Telerik team
answered on 03 Sep 2013, 03:16 PM
Hello Mirko,

Thanks for writing back.

You have a point here. Basic modifications on the appearance should be straightforward without using whole style instances. We have revisited the style structure of RadDatePicker and have identified some shortcomings which are already addressed in our internal codebase and will make it into our next official release.

Thanks for your feedback and feel free to get back to us anytime you have further questions or need assistance.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DatePicker and DateSelector
Asked by
Mirko
Top achievements
Rank 1
Answers by
Todor
Telerik team
Mirko
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or