From 5687074b20872472b9c0245f37e929a29e6535f4 Mon Sep 17 00:00:00 2001 From: xiaoy312 Date: Wed, 6 Dec 2023 14:21:12 -0500 Subject: [PATCH] chore: fix build --- src/Uno.Toolkit.UI/Helpers/ResponsiveHelper.cs | 1 + src/Uno.Toolkit.UI/Markup/ResponsiveExtension.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Uno.Toolkit.UI/Helpers/ResponsiveHelper.cs b/src/Uno.Toolkit.UI/Helpers/ResponsiveHelper.cs index 7ef47bb0e..12fde226e 100644 --- a/src/Uno.Toolkit.UI/Helpers/ResponsiveHelper.cs +++ b/src/Uno.Toolkit.UI/Helpers/ResponsiveHelper.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using Windows.Foundation; using Uno.Disposables; + #if IS_WINUI using Microsoft.UI.Xaml; #else diff --git a/src/Uno.Toolkit.UI/Markup/ResponsiveExtension.cs b/src/Uno.Toolkit.UI/Markup/ResponsiveExtension.cs index 93a757a3c..789fa0297 100644 --- a/src/Uno.Toolkit.UI/Markup/ResponsiveExtension.cs +++ b/src/Uno.Toolkit.UI/Markup/ResponsiveExtension.cs @@ -3,7 +3,6 @@ #endif using System; -using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Windows.Foundation; @@ -190,6 +189,8 @@ public void OnSizeChanged(Size size, ResponsiveLayout layout) internal ResponsiveLayout? GetAppliedLayout() => Layout ?? +#if SUPPORTS_XAML_SERVICE_PROVIDER (TargetWeakRef?.Target as FrameworkElement)?.ResolveLocalResource(ResponsiveLayout.DefaultResourceKey) ?? +#endif Application.Current.ResolveLocalResource(ResponsiveLayout.DefaultResourceKey); }