c# - WpfAninatedGif NuGet package event usage with MVVM -
i've encountered problem events using wpfanimatedgif nuget package. package has 2 additional events <image>
i'm unable use them mvvm pattern. i've tried interactivity:
<window xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:gif="http://wpfanimatedgif.codeplex.com"> <image gif:imagebehavior.animatedsource="animation.gif"> <i:interaction.triggers> <i:eventtrigger eventname="animationcompleted"> <i:invokecommandaction command="{binding somecommand}"/> </i:eventtrigger> </i:interaction.triggers> </image> </window>
but fails, command doesn't called. i've messed around bit , got kinda working (not realy). if leave eventtrigger
's eventname
unspecified command called on animationloaded
event only:
<i:eventtrigger> <i:invokecommandaction command="{binding somecommand}"/> </i:eventtrigger>
in situation command called properly. however, i'm interested in animationcompleted
event.
p.s. works fine without mvvm.
Comments
Post a Comment