Win2D is an easy-to-use Windows Runtime API for immediate mode 2D graphics rendering with GPU acceleration. It is available to C#, C++ and VB developers writing apps for the Windows Universal Platform (UWP). It utilizes the power of Direct2D, and integrates seamlessly with XAML and CoreWindow.
I'm using a CanvasSwapChainPanel control to make animations smother (worked perfectly). The trouble is that if I resize the window containing the control, the backing store isn't always drawn to the window in the correct position. It's sometimes offset from the origin. It's a bit variable and seem dependent on the size of the window, the smaller the window the more likely it is to go wrong. See the screen capture below.
I'm using a CanvasSwapChainPanel control to make animations smother (worked perfectly). The trouble is that if I resize the window containing the control, the backing store isn't always drawn to the window in the correct position. It's sometimes offset from the origin. It's a bit variable and seem dependent on the size of the window, the smaller the window the more likely it is to go wrong. See the screen capture below.
I've written a minimal repro project:
SwapChainRedrawIssue.zip
It uses nuget packages:
I'm running windows 21H1 (19043.1165) I doubt its a graphics card issue but it's integrated graphics i7-7500U
The repro project simply updates the swap chain on every resize event: