Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Windows Phone 7 > Calendar > text color issue

Answered text color issue

Feed from this thread
  • Lu avatar

    Posted on Jan 31, 2012 (permalink)

    Hi,
    when I set background color of calendar to white DayNames will disapper, because they have white font color. The same issue is with days from previous or next month - they are not visible. When I change foreground color of calendar these texts are not affected.

    How can I change color of these values and make them visible?

    Thank you very much.

    Reply

  • Todor Todor admin's avatar

    Posted on Feb 6, 2012 (permalink)

    Hello Lu,

    Thank you for your interest in RadCalendar.

    You can read a lot of information for our controls and the RadCalendar in particular in our online documentation. Here you can see how you can define your own data template for each of the dates. So in your case you need to change the Foreground of the TextBlock with Text property set to {Binding Text} to the color you want so that it is visible on the white background.

    All the best,
    Todor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Lu avatar

    Posted on Feb 6, 2012 (permalink)

    Hi, I'm using SelectTemplate
    But I don't know how to determine, that current item is from different month.

    My code is like this:


    public override DataTemplate SelectTemplate(object item, DependencyObject container)
     {
                CalendarButtonContentInfo info = item as CalendarButtonContentInfo;
                CalendarButton button = container as CalendarButton;
    ....
    }

    Reply

  • Answer Todor Todor admin's avatar

    Posted on Feb 6, 2012 (permalink)

    Hello Lu,

    You can use the CalendarButton's IsFromTheCurrentView property. When the current item is from a different month, it is false.

    All the best,
    Todor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Lu avatar

    Posted on Feb 8, 2012 (permalink)

    Great! That solved my issue with days in calendar. Can I use template for DayNames above the calendar? They also have white foreground, so they re not visible now.

    Reply

  • Answer Todor Todor admin's avatar

    Posted on Feb 10, 2012 (permalink)

    Hi Lu,

    Yes, you can check if the ButtonType of the CalendarButton is WeekName:

    CalendarButton button = container as CalendarButton;
    if (button.ButtonType == CalendarButtonType.WeekName)
    {
        return SpecialTemplate;
    }


    Regards,
    Todor
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Windows Phone 7 > Calendar > text color issue