I am creating a UWP MVVM app. I have created ViewModel and View, I make it DataContext, and everything is working just fine with bindings.
I was able to invoke method that has no parameters. This is my XAML code in View:
<Button VerticalAlignment="Top" HorizontalAlignment="Right" Margin="50" Width="50" Height="50" Background="Transparent" BorderBrush="Transparent" Content="OK" FontSize="32" FontWeight="Bold" Foreground="White" Click="{x:Bind Path=ViewModel.ButtonMainClick, Mode=OneWay}"/>
In ViewModel I have like this:
public void ButtonMainClick()
{
// TO DO
}
And this works just fine.
Now I want to invoke some method that has parameters. But I am unable to do it this way. I saw on internet that there is a EventTriggerBehavior. But I am not sure how to use it and pass some parameters.
Any idea?