From 41b1c9eb8969f13f085c5e172577cdcb45ae5bf9 Mon Sep 17 00:00:00 2001 From: Rachel Kang Date: Fri, 26 Aug 2022 16:31:05 -0400 Subject: [PATCH] Implement PointerGestureRecognizer (#9592) * Initial PointerGestureRecognizer code * Update PointerGestureRecognizer.cs * Clean up code and add nullability * Fix bad merge * Remove test code * Add sample to GestureGallery * Copy and refactor GetPosition logic used in TapGesture * Clean up code and use GetPosition * Update control gallery sample * Add public API file changes * Clean up code * Clean up more code Co-authored-by: Shane Neuville --- .../Pages/Core/PointerGestureGalleryPage.xaml | 18 ++++ .../Core/PointerGestureGalleryPage.xaml.cs | 28 ++++++ .../ViewModels/CoreViewModel.cs | 2 +- .../ViewModels/GesturesViewModel.cs | 2 + .../GestureManager/GestureManager.Windows.cs | 52 ++++++++-- src/Controls/src/Core/PointerEventArgs.cs | 28 ++++++ .../src/Core/PointerGestureRecognizer.cs | 97 +++++++++++++++++++ .../net-android/PublicAPI.Unshipped.txt | 26 +++++ .../PublicAPI/net-ios/PublicAPI.Unshipped.txt | 26 +++++ .../net-maccatalyst/PublicAPI.Unshipped.txt | 26 +++++ .../net-tizen/PublicAPI.Unshipped.txt | 26 +++++ .../net-windows/PublicAPI.Unshipped.txt | 26 +++++ .../PublicAPI/net/PublicAPI.Unshipped.txt | 26 +++++ .../netstandard/PublicAPI.Unshipped.txt | 26 +++++ .../Windows/RoutedEventArgsExtensions.cs | 6 ++ 15 files changed, 406 insertions(+), 9 deletions(-) create mode 100644 src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml create mode 100644 src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml.cs create mode 100644 src/Controls/src/Core/PointerEventArgs.cs create mode 100644 src/Controls/src/Core/PointerGestureRecognizer.cs diff --git a/src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml b/src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml new file mode 100644 index 000000000000..10304c56196a --- /dev/null +++ b/src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml.cs b/src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml.cs new file mode 100644 index 000000000000..2ba2dc624235 --- /dev/null +++ b/src/Controls/samples/Controls.Sample/Pages/Core/PointerGestureGalleryPage.xaml.cs @@ -0,0 +1,28 @@ +using Microsoft.Maui.Controls; + +namespace Maui.Controls.Sample.Pages +{ + public partial class PointerGestureGalleryPage + { + public PointerGestureGalleryPage() + { + InitializeComponent(); + } + + void HoverBegan(object sender, PointerEventArgs e) + { + hoverLabel.Text = "Thanks for hovering me!"; + } + + void HoverEnded(object sender, PointerEventArgs e) + { + hoverLabel.Text = "Hover me again!"; + positionLabel.Text = "Hover above label to reveal pointer position again"; + } + + void HoverMoved(object sender, PointerEventArgs e) + { + positionLabel.Text = $"Pointer position is at: {e.GetPosition((View)sender)}"; + } + } +} \ No newline at end of file diff --git a/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs b/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs index b67c0942ad64..6cc2b5530f9c 100644 --- a/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs +++ b/src/Controls/samples/Controls.Sample/ViewModels/CoreViewModel.cs @@ -49,7 +49,7 @@ protected override IEnumerable CreateItems() => new[] "Focus and onfocus views, detect when a view gains focus and more."), new SectionModel(typeof(GesturesPage), "Gestures", - "Use tap, pinch, pan, swipe, and drag and drop gestures on View instances."), + "Use tap, pinch, pan, swipe, drag and drop, and pointer gestures on View instances."), new SectionModel(typeof(InputTransparentPage), "InputTransparent", "Manage whether a view participates in the user interaction cycle."), diff --git a/src/Controls/samples/Controls.Sample/ViewModels/GesturesViewModel.cs b/src/Controls/samples/Controls.Sample/ViewModels/GesturesViewModel.cs index 27bcf8810835..424a963f2e34 100644 --- a/src/Controls/samples/Controls.Sample/ViewModels/GesturesViewModel.cs +++ b/src/Controls/samples/Controls.Sample/ViewModels/GesturesViewModel.cs @@ -19,6 +19,8 @@ protected override IEnumerable CreateItems() => new[] "Swipe Gesture."), new SectionModel(typeof(TapGestureGalleryPage), "Tap Gesture", "Tap Gesture."), + new SectionModel(typeof(PointerGestureGalleryPage), "Pointer Gesture", + "Pointer Gesture."), }; } } diff --git a/src/Controls/src/Core/Platform/GestureManager/GestureManager.Windows.cs b/src/Controls/src/Core/Platform/GestureManager/GestureManager.Windows.cs index b42ad12e015a..ef209f8c7fac 100644 --- a/src/Controls/src/Core/Platform/GestureManager/GestureManager.Windows.cs +++ b/src/Controls/src/Core/Platform/GestureManager/GestureManager.Windows.cs @@ -8,6 +8,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Maui.Controls.Internals; using Microsoft.Maui.Graphics; +using Microsoft.UI.Input; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Media.Imaging; @@ -318,6 +319,9 @@ void ClearContainerEventHandlers() _container.PointerExited -= OnPointerExited; _container.PointerReleased -= OnPointerReleased; _container.PointerCanceled -= OnPointerCanceled; + _container.PointerEntered -= OnPgrPointerEntered; + _container.PointerExited -= OnPgrPointerExited; + _container.PointerMoved -= OnPgrPointerMoved; } } @@ -481,6 +485,40 @@ void OnPointerReleased(object sender, PointerRoutedEventArgs e) PanComplete(true); } + void OnPgrPointerEntered(object sender, PointerRoutedEventArgs e) + => HandlePgrPointerEvent(e, (view, recognizer) + => recognizer.SendPointerEntered(view, (relativeTo) => GetPosition(relativeTo, e))); + + void OnPgrPointerExited(object sender, PointerRoutedEventArgs e) + => HandlePgrPointerEvent(e, (view, recognizer) + => recognizer.SendPointerExited(view, (relativeTo) => GetPosition(relativeTo, e))); + + void OnPgrPointerMoved(object sender, PointerRoutedEventArgs e) + => HandlePgrPointerEvent(e, (view, recognizer) + => recognizer.SendPointerMoved(view, (relativeTo) => GetPosition(relativeTo, e))); + + private void HandlePgrPointerEvent(PointerRoutedEventArgs e, Action SendPointerEvent) + { + var view = Element as View; + if (view == null) + return; + + var pointerGestures = view.GestureRecognizers.GetGesturesFor(); + foreach (var recognizer in pointerGestures) + { + SendPointerEvent.Invoke(view, recognizer); + } + } + + Point? GetPosition(IElement? relativeTo, RoutedEventArgs e) + { + var result = e.GetPositionRelativeToElement(relativeTo); + if (result == null) + return null; + + return new Point(result.Value.X, result.Value.Y); + } + void OnTap(object sender, RoutedEventArgs e) { var view = Element as View; @@ -510,14 +548,7 @@ bool ProcessGestureRecognizers(IEnumerable? tapGestures) foreach (var recognizer in tapGestures) { - recognizer.SendTapped(view, (relativeTo) => - { - var result = e.GetPositionRelativeToElement(relativeTo); - if (result == null) - return null; - - return new Point(result.Value.X, result.Value.Y); - }); + recognizer.SendTapped(view, (relativeTo) => GetPosition(relativeTo, e)); e.SetHandled(true); handled = true; @@ -545,6 +576,7 @@ bool ValidateGesture(TapGestureRecognizer g) } } + void SwipeComplete(bool success) { var view = Element as View; @@ -679,6 +711,10 @@ void UpdatingGestureRecognizers() } } + _container.PointerEntered += OnPgrPointerEntered; + _container.PointerExited += OnPgrPointerExited; + _container.PointerMoved += OnPgrPointerMoved; + bool hasSwipeGesture = gestures.GetGesturesFor().GetEnumerator().MoveNext(); bool hasPinchGesture = gestures.GetGesturesFor().GetEnumerator().MoveNext(); bool hasPanGesture = gestures.GetGesturesFor().GetEnumerator().MoveNext(); diff --git a/src/Controls/src/Core/PointerEventArgs.cs b/src/Controls/src/Core/PointerEventArgs.cs new file mode 100644 index 000000000000..4eb292c3b6b7 --- /dev/null +++ b/src/Controls/src/Core/PointerEventArgs.cs @@ -0,0 +1,28 @@ +#nullable enable + +using Microsoft.Maui.Graphics; +using System; + +namespace Microsoft.Maui.Controls +{ + /// + /// Arguments for PointerGestureRecognizer events. + /// + public class PointerEventArgs : EventArgs + { + + Func? _getPosition; + + public PointerEventArgs() + { + } + + internal PointerEventArgs(Func? getPosition) + { + _getPosition = getPosition; + } + + public virtual Point? GetPosition(Element? relativeTo) => + _getPosition?.Invoke(relativeTo); + } +} \ No newline at end of file diff --git a/src/Controls/src/Core/PointerGestureRecognizer.cs b/src/Controls/src/Core/PointerGestureRecognizer.cs new file mode 100644 index 000000000000..ce037a95b75a --- /dev/null +++ b/src/Controls/src/Core/PointerGestureRecognizer.cs @@ -0,0 +1,97 @@ +#nullable enable +using System; +using Microsoft.Maui.Graphics; +using System.Windows.Input; + +namespace Microsoft.Maui.Controls +{ + /// + /// Provides pointer gesture recognition and events. + /// + public sealed class PointerGestureRecognizer : GestureRecognizer + { + public static readonly BindableProperty PointerEnteredCommandProperty = BindableProperty.Create(nameof(PointerEnteredCommand), typeof(ICommand), typeof(PointerGestureRecognizer), null); + + public static readonly BindableProperty PointerEnteredCommandParameterProperty = BindableProperty.Create(nameof(PointerEnteredCommandParameter), typeof(object), typeof(PointerGestureRecognizer), null); + + public static readonly BindableProperty PointerExitedCommandProperty = BindableProperty.Create(nameof(PointerExitedCommand), typeof(ICommand), typeof(PointerGestureRecognizer), null); + + public static readonly BindableProperty PointerExitedCommandParameterProperty = BindableProperty.Create(nameof(PointerExitedCommandParameter), typeof(object), typeof(PointerGestureRecognizer), null); + + public static readonly BindableProperty PointerMovedCommandProperty = BindableProperty.Create(nameof(PointerMovedCommand), typeof(ICommand), typeof(PointerGestureRecognizer), null); + + public static readonly BindableProperty PointerMovedCommandParameterProperty = BindableProperty.Create(nameof(PointerMovedCommandParameter), typeof(object), typeof(PointerGestureRecognizer), null); + + public PointerGestureRecognizer() + { + } + + public event EventHandler? PointerEntered; + public event EventHandler? PointerExited; + public event EventHandler? PointerMoved; + + public ICommand PointerEnteredCommand + { + get { return (ICommand)GetValue(PointerEnteredCommandProperty); } + set { SetValue(PointerEnteredCommandProperty, value); } + } + + public ICommand PointerEnteredCommandParameter + { + get { return (ICommand)GetValue(PointerEnteredCommandParameterProperty); } + set { SetValue(PointerEnteredCommandParameterProperty, value); } + } + public ICommand PointerExitedCommand + { + get { return (ICommand)GetValue(PointerExitedCommandProperty); } + set { SetValue(PointerExitedCommandProperty, value); } + } + public ICommand PointerExitedCommandParameter + { + get { return (ICommand)GetValue(PointerExitedCommandParameterProperty); } + set { SetValue(PointerExitedCommandParameterProperty, value); } + } + + public ICommand PointerMovedCommand + { + get { return (ICommand)GetValue(PointerMovedCommandProperty); } + set { SetValue(PointerMovedCommandProperty, value); } + } + + public ICommand PointerMovedCommandParameter + { + get { return (ICommand)GetValue(PointerMovedCommandParameterProperty); } + set { SetValue(PointerMovedCommandParameterProperty, value); } + } + + internal void SendPointerEntered(View sender, Func? getPosition) + { + ICommand cmd = PointerEnteredCommand; + if (cmd?.CanExecute(PointerEnteredCommandParameter) == true) + cmd.Execute(PointerEnteredCommandParameter); + + EventHandler? handler = PointerEntered; + handler?.Invoke(sender, new PointerEventArgs(getPosition)); + } + + internal void SendPointerExited(View sender, Func? getPosition) + { + ICommand cmd = PointerExitedCommand; + if (cmd?.CanExecute(PointerExitedCommandParameter) == true) + cmd.Execute(PointerExitedCommandParameter); + + EventHandler? handler = PointerExited; + handler?.Invoke(sender, new PointerEventArgs(getPosition)); + } + + internal void SendPointerMoved(View sender, Func? getPosition) + { + ICommand cmd = PointerMovedCommand; + if (cmd?.CanExecute(PointerMovedCommandParameter) == true) + cmd.Execute(PointerMovedCommandParameter); + + EventHandler? handler = PointerMoved; + handler?.Invoke(sender, new PointerEventArgs(getPosition)); + } + } +} diff --git a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt index 88dc6cd3403a..d1b058beee4a 100644 --- a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -9,6 +9,25 @@ Microsoft.Maui.Controls.MenuFlyout.IsReadOnly.get -> bool Microsoft.Maui.Controls.MenuFlyout.RemoveAt(int index) -> void Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -25,7 +44,14 @@ override Microsoft.Maui.Controls.TemplatedView.ArrangeOverride(Microsoft.Maui.Gr override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size static Microsoft.Maui.Controls.ToolTipProperties.GetText(Microsoft.Maui.Controls.BindableObject! bindable) -> object! static Microsoft.Maui.Controls.ToolTipProperties.SetText(Microsoft.Maui.Controls.BindableObject! bindable, object! value) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.ToolTipProperties.TextProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.MenuFlyout.Add(Microsoft.Maui.IMenuElement item) -> void ~Microsoft.Maui.Controls.MenuFlyout.Contains(Microsoft.Maui.IMenuElement item) -> bool diff --git a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 6f24828745f0..165288a581f9 100644 --- a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -9,6 +9,25 @@ Microsoft.Maui.Controls.MenuFlyout.IsReadOnly.get -> bool Microsoft.Maui.Controls.MenuFlyout.RemoveAt(int index) -> void Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -29,8 +48,15 @@ override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConst *REMOVED*override Microsoft.Maui.Controls.FlexLayout.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size static Microsoft.Maui.Controls.ToolTipProperties.GetText(Microsoft.Maui.Controls.BindableObject! bindable) -> object! static Microsoft.Maui.Controls.ToolTipProperties.SetText(Microsoft.Maui.Controls.BindableObject! bindable, object! value) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.ToolTipProperties.TextProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.VisualElement.ZIndexProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.MenuFlyout.Add(Microsoft.Maui.IMenuElement item) -> void ~Microsoft.Maui.Controls.MenuFlyout.Contains(Microsoft.Maui.IMenuElement item) -> bool diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 6f24828745f0..165288a581f9 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -9,6 +9,25 @@ Microsoft.Maui.Controls.MenuFlyout.IsReadOnly.get -> bool Microsoft.Maui.Controls.MenuFlyout.RemoveAt(int index) -> void Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -29,8 +48,15 @@ override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConst *REMOVED*override Microsoft.Maui.Controls.FlexLayout.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size static Microsoft.Maui.Controls.ToolTipProperties.GetText(Microsoft.Maui.Controls.BindableObject! bindable) -> object! static Microsoft.Maui.Controls.ToolTipProperties.SetText(Microsoft.Maui.Controls.BindableObject! bindable, object! value) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.ToolTipProperties.TextProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.VisualElement.ZIndexProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.MenuFlyout.Add(Microsoft.Maui.IMenuElement item) -> void ~Microsoft.Maui.Controls.MenuFlyout.Contains(Microsoft.Maui.IMenuElement item) -> bool diff --git a/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt index 3c9da897aa3d..1d4a2e697c91 100644 --- a/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt @@ -22,6 +22,25 @@ Microsoft.Maui.Controls.Handlers.Compatibility.TableViewRenderer Microsoft.Maui.Controls.Handlers.Compatibility.TableViewRenderer.TableViewRenderer() -> void Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -49,8 +68,15 @@ override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConst *REMOVED*override Microsoft.Maui.Controls.FlexLayout.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size static Microsoft.Maui.Controls.ToolTipProperties.GetText(Microsoft.Maui.Controls.BindableObject! bindable) -> object! static Microsoft.Maui.Controls.ToolTipProperties.SetText(Microsoft.Maui.Controls.BindableObject! bindable, object! value) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.ToolTipProperties.TextProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.VisualElement.ZIndexProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.MenuFlyout.Add(Microsoft.Maui.IMenuElement item) -> void ~Microsoft.Maui.Controls.MenuFlyout.Contains(Microsoft.Maui.IMenuElement item) -> bool diff --git a/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 59b356ab477e..b54632c31405 100644 --- a/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -12,6 +12,25 @@ Microsoft.Maui.Controls.Platform.ShellNavigationViewItem.ShellNavigationViewItem Microsoft.Maui.Controls.Platform.ShellNavigationViewItemAutomationPeer Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -30,6 +49,13 @@ override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConst *REMOVED*override Microsoft.Maui.Controls.RadioButton.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size *REMOVED*override Microsoft.Maui.Controls.FlexLayout.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size *REMOVED*override Microsoft.Maui.Controls.Platform.ShellFlyoutItemView.OnContentChanged(object oldContent, object newContent) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.Platform.ShellNavigationViewItemAutomationPeer.ShellNavigationViewItemAutomationPeer(Microsoft.Maui.Controls.Platform.ShellNavigationViewItem owner) -> void ~override Microsoft.Maui.Controls.Platform.ShellNavigationViewItem.OnCreateAutomationPeer() -> Microsoft.UI.Xaml.Automation.Peers.AutomationPeer diff --git a/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt index 518183110f44..6d21ea4f2f46 100644 --- a/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt @@ -9,6 +9,25 @@ Microsoft.Maui.Controls.MenuFlyout.IsReadOnly.get -> bool Microsoft.Maui.Controls.MenuFlyout.RemoveAt(int index) -> void Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -28,8 +47,15 @@ override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConst *REMOVED*override Microsoft.Maui.Controls.FlexLayout.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size static Microsoft.Maui.Controls.ToolTipProperties.GetText(Microsoft.Maui.Controls.BindableObject! bindable) -> object! static Microsoft.Maui.Controls.ToolTipProperties.SetText(Microsoft.Maui.Controls.BindableObject! bindable, object! value) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.ToolTipProperties.TextProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.VisualElement.ZIndexProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.MenuFlyout.Add(Microsoft.Maui.IMenuElement item) -> void ~Microsoft.Maui.Controls.MenuFlyout.Contains(Microsoft.Maui.IMenuElement item) -> bool diff --git a/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 518183110f44..6d21ea4f2f46 100644 --- a/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -9,6 +9,25 @@ Microsoft.Maui.Controls.MenuFlyout.IsReadOnly.get -> bool Microsoft.Maui.Controls.MenuFlyout.RemoveAt(int index) -> void Microsoft.Maui.Controls.MenuFlyoutSeparator Microsoft.Maui.Controls.MenuFlyoutSeparator.MenuFlyoutSeparator() -> void +Microsoft.Maui.Controls.PointerEventArgs +Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEntered -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExited -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameter.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerGestureRecognizer() -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMoved -> System.EventHandler? +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommand.set -> void +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.get -> System.Windows.Input.ICommand! +Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameter.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.get -> Microsoft.Maui.Controls.ButtonsMask Microsoft.Maui.Controls.TapGestureRecognizer.Buttons.set -> void Microsoft.Maui.Controls.TapGestureRecognizer.Tapped -> System.EventHandler? @@ -28,8 +47,15 @@ override Microsoft.Maui.Controls.TemplatedView.MeasureOverride(double widthConst *REMOVED*override Microsoft.Maui.Controls.FlexLayout.MeasureOverride(double widthConstraint, double heightConstraint) -> Microsoft.Maui.Graphics.Size static Microsoft.Maui.Controls.ToolTipProperties.GetText(Microsoft.Maui.Controls.BindableObject! bindable) -> object! static Microsoft.Maui.Controls.ToolTipProperties.SetText(Microsoft.Maui.Controls.BindableObject! bindable, object! value) -> void +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerEnteredCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerExitedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandParameterProperty -> Microsoft.Maui.Controls.BindableProperty! +static readonly Microsoft.Maui.Controls.PointerGestureRecognizer.PointerMovedCommandProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.ToolTipProperties.TextProperty -> Microsoft.Maui.Controls.BindableProperty! static readonly Microsoft.Maui.Controls.VisualElement.ZIndexProperty -> Microsoft.Maui.Controls.BindableProperty! +virtual Microsoft.Maui.Controls.PointerEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? virtual Microsoft.Maui.Controls.TappedEventArgs.GetPosition(Microsoft.Maui.Controls.Element? relativeTo) -> Microsoft.Maui.Graphics.Point? ~Microsoft.Maui.Controls.MenuFlyout.Add(Microsoft.Maui.IMenuElement item) -> void ~Microsoft.Maui.Controls.MenuFlyout.Contains(Microsoft.Maui.IMenuElement item) -> bool diff --git a/src/Core/src/Platform/Windows/RoutedEventArgsExtensions.cs b/src/Core/src/Platform/Windows/RoutedEventArgsExtensions.cs index eec449bf0b5d..7bf6d0877bba 100644 --- a/src/Core/src/Platform/Windows/RoutedEventArgsExtensions.cs +++ b/src/Core/src/Platform/Windows/RoutedEventArgsExtensions.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using Microsoft.Maui.Graphics; using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml; using WPoint = Windows.Foundation.Point; @@ -37,6 +38,11 @@ public static void SetHandled(this RoutedEventArgs e, bool value) return t.GetPosition(relativeTo); else if (e is DoubleTappedRoutedEventArgs dt) return dt.GetPosition(relativeTo); + else if (e is PointerRoutedEventArgs p) + { + var point = p.GetCurrentPoint(relativeTo); + return new WPoint(point.Position.X, point.Position.Y); + } return null; }