Basically, I have an event in my custom class. I will call a specific method in a user class with the argument event → properties as a parameter for this method.
To do this, you can see the actual code for the information.
instance.FileOpening += (sender, e) =>
{
CustomClass.Method(e.XXproperty, e.YYproperty);
};
But I want to achieve this through interaction. Captures in MVVM. So I used the following code in xaml.
<i:Interaction.Triggers>
<i:EventTrigger EventName="FileOpening">
<i:FileOpeningAction TargetObject="{Binding ElementName=cntrol}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
My corresponding TargetedTriggerAction class is here to force my customclass to execute this method.
public class FileOpeningAction :TargetedTriggerAction<CustomClass>
{
protected override void Invoke(object parameter)
{
((instance).TargetObject).Method(?,?);
}
}
But my question is: how can I pass e.XXproperty and e.YYproperty in the above action to execute the method in my custom class?
source
share