Custom TriggerActions

Are we supposed to be able to create our own TriggerActions TriggerAction is not sealed, but the abstract 'Invoke'  method is defined as Internal in the base class, so there is no way it can be overridden outside of the WPF assembly.

Answer this question

Custom TriggerActions

  • Belsen

    I should mention that I would like to create two trigger actions. The first will simply invoke a method (by name) on a target instance using reflection. The second will call Execute on an ICommand instance. The instances will be hooked up using {StaticResource}.

    I looked for something prebuilt to do this but I can't find anything. It seems like a common task to want to execute a command or a method in response to an event (from within a template). Am I missing something

    Thanks,

    Jared


  • Roderick Prince

    That's very unfortunate. But I do appreciate your response.
  • Ocrkass

    Drew is correct that custom TriggerActions is not really a scenario we were trying to support. In the most recent sources, TriggerAction's constructor is internal. I don't think there's anything inherently evil about custom TriggerActions, as far as I know it's just a time in the day issue.

  • Christiaanpmg

    It would be nice to be able to do that, but something tells me MS has sealed this API off for now because they don't want to support the contract or there are internal requirements that prevent it from being extended by third parties. It's the same thing with the Expressions API right now. Expressions aren't going to be extensible in v1, but maybe they'll open up TriggerAction. Guess we'll have to wait for a reply from MS.

    Later,
    Drew


  • Custom TriggerActions