I have an animation that I have setup on a transparent canvas. I set that canvas to be the content of a button and then run the animation. (See this question for the code.)
The problem is that sometimes the animation gets put behind other UI elements of my app (I am using Avalon Dock and it is in front of the DockableContent it is in, but behind the one next to it.) In some tests this seems to be tied in some way to the size of the button (if it overflows the DockableContent).
Any idea how I can bring the canvas to be on top of it all? (Note: I am not trying to raise elements in the canvas over other elements in the canvas.)
Thanks for any help.
Edit: This was happening because I have a ScrollViewer around the button that was holding the animation canvas. This caused it to expand rather than overwrite.
I can think of a few workarounds, but I am open to suggestions.