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.
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
Thanks for your help Maria.I achieve it by overriding the default style ;)
Pierre
Thank you for your feedback Pierre. I am glad that the modification of the template helped you achieve this.