Programmatically Call WPF TargetedTriggerAction
I have a TargetedTriggerAction from a 3rd party library that would like to call/invoke without attaching it to a button. I have no problem getting it to work with the button, but I want to do it in response to some non-UI event. Here is the action's class declaration: public class MeasureAction : TargetedTriggerAction<Map> Here is my setup code so far: var measure = new MeasureAction(); measure.TargetObject = _mapControl; measure.MeasureMode = MeasureAction.Mode.Polyline; measure.MapUnits = DistanceUnit.Miles; I want to be able to do something like this, but I know Invoke is protected: measure