WPF animation stutters from time to time, while html in webview2 does not, I'm so confused #11607
Unanswered
Paper-Folding
asked this question in
Q&A
Replies: 1 comment
-
|
Similar question on stackoverflow: https://stackoverflow.com/q/3002271/14963554 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, everyone, hello dear developers here.
I'm developing a marquee animation with WPF:
I come up with this simple xaml code that performs the marquee animation on a textblock back and forth:
However, I found the animation sometimes stutter, not looking smooth, it visually feels like some frames are being skipped from time to time.
Then I try to implement the same animation in html in webview2:
The html code in jsx(I'm using react.js):
App.scss:
The webview2 code is very simple, I just reference the react.js dev server as startup url:
And then I got very very smooth marquee animation in webview2.
I do hope WPF animation could be as smooth as the one in webview2, I have tried Bitmap Cache:
I also tried disabling
UseLayoutRounding:But all these methods did not work. Just I'd like to ask if anyone knows how to get rid of the stutter in WPF animation?
Also I'm confused, of course I can migrate my code to use webview2, but is it considered the best practice?
Beta Was this translation helpful? Give feedback.
All reactions