This project has moved and is read-only. For the latest updates, please go here.

Issue in trigger the Command from Infragistics.Silverlight.Controls ButtonTool ,not able to execute the command using with EventToCommand

Feb 7, 2011 at 9:28 AM

Hi All

i am using MVVM Light frame work to implement the MVVM Model in Silverlight application.

I am facing one issue in trigger the Command from Infragistics.Silverlight.Controls ButtonTool , that is not able to execute the command using with EventToCommand, please guide me how can I do this.

Namespace binding:











           DataContext="{Binding CostCentreVM, Source={StaticResource Locator}}"

   d:DesignHeight="400" d:DesignWidth="800"



ButtonTool binding

<igRibbon:ButtonTool IsEnabled="True" Caption="Delete" MaximumSize="ImageAndTextLarge" LargeImage="/Bixi.Atlas.Client.UI.Silverlight;component/Image/NavigationData/delete.png">


                           <i:EventTrigger EventName="Click">

                               <cmd:EventToCommand Command="{Binding DeleteCostCentreCommand}"/>








Feb 7, 2011 at 10:56 AM


Unfortunately, there is nothing I can do here. The issue is that the Infragistics control (which I cannot change) fails to raise the event in a way that is caught by the EventTrigger (which is developed by Microsoft, and which I cannot change).

I recommend calling Infragistics support and reporting the issue to them. If I had to guess, I'd say that their event is not routed properly.



Jul 5, 2011 at 1:08 PM
Edited Jul 12, 2011 at 9:03 AM

I'm not sure if the problem is in the Infragistics controls - if you try to play a sound in the trigger it works ok 


<ei:PlaySoundAction Source

So there must be another issue not connected to firing the EventTrigger itself.

Edit: The problem is that the ButtonTool is not a Framework Element (not in the visual tree) and its DataContext property(VM) is null. A workaround is to create a resource that will hold a reference to the instance of the VM and use this static resource as a Source of the Binding done in the ButtonTool. 

Jul 26, 2011 at 9:14 AM
Edited Jul 26, 2011 at 9:27 AM

Here are the 2 possible solutions:

The one that I suggested in the previous post - 

 Using commanding -