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
20
disable "MouseWheel Event" and Keyboard Navigation
posted

I have some problem in customizing the XamMonthCalendar control

I want to disable "MouseWheel Event" and Keyboard Navigation( up/down/left/right key) in XamMonthCalendar. Is it Possible??

For Disabling MouseWheel and Keyboard Navigation, I sat the property "IsEnabled" to false in XAML.
It is work!! But it Make the font of XamMonthCalendar not clear. It is not what I want..


How can I do this?

Parents
No Data
Reply
  • 54937
    Offline posted

    johylee said:
    I want to disable "MouseWheel Event" and Keyboard Navigation( up/down/left/right key) in XamMonthCalendar. Is it Possible??

    The mousewheel and keyboard navigation result in commands of the xamMonthCalendar being executed. When the control is going to execute one of its commands it first raises the ExecutingCommand event so you could handle that event and set e.Cancel to true for the commands you want to prevent. The commands are exposed as fields of the MonthCalendarCommands class (e.g. the Scroll(Next|Previous)Groups are used when scrolling with the mouse wheel).

    johylee said:
    For Disabling MouseWheel and Keyboard Navigation, I sat the property "IsEnabled" to false in XAML.
    It is work!! But it Make the font of XamMonthCalendar not clear. It is not what I want..

    I'm not sure what you mean by not clear but there are triggers that will change the Foreground of certain elements (e.g. CalendarItem) to the system GrayText brush when they are disabled. If you didn't want that then you would need to create custom styles for those elements. You can look at the default xaml that ships with the product in the DefaultStyles directory and use those styles as the starting point for your custom styles.

Children
No Data