Hello,
I am using Infragistic.Silverlight.XamWebRibbon.v10.1 ribbon control with Caliburn framework and I am unable to attach Button Click Event to it. Please suggest me how do I achieve the Click event which will call the ViewModel.
My code is stated below:
<igRibbon:ButtonTool x:Name="ShowPageTwo" Caption="New"
SmallImage="/Bixi.Atlas.Client.UI.Silverlight.Carliburn.Micro;component/Assets/Images/NavigationData/add.png"
LargeImage="/Bixi.Atlas.Client.UI.Silverlight.Carliburn.Micro;component/Assets/Images/NavigationData/add.png"
MinimumSize="ImageAndTextNormal"
IsQatCommonTool="True" cal:Message.Attach="ShowPageTwo">
</igRibbon:ButtonTool>
I have tried with the below statement as wel but still its not working Sir.
cal:Message.Attach="[Event Click] = [Action ShowPageOne]"
Please suggest be a way how can I achieve the functionality and call the ViewModel
Thank you
Hi manabkachari,
as the ButtonTool is not a framework element it can't reference the DataContext and call it's methods.
Here are 2 possible solutions:
Keeping a reference to the VM - https://ko.infragistics.com/community/blogs/b/ivo_evtimov/posts/using-xamribbon-buttontool-in-mvvm-applications
Using commanding - https://ko.infragistics.com/community/blogs/b/devin_rader/posts/extending-a-xamribbon-buttontool-to-execute-icommands