I have a file resdict.xaml which is resource dictionary
This file is linked in my window xaml file window.xaml.cs:
<Window.Resources> <ResourceDictionary Source="resdict.xaml" /> <Window.Resources> Now, in the window.xaml.cs i also have this code for a storyboard:
<Storyboard Completed="HandlingEventHandler"> ....some code... </Storyboard> When the storyboard is used and completes its run, it triggers HandlingEventHandler(). This is what i want.
Now, we move the Storyboard code into the resource dictionary file resdict.xaml.
I can still use the storyboard fine, it does its thing, it plays the animations and all that, but the HandlingEventHandler is no longer triggered. Why is that?
Is there some way to remedy the situation without having to create partial class for the dictionary file?
For example, if i make the HandlingEventHandler static can i do something like:
<Storyboard Completed="{Static: Myclass.HandlingEventHandler}"> ?