We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change background cell color

Thread ID:





116293 May 12,2014 02:00 PM UTC May 13,2014 09:23 AM UTC Windows Phone 2
Tags: SfCalendar
Washington Morais
Asked On May 12, 2014 02:00 PM UTC

hi.... How do I change the background cell color in Calendar? I'm trying to use with Converter with no success...
this is what I have so far:

        public object Convert(object value, Type targetType, object parameter, CultureInfo language)
            var appointments = parameter as Dictionary<DateTime, Appointment>;
            var date = (DateTime)value;
            if (appointments != null)
                if (appointments.ContainsKey(date))
                    return Colors.Magenta;

            return null;

Data template:

<DataTemplate x:Key="Celltemplate">
                    Text="{Binding Converter={StaticResource Converter}, ConverterParameter={StaticResource Appointments}}"
                    Foreground="{Binding Converter={StaticResource ColorConverter}, ConverterParameter={StaticResource Appointments}}"
                    Text="{Binding Day}"

Washington Morais
Replied On May 12, 2014 02:18 PM UTC

Ok, I found the solution. I hope it helps someone.

The problem was with the return of the Converter function. It must be return new SolidColorBrush(Colors.Magenta); instead of return Colors.Magenta;.

Vignesh V [Syncfusion]
Replied On May 13, 2014 09:23 AM UTC

Hi Morais,

Thanks for your update.      
We are glad to know that you have found the solution.Please let us know if you need further assistance.

Vignesh V


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon