Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

Enables users to replace the default gesture platform manager with custom implementations via dependency injection. Interface is internal for .NET 10 with TODO to make public in .NET 11.

Changes

  • New IGesturePlatformManager interface - Extends IDisposable, provides contract for platform gesture management
  • All platform implementations updated - iOS, Android, Windows, Tizen, and Standard now implement interface
  • Service-based retrieval in GestureManager - Checks service container first, falls back to default implementation
  • Unit tests added - Verify both custom service registration and default fallback behavior

Usage

// Custom implementation
public class CustomGesturePlatformManager : IGesturePlatformManager
{
    public CustomGesturePlatformManager(IViewHandler handler) { }
    public void Dispose() { }
}

// Registration in MauiProgram.cs
builder.Services.AddSingleton<IGesturePlatformManager, CustomGesturePlatformManager>();

Pattern follows existing AlertManager approach - service-based with automatic fallback maintains full backward compatibility.

Original prompt

This section details on the original issue you should resolve

<issue_title>Create IGesturePlatformManager so users can replace the behavior of our GesturePlatformManager a</issue_title>
<issue_description>### Description

In order to enable users to swap in their own GesturePlatformManager we need to create an IGesturePlatformManager interface and then convert all cases where GesturePlatformManager is created to use the Services to retrieve the alertmanager.

For this first implementation make the IGesturePlatformManage4 internal and we will make it public in NET11 so just add a TODO to make it public in NET11</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Create IGesturePlatformManager interface for custom behaviors Create IGesturePlatformManager interface for custom gesture handling Jan 3, 2026
Copilot AI requested a review from PureWeen January 3, 2026 03:13
@PureWeen
Copy link
Member

/rebase

Copilot AI and others added 2 commits January 29, 2026 21:16
…pport

Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create IGesturePlatformManager so users can replace the behavior of our GesturePlatformManager a

2 participants