diff --git a/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Presentation/SampleChooserViewMode.Properties.cs b/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Presentation/SampleChooserViewMode.Properties.cs
index c2937137c60b..ae8ff1259625 100644
--- a/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Presentation/SampleChooserViewMode.Properties.cs
+++ b/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Presentation/SampleChooserViewMode.Properties.cs
@@ -25,6 +25,7 @@
using Uno.UI.Xaml.Core;
using WinUICoreServices = Uno.UI.Xaml.Core.CoreServices;
using Uno.UI;
+using Uno;
#endif
namespace SampleControl.Presentation
@@ -449,6 +450,22 @@ public bool UseRtl
}
#if HAS_UNO
+ public bool SimulateTouch
+ {
+#if DEBUG
+ get => WinRTFeatureConfiguration.DebugOptions.SimulateTouch;
+#else
+ get => false;
+#endif
+ set
+ {
+#if DEBUG
+ WinRTFeatureConfiguration.DebugOptions.SimulateTouch = value;
+ RaisePropertyChanged();
+#endif
+ }
+ }
+
public bool PreventLightDismissOnWindowDeactivated
{
get => FeatureConfiguration.Popup.PreventLightDismissOnWindowDeactivated;
diff --git a/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Views/Controls/SampleChooserControl.xaml b/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Views/Controls/SampleChooserControl.xaml
index f6b720d11032..ea8c4821a919 100644
--- a/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Views/Controls/SampleChooserControl.xaml
+++ b/src/SamplesApp/SamplesApp.UnitTests.Shared/Controls/UITests/Views/Controls/SampleChooserControl.xaml
@@ -573,6 +573,11 @@
+
+
+
+
+
diff --git a/src/Uno.UWP/Devices/Input/PointerDevice.cs b/src/Uno.UWP/Devices/Input/PointerDevice.cs
index d5370fb7f7ea..e434727b98d1 100644
--- a/src/Uno.UWP/Devices/Input/PointerDevice.cs
+++ b/src/Uno.UWP/Devices/Input/PointerDevice.cs
@@ -1,4 +1,5 @@
using System.Runtime.Serialization.Formatters;
+using Uno;
namespace Windows.Devices.Input
{
@@ -10,6 +11,13 @@ public partial class PointerDevice
internal static PointerDevice For(PointerDeviceType type)
{
+#if DEBUG
+ if (WinRTFeatureConfiguration.DebugOptions.SimulateTouch)
+ {
+ type = PointerDeviceType.Touch;
+ }
+#endif
+
// We cache them as we don't implement any other properties than the PointerDeviceType
// but this is probably not really valid...
switch (type)
diff --git a/src/Uno.UWP/FeatureConfiguration/WinRTFeatureConfiguration.cs b/src/Uno.UWP/FeatureConfiguration/WinRTFeatureConfiguration.cs
index 22fd4c4d4d5b..d18e6a7ee8c9 100644
--- a/src/Uno.UWP/FeatureConfiguration/WinRTFeatureConfiguration.cs
+++ b/src/Uno.UWP/FeatureConfiguration/WinRTFeatureConfiguration.cs
@@ -45,4 +45,14 @@ public static class StoreContext
public static bool TestMode { get; set; }
}
#endif
+
+#if DEBUG
+ internal static class DebugOptions
+ {
+ ///
+ /// Adjusts all PointerPoint instances as if they were of type Touch.
+ ///
+ public static bool SimulateTouch { get; set; }
+ }
+#endif
}