Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
XamOutlookCalendarView week, day header click
posted

Hi,

I'd like to disable the week and day header click functionality which switches the current view mode to week or day view.
I use the CurrentViewMode property to change the display mode, but the week or day header click does not change this property, and after the week or day header click occurs the change of this property does not changes the display mode.

How can I disable the header click functions or how can I manage the above mentioned behavior?

Thanks,
Istvan

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    It sounds like you have a one way binding on the CurrentViewMode. As such if the control sets the CurrentView property then WPF will replace your value (the one way binding) with that value so that is why it would no longer respond to changes in your property. The CurrentViewMode can/will be changed for other actions as well (e.g. various keyboard shortcuts that mimic Outlook's keyboard handling, when the selected dates of an associated xamDateNavigator changes, when the # of visible calendars change if switching between day/schedule view is enabled, etc.). If you do not want the control to change the CurrentViewMode then you can handle the CurrentViewModeChanging event and set e.Cancel to true. This event is only raised when the control will change the CurrentViewMode and is not raised when the CurrentViewMode property is set directly.

Children