When good TriggerActions go bad...

When good TriggerActions go bad...

Old forum URL: forums.lhotka.net/forums/t/9272.aspx

cds posted on Monday, July 26, 2010

Just getting used to using TriggerAction to connect events in my Views to my ViewModels.

When they work they're great, but if you have to figure out why they're not working, then they're a bit of a pain. This happens, as I found out, if the TriggerAction's DataContext isn't the ViewModel, but something else. Then you just get a MissingMethodException with the name of the method you're trying to call.

It would be really helpful if TriggerAction could output a debug message, just like binding errors do indicating what the target object is that it can't find the method on. That would greatly assist in tracking down XAML issues.

RockfordLhotka replied on Monday, July 26, 2010

That's a good idea, I'll add that to the wish list.

Copyright (c) Marimer LLC