Hi
I have a simple XamMonthCalendar control on my usercontrol. I have a corresponding ViewModel for this view. I create the View and the View model using Unity container in another class. I have also attached my view model to the view. Now my problem is I'm unable to attach the menu item to a command object in my view model. Could you please have a look and let me know the solution.
Here is the xaml
<Grid> <igEditors:XamMonthCalendar Name="Calendar" > <ig:ContextMenuService.Manager> <ig:ContextMenuManager> <ig:ContextMenuManager.ContextMenu> <ig:XamContextMenu x:Name="CalendarContextMenu"> <ig:XamMenuItem Header="Font Size" Command="{Binding Path=FontSizeCommand"/> </ig:XamContextMenu> </ig:ContextMenuManager.ContextMenu> </ig:ContextMenuManager> </ig:ContextMenuService.Manager> </igEditors:XamMonthCalendar> </Grid>
Hello Ranjith,
Thank you for your post. I have been looking into it. What I can suggest is to take a look at the following blog post:
http://ko.infragistics.com/community/blogs/blagunas/archive/2012/07/16/creating-a-command-behavior-for-the-xammenuitem.aspx
Here you can find a solution how to bind a XamMenuItem to a command.
Please do not hesitate to let me know if you have any further question on this matter.
I am just checking if you need any further assistance on this matter. Please do not hesitate to let me know if you do.