How do you perform databinding against the MonthCalendar.SelectionRange property? Given the property is of type ‘SelectionRange’ which is a class I am not sure how to go about it. Any examples would be much appreciated.
How do you perform databinding against the MonthCalendar.SelectionRange property? Given the property is of
Share
Well, there don’t seem to be any obvious events for this either on the
MonthCalendaror theSelectionRange, and neither implementsINotifyPropertyChanged, so it looks like data-binding might not be possible here.Update: It does, however, raise the DateChanged, so you could hook some stuff together manually, or (more usefully) by subclassing the control to expose the values and events in a fashion suitable for binding. Note the
Actual(...)are useful because the end (otherwise) is just before midnight, rather than midnight itself…