While using MVVM Light, EventToCommand is not working for custom events. Let me explain my case with simple custom button example.
Initially, i have successfully added MVVM Light in my sample. I have created one custom event(named as CustomModelLoaded) in my custom button class. Then i placed my button in UserControl. Here, i did my binding to custom event with EventToCommand.
In MainWindow, i used DataTemplate to show that UserControl to particular TabItem Content. While switching to that particular tab, eventtocommand not working. In my custom button class, i raised my event from OnApplyTemplate method.
But the above scenario works fine, when i placed the usercontrol as direct content to TabItem. I don't know what i did wrong or is this issue? Help me to move further on this.
For sample, please download from following link: