Hi there
i have a list of datetime. Now, every day in the datetime-list should get a background color in the xamcalendar.
Could you please help me out here?
regards
Cloud
Hello Cloud,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the CalendarDay’s Loaded event and in its handler I check if the List with the dates contains the loading day and if it does I changed its Background. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
thank you for the sample. that is almost what i need.
some little point is just not the way i want. is it possible to set the event of the eventsetter to the event of another control? because in my project the event should be fired when my xamdatagrid activate a record. that would be awesome.
ist it possible to do that somehow?
I have modified the sample I sent you before, so now it has the functionality you want. Basically I add the dates to the DisabledDates collection of the XamMonthCalendar and I created a Style for the CalendarDay with a Trigger to change the background if the date is disabled. I used this approach because of the virtualization of the CalendarDay elements.
Hope this helps you.
that looks good so far.
one last matter: is it possible to get the days displayed in the monthcalendar?
because now i got to every datetime a string with a certain code.
and the monthcalendar should now display all the days in the datetime-list and depend on the string-code the backgroud color should be set.
e.g:
2012-10-10 hast the code "Holiday" and because of that the background-color of this day should be green.
can i realize something like that?
best regards
cloud
I have been looking into your requirement, but it seems like that I am missing something, so could you please give me more details about the result you want ot achieve.