Release 1.1 - add support for context menu

Rating: No reviews yet
Downloads: 114
Change Set: 61492
Released: Jan 9, 2011
Updated: Jan 30, 2011 by SergeyBarskiy
Dev status: Beta Help Icon

Recommended Download

Source Code SourceCodeAndSample
source code, 151K, uploaded Jan 10, 2011 - 114 downloads

Release Notes

I added a number of new features. The biggest improvement added is the ability to use context menu from Silverlight Toolkit for Windows Phone 7. In order to provide this feature, I added style property to Calendar control that allows you to specify a custom template for calendar item. Of course, you have to be careful not to override parts of the template that are responsible for providing color information for the calendar. Namely, in your template you have to have TemplateBinding for Foreground and Background. Other than that, you can modify the default template as you see fit. Then, you can set CalendarItemsStyle property on the calendar to force it to use different template. Here is the example of the XAML for the screen that adds context menu to the calendar items. I also added a property that provides source with dates to the calendar. If you provide an Observable Collection where each item implements new interface ISupportCalendarItem, calendar can improve overall performance. It also enables you not to explicitly raise property changed events, forcing control to repaint. Having said that, you now have two ways to explicitly force repaint of the calendar. You can call Refresh() method on it or in your view model you can raise property changed event for the property that is bound to the DatesSource property of the calendar. Another change I introduce is consolidate date to brush converters into a single class. This minimizes the code you have write as well as simplifies XAML at the same time.
You can view details in my blog post here: http://dotnetspeak.com/index.php/2011/01/windows-phone-7-controls-project-update/

Reviews for this release

No reviews yet for this release.