Skip to content

Add Windows platform support to Plugin.Maui.ZoomView#12

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-11
Draft

Add Windows platform support to Plugin.Maui.ZoomView#12
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-11

Conversation

Copilot AI commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

This PR extends the Plugin.Maui.ZoomView library to support the Windows (WinUI) platform, enabling ZoomView to work on Windows in addition to Android and iOS.

Changes Made

🪟 Windows Platform Implementation

  • Added Platforms/Windows/PlatformZoomView.cs: Windows-specific zoom view using WinUI ScrollViewer with native zoom capabilities
  • Added Platforms/Windows/ZoomViewHandler.cs: Windows-specific handler implementation following the MAUI Handler pattern
  • Enhanced zoom features: Smooth animations, dynamic zoom bounds, improved double-tap handling with float tolerance

📦 Project Configuration Updates

  • Updated target frameworks: Added net9.0-windows10.0.19041.0 to both main project and sample app
  • Added conditional compilation: Windows platform files are properly excluded/included based on target framework
  • Updated package metadata: Description and tags now include Windows platform support

📖 Documentation & Testing

  • Updated README.md: Added Windows to supported platforms table and included platform implementation details
  • API validation: Created and ran tests to ensure no breaking changes to existing API
  • Backward compatibility: All existing Android and iOS functionality remains unchanged

Implementation Details

The Windows implementation leverages WinUI's native ScrollViewer control which provides:

  • ✅ Pinch-to-zoom gestures
  • ✅ Pan/scroll when zoomed in
  • ✅ Mouse wheel zoom support
  • ✅ Double-tap zoom in/out (configurable via ZoomInOnDoubleTap/ZoomOutOnDoubleTap)
  • ✅ Reset to original zoom and position
  • ✅ Smooth animations and inertia

Platform Support Matrix

Platform Status Implementation
🤖 Android ✅ Supported Custom Matrix transformations
🍎 iOS ✅ Supported Native UIScrollView
🪟 Windows NEW Native WinUI ScrollViewer

Usage Example

The Windows implementation works seamlessly with the existing API:

<ContentPage xmlns:zoomview="clr-namespace:Plugin.Maui.ZoomView;assembly=Plugin.Maui.ZoomView">
    <zoomview:ZoomView>
        <Image Source="myimage.jpg" />
    </zoomview:ZoomView>
</ContentPage>

No code changes required - existing MAUI applications targeting Windows will automatically gain zoom functionality when this update is applied.

Fixes #11.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 3 commits July 10, 2025 07:06
Co-authored-by: bhavanesh2001 <184209926+bhavanesh2001@users.noreply.github.com>
Co-authored-by: bhavanesh2001 <184209926+bhavanesh2001@users.noreply.github.com>
… documentation

Co-authored-by: bhavanesh2001 <184209926+bhavanesh2001@users.noreply.github.com>
Copilot AI changed the title [WIP] Support ZoomView control for Windows platform Add Windows platform support to Plugin.Maui.ZoomView Jul 10, 2025
Copilot AI requested a review from bhavanesh2001 July 10, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ZoomView control for Windows platform

2 participants