I've list of tasks, every task will have properties of start date, end date, start time and end time. is there a way to show these tasks in xammonthcalendar?
The xamMonthCalendar is analogous to the WinForms MonthCalendar and is a means of displaying 1 or more months. If you just want to make certain days appear differently depending on the date they represent then you could use the CalendarDayStyleSelector. There is a sample in the feature browser which demonstrates using this to make certain days appear differently.
Is it posible to refresh the Calendar when ever I get the new records from the database? The SelectStyle is automatically getting called when I scroll thru months, but if I am in the same month and if I need to reset the style?
You would have to change the value of the property. You could null it out and set it back but that would be less effecient than just setting it to a new instance of your selector since it would have to traverse all the elements twice.
Thank you Andrew Smith, I got the solution for setting the day style.
xamMonthCalendar.CalendarDayStyleSelector = DayStyleSelector;
I don't have any sample for this but if you have a sample and a specific question then I can try to help you. There is a sample in the FeatureBrowser that shows how to use the Calendar(Day|Item)StyleSelector to provide a specific Style for a given Calendar(Day|Item). From your description, it sounds like you are not providing a custom template and therefore the default template is being used. You may want to look at the default template for the Calendar(Day|Item) to understand what it does to the Background. The default xaml is included in the DefaultStyles directory. It sounds like you have a Style setter which has a lower precedence than a ControlTemplate trigger. For example the default template sets the background to a brush when IsMouseOver is true. If you wanted to override that then you would likely use a style trigger as opposed to just a style setter.
Can you give me sample code for this? Because I've created a custom style class and I am binding it in xaml. I don't know how to set it in c# at runtime, whenever the list gets changed.
I've set a background color for specific days, when I mouseover those specific days, background color goes off until the mouse leave the day. Is it possible to keep the background color when mouseover?