Closed belyansky closed 8 years ago
Bahavior SDK was removed for v3 with #69. With this change EventTrigger
, InvokeCommandAction
and CallMethodAction
are no longer supported for Windows 10 UAP projects.
There are two reasons behind this:
x:Bind
XAML extension that does not use reflection (faster, lower memory usage)I know there is a feature gap at the moment in v3 UAP that I hope to close in the next weeks.
Back to you question:
With x:Bind
you would write it Loaded="{x:Bind Model.SetupNavigationServiceCommand.OnEvent}"
. Unfortunately that will not work for the Loaded
event because it's not a routed event (the event args don't contain the source element). At the moment you have to fall back to code behind and call your commands Execute(parameter)
method from there.
Another possibility is to use InvokeCommandAction from Behaviors SDK directly.
Thanks for your answer.
After update to the latest version of Caliburn.Light I faced with some changes of the framework. For example there is no
EventTrigger
class. So the code from below doesn't compiles anymore.Are there any new out of the box alternatives which can help to rewrite this code? How can I pass command parameter?