diff --git a/src/Uno.UI/UI/Input/DraggingEventArgs.cs b/src/Uno.UI/UI/Input/DraggingEventArgs.cs index 8c42b8e819b7..37127f24e610 100644 --- a/src/Uno.UI/UI/Input/DraggingEventArgs.cs +++ b/src/Uno.UI/UI/Input/DraggingEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using Windows.Devices.Input; using Windows.Foundation; @@ -27,3 +29,4 @@ internal DraggingEventArgs(PointerPoint point, DraggingState state, uint contact public uint ContactCount { get; } } } +#endif diff --git a/src/Uno.UI/UI/Input/DraggingState.cs b/src/Uno.UI/UI/Input/DraggingState.cs index 5be560f3a80e..d857160e2fb3 100644 --- a/src/Uno.UI/UI/Input/DraggingState.cs +++ b/src/Uno.UI/UI/Input/DraggingState.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT #if HAS_UNO_WINUI && IS_UNO_UI_PROJECT namespace Microsoft.UI.Input #else @@ -11,3 +13,4 @@ public enum DraggingState Completed, } } +#endif diff --git a/src/Uno.UI/UI/Input/GestureRecognizer.Gesture.cs b/src/Uno.UI/UI/Input/GestureRecognizer.Gesture.cs index cbcba5dce0d4..7b65bd93ac74 100644 --- a/src/Uno.UI/UI/Input/GestureRecognizer.Gesture.cs +++ b/src/Uno.UI/UI/Input/GestureRecognizer.Gesture.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT #nullable enable using System; @@ -398,3 +400,4 @@ public static bool IsOutOfTapRange(Point p1, Point p2) } } } +#endif diff --git a/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs b/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs index 36678009b1bb..53d8b981f8eb 100644 --- a/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs +++ b/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.InertiaProcessor.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT #nullable enable using System; @@ -216,3 +218,4 @@ public void RunSync() } } } +#endif diff --git a/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.cs b/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.cs index da184e43e0ce..84b36d7f493e 100644 --- a/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.cs +++ b/src/Uno.UI/UI/Input/GestureRecognizer.Manipulation.cs @@ -1,4 +1,6 @@ -#nullable enable +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT +#nullable enable using System; using System.Collections.Generic; @@ -751,3 +753,4 @@ public static implicit operator Points(PointerPoint pointer1) } } } +#endif diff --git a/src/Uno.UI/UI/Input/GestureRecognizer.cs b/src/Uno.UI/UI/Input/GestureRecognizer.cs index 7d51ddaec790..977ae308db55 100644 --- a/src/Uno.UI/UI/Input/GestureRecognizer.cs +++ b/src/Uno.UI/UI/Input/GestureRecognizer.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System; using System.Collections.Generic; using System.Linq; @@ -291,3 +293,4 @@ private static ulong GetPointerIdentifier(PointerPoint point) } } } +#endif diff --git a/src/Uno.UI/UI/Input/GestureSettings.cs b/src/Uno.UI/UI/Input/GestureSettings.cs index dd15ecaeb438..4ae3e177ca3a 100644 --- a/src/Uno.UI/UI/Input/GestureSettings.cs +++ b/src/Uno.UI/UI/Input/GestureSettings.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System; using Windows.Foundation; using Windows.Foundation.Metadata; @@ -108,3 +110,4 @@ internal static class GestureSettingsHelper | GestureSettings.ManipulationRotateInertia; } } +#endif diff --git a/src/Uno.UI/UI/Input/HoldingEventArgs.cs b/src/Uno.UI/UI/Input/HoldingEventArgs.cs index 77530bd2d6ca..5eda3bbe8d3b 100644 --- a/src/Uno.UI/UI/Input/HoldingEventArgs.cs +++ b/src/Uno.UI/UI/Input/HoldingEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using Windows.Devices.Input; using Windows.Foundation; using Uno; @@ -33,3 +35,4 @@ internal HoldingEventArgs(uint pointerId, PointerDeviceType type, Point position public uint CurrentContactCount => HoldingState == HoldingState.Started ? 1u : 0u; } } +#endif diff --git a/src/Uno.UI/UI/Input/HoldingState.cs b/src/Uno.UI/UI/Input/HoldingState.cs index ace2b5fca268..c1678ffc3745 100644 --- a/src/Uno.UI/UI/Input/HoldingState.cs +++ b/src/Uno.UI/UI/Input/HoldingState.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT #if HAS_UNO_WINUI && IS_UNO_UI_PROJECT namespace Microsoft.UI.Input #else @@ -11,3 +13,4 @@ public enum HoldingState Canceled, } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationCompletedEventArgs.cs b/src/Uno.UI/UI/Input/ManipulationCompletedEventArgs.cs index a35b0f379ba0..d8bb6b950521 100644 --- a/src/Uno.UI/UI/Input/ManipulationCompletedEventArgs.cs +++ b/src/Uno.UI/UI/Input/ManipulationCompletedEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System.Linq; using Windows.Devices.Input; using Windows.Foundation; @@ -49,3 +51,4 @@ internal ManipulationCompletedEventArgs( internal bool IsInertial { get; } } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationDelta.cs b/src/Uno.UI/UI/Input/ManipulationDelta.cs index ea485bcd5eda..28df4e2ca13d 100644 --- a/src/Uno.UI/UI/Input/ManipulationDelta.cs +++ b/src/Uno.UI/UI/Input/ManipulationDelta.cs @@ -1,4 +1,6 @@ -using System; +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT +using System; using System.Collections.Generic; using Windows.Foundation; @@ -80,3 +82,4 @@ public override int GetHashCode() #endregion } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationInertiaStartingEventArgs.cs b/src/Uno.UI/UI/Input/ManipulationInertiaStartingEventArgs.cs index c758f69cce2a..b1457fe14206 100644 --- a/src/Uno.UI/UI/Input/ManipulationInertiaStartingEventArgs.cs +++ b/src/Uno.UI/UI/Input/ManipulationInertiaStartingEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System.Linq; using Windows.Devices.Input; using Windows.Foundation; @@ -48,3 +50,4 @@ internal ManipulationInertiaStartingEventArgs( internal GestureRecognizer.Manipulation.InertiaProcessor Processor { get; } } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationStartedEventArgs.cs b/src/Uno.UI/UI/Input/ManipulationStartedEventArgs.cs index dcefc8a274e9..357e33265a06 100644 --- a/src/Uno.UI/UI/Input/ManipulationStartedEventArgs.cs +++ b/src/Uno.UI/UI/Input/ManipulationStartedEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System.Linq; using Windows.Devices.Input; using Windows.Foundation; @@ -38,3 +40,4 @@ internal ManipulationStartedEventArgs( public uint ContactCount { get; } } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationStartingEventArgs.cs b/src/Uno.UI/UI/Input/ManipulationStartingEventArgs.cs index c22e6eeecb06..8b5270d3fe01 100644 --- a/src/Uno.UI/UI/Input/ManipulationStartingEventArgs.cs +++ b/src/Uno.UI/UI/Input/ManipulationStartingEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System; using System.Linq; using Windows.Devices.Input; @@ -26,3 +28,4 @@ internal ManipulationStartingEventArgs(PointerIdentifier pointer, GestureSetting public GestureSettings Settings { get; set; } } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationUpdatedEventArgs.cs b/src/Uno.UI/UI/Input/ManipulationUpdatedEventArgs.cs index 5ec5a2685e9c..a8040b860b64 100644 --- a/src/Uno.UI/UI/Input/ManipulationUpdatedEventArgs.cs +++ b/src/Uno.UI/UI/Input/ManipulationUpdatedEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using System.Linq; using System.Reflection; using Windows.Devices.Input; @@ -52,3 +54,4 @@ internal ManipulationUpdatedEventArgs( internal bool IsInertial { get; } } } +#endif diff --git a/src/Uno.UI/UI/Input/ManipulationVelocities.cs b/src/Uno.UI/UI/Input/ManipulationVelocities.cs index 6734774488f8..1d27fc3c433f 100644 --- a/src/Uno.UI/UI/Input/ManipulationVelocities.cs +++ b/src/Uno.UI/UI/Input/ManipulationVelocities.cs @@ -1,4 +1,6 @@ -using System; +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT +using System; using System.Collections.Generic; using Windows.Foundation; @@ -64,3 +66,4 @@ public override int GetHashCode() #endregion } } +#endif diff --git a/src/Uno.UI/UI/Input/RightTappedEventArgs.cs b/src/Uno.UI/UI/Input/RightTappedEventArgs.cs index 015866eec9fe..ee3348042767 100644 --- a/src/Uno.UI/UI/Input/RightTappedEventArgs.cs +++ b/src/Uno.UI/UI/Input/RightTappedEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using Windows.Devices.Input; using Windows.Foundation; @@ -33,3 +35,4 @@ public uint ContactCount } } } +#endif diff --git a/src/Uno.UI/UI/Input/TappedEventArgs.cs b/src/Uno.UI/UI/Input/TappedEventArgs.cs index 8ad7f75d598c..f5c294eb5838 100644 --- a/src/Uno.UI/UI/Input/TappedEventArgs.cs +++ b/src/Uno.UI/UI/Input/TappedEventArgs.cs @@ -1,3 +1,5 @@ +// On the UWP branch, only include this file in Uno.UWP (as public Window.whatever). On the WinUI branch, include it in both Uno.UWP (internal as Windows.whatever) and Uno.UI (public as Microsoft.whatever) +#if HAS_UNO_WINUI || !IS_UNO_UI_PROJECT using Windows.Devices.Input; using Windows.Foundation; @@ -36,3 +38,4 @@ public uint ContactCount } } } +#endif diff --git a/src/Uno.UWP/Uno.Reference.csproj b/src/Uno.UWP/Uno.Reference.csproj index 2acb903642c3..d287e49d868c 100644 --- a/src/Uno.UWP/Uno.Reference.csproj +++ b/src/Uno.UWP/Uno.Reference.csproj @@ -31,10 +31,7 @@ - - - - + diff --git a/src/Uno.UWP/Uno.Skia.csproj b/src/Uno.UWP/Uno.Skia.csproj index d9e1c1f3dcdc..47b2469d1a75 100644 --- a/src/Uno.UWP/Uno.Skia.csproj +++ b/src/Uno.UWP/Uno.Skia.csproj @@ -33,10 +33,7 @@ - - - - + diff --git a/src/Uno.UWP/Uno.Tests.csproj b/src/Uno.UWP/Uno.Tests.csproj index e84beaf52bec..8c49938593e6 100644 --- a/src/Uno.UWP/Uno.Tests.csproj +++ b/src/Uno.UWP/Uno.Tests.csproj @@ -28,10 +28,7 @@ - - - - + diff --git a/src/Uno.UWP/Uno.Wasm.csproj b/src/Uno.UWP/Uno.Wasm.csproj index b3647f1b81dc..61661b784519 100644 --- a/src/Uno.UWP/Uno.Wasm.csproj +++ b/src/Uno.UWP/Uno.Wasm.csproj @@ -27,10 +27,7 @@ - - - - + diff --git a/src/Uno.UWP/Uno.netcoremobile.csproj b/src/Uno.UWP/Uno.netcoremobile.csproj index 802edfb24a69..cce3276ac6a6 100644 --- a/src/Uno.UWP/Uno.netcoremobile.csproj +++ b/src/Uno.UWP/Uno.netcoremobile.csproj @@ -43,10 +43,7 @@ - - - - +