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
715
XamCalendar - MaxCurrentMode?
posted

Hello,

how i can disable click event on the month of the calendar (calendaritemgrouptitle)?

I want a calendar with a calendarZoomMode = Day and the user can not zoom out.

I put these lines in tje XamCalendar.Ressources but it doesn't work:

                            <Style TargetType="igEditors:CalendarItemGroupTitle">
                                <EventSetter Event="MouseLeftButtonDown" Handler="xamCalendar_cancelClick" />
                                <EventSetter Event="MouseLeftButtonUp" Handler="xamCalendar_cancelClick" />
                            </Style>

Helps would be apprecited.

Thanks.

Parents
  • 17475
    Verified Answer
    Offline posted


    Hello Pierre,

    If you would like to handle the mouse event I would suggest you using PreviewMouseLeftButtonDown event. That will prevent the CurrentMode of the calendar to be changed. Please note handling this for the CalendarItemGroupTitle will also restrict the users from using the left and right arrows to navigate to other months.
    To control only the behavior of the headerContent button which is responsible for the CurrentMode change you can modify the default style for the calendar and remove the ZoomOutCalendarMode command from its definition. The default template can be found at C:\Program Files (x86)\Infragistics\2014.2\WPF\DefaultStyles\XamCalendar\generic.shared.xaml

Reply Children