I'm trying to execute a RelayCommand (which is in my CodeBehind) using the RelayCommand from Galasoft MVVMLight.
MainPage.xaml.cs
public MainPage()
{
InitializeComponent();
DataContext = this;
MyCommand = new RelayCommand(Methode);
}
#region Commands
public RelayCommand MyCommand { get; private set; }
#endregion
private void Methode()
{
int i = 1;
}
MainPage.xaml:
<Button Command="{Binding MyCommand}"/>
Unfortunately, the command is not firing/the method is not being called. Other binded elements like ImageSource, ... are working fine.