From 4dd76fda4ebe5a600b334710f4dbdd5d24430615 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 30 Jul 2024 23:18:09 -0700 Subject: [PATCH] Enable resizing when resizing the window --- .../Backend/CoreWindowApplicationRunner.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplicationRunner.cs b/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplicationRunner.cs index 20772756..4d1a868d 100644 --- a/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplicationRunner.cs +++ b/samples/ComputeSharp.SwapChain.D2D1.CoreWindow/Backend/CoreWindowApplicationRunner.cs @@ -39,6 +39,9 @@ internal static class CoreWindowApplicationRunner // This allows the app to show up while already drawing. renderThread.Start((application, tokenSource.Token)); + // Register a callback to monitor resize operations + window.ResizeCompleted += (s, e) => application.OnResize(); + // Activate the window window.Activate();