2

I am not getting EventToCommand. My assembly is as followes

<Window x:Class="EfesBetGUI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vmMainWindow="clr-namespace:EfesBetGUI.ViewModel"
        xmlns:DateTimeUC="clr-namespace:EfesBetGUI.View.UserControls"        
        xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
        xmlns:cmd="clr-namespace:GalaSoft.MvvmLight;assembly=GalaSoft.MvvmLight.WPF4"
        xmlns:mvvmgalasoftCommand="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WPF4"
        xmlns:LightCmd="http://www.galasoft.ch/mvvmlight"
        xmlns:util="clr-namespace:EfesBetGUI.Util"
        Title="MainWindow" >

but inspite of that also I am not getting EventToCommand .I would like to mention Iam using framework 4.0 and visual studio 12. Any help is welcome.Thanking you, enter image description here

Anindya
  • 2,616
  • 2
  • 21
  • 25

2 Answers2

2

As suggested here, the EventToCommand class sits in the Extras dll, so I would try the following xmlns:

xmlns:mvvmgalasoftCommand="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"

Note that I've added the Extras in the assembly name. not sure if you need the WPF4 suffix, you can try it with/without it and see if it works

Omri Btian
  • 6,499
  • 4
  • 39
  • 65
  • 1
    thanks for response. As you can see I have added one image of my reference. in my xaml you can see I have already used xmlns:LightCmd="http://www.galasoft.ch/mvvmlight" as suggested by you. – Anindya Sep 22 '13 at 11:46
  • I tried every way but it is not working.I applied your code also.I have a humble request may I send you my code in anyway – Anindya Sep 22 '13 at 12:36
1

How about using directly:

<i:InvokeCommandAction Command="{Binding YourCommand}" />