From b71ccbbf34b96e6b862f00eb3a751f3d3d34de1c Mon Sep 17 00:00:00 2001 From: Mahdi Hosseini Date: Thu, 30 Nov 2023 23:46:52 +0330 Subject: [PATCH] Add Missing #if WINAPPSDK --- components/TitleBar/src/InfoHelper.cs | 4 +++- components/TitleBar/src/NativeMethods.cs | 4 +++- components/TitleBar/src/WndProcHelper.cs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/components/TitleBar/src/InfoHelper.cs b/components/TitleBar/src/InfoHelper.cs index 82697e956..6dc80ca8b 100644 --- a/components/TitleBar/src/InfoHelper.cs +++ b/components/TitleBar/src/InfoHelper.cs @@ -1,4 +1,5 @@ -using Windows.ApplicationModel; +#if WINAPPSDK +using Windows.ApplicationModel; using Windows.Storage; using Windows.System.Profile; @@ -32,3 +33,4 @@ static InfoHelper() ); } } +#endif \ No newline at end of file diff --git a/components/TitleBar/src/NativeMethods.cs b/components/TitleBar/src/NativeMethods.cs index 290ef1429..6306ae87a 100644 --- a/components/TitleBar/src/NativeMethods.cs +++ b/components/TitleBar/src/NativeMethods.cs @@ -1,4 +1,5 @@ -using System.Runtime.InteropServices; +#if WINAPPSDK +using System.Runtime.InteropServices; namespace CommunityToolkit.WinUI.Controls; internal static class NativeMethods @@ -82,3 +83,4 @@ public static IntPtr SetWindowLongAuto(IntPtr hWnd, int nIndex, IntPtr dwNewLong [DllImport("user32.dll")] public static extern IntPtr CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hWnd, WindowMessage Msg, IntPtr wParam, IntPtr lParam); } +#endif \ No newline at end of file diff --git a/components/TitleBar/src/WndProcHelper.cs b/components/TitleBar/src/WndProcHelper.cs index 54ee894ab..c36648b74 100644 --- a/components/TitleBar/src/WndProcHelper.cs +++ b/components/TitleBar/src/WndProcHelper.cs @@ -1,4 +1,5 @@ -using System.Runtime.InteropServices; +#if WINAPPSDK +using System.Runtime.InteropServices; using WinRT.Interop; namespace CommunityToolkit.WinUI.Controls; @@ -47,3 +48,4 @@ public void RegisterInputNonClientPointerSourceWndProc(WNDPROC wndProc) } } } +#endif \ No newline at end of file