How to achieve black DatePicker on white background?

4 posts, 0 answers
  1. Mirko
    Mirko avatar
    17 posts
    Member since:
    Jul 2013

    Posted 27 Aug 2013 Link to this post

    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
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 30 Aug 2013 Link to this post

    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.
  3. DevCraft banner
  4. Mirko
    Mirko avatar
    17 posts
    Member since:
    Jul 2013

    Posted 02 Sep 2013 Link to this post

    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.
  5. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 03 Sep 2013 Link to this post

    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.
Back to Top
DevCraft banner