unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.77k stars 706 forks source link

WebView2 - zoom disable issue #17934

Open GCX-Monter opened 1 month ago

GCX-Monter commented 1 month ago

Current behavior

It is not possible to disable the zoom feature.

Expected behavior

Disable the zoom on all pages on all devices.

How to reproduce it (as minimally and precisely as possible)

For example open platform.uno and try zoom.

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

Android, iOS, Windows (WinAppSDK)

IDE

Visual Studio 2022

IDE version

Visual Studuo 17.9.1, UNO 5.2

Relevant plugins

No response

Anything else we need to know?

No response

jeromelaban commented 3 weeks ago

Thanks for the report.

Zooming is a feature that is generally applicable to the site itself. If you want to disable zooming, you'll likely need to inject a script that will modify the body of the page so it stops being zoommable.

/cc @MartinZikmund

GCX-Monter commented 2 weeks ago

Спасибо за доклад.

Масштабирование — это функция, которая в целом применима к самому сайту. Если вы хотите отключить масштабирование, вам, скорее всего, придется внедрить скрипт, который изменит тело страницы, чтобы она перестала быть масштабируемой.

/кубовый

Thank you for your response.

WebView2 has settings such as IsZoomControlEnabled that allows disabling zoom on Windows devices, and also IsPinchZoomEnabled for disabling pinch zoom capability on touch-enabled devices. I tried to invoke these settings, but unfortunately, they do not work. These features are necessary for web pages that cannot be accessed during application development to implement the appropriate settings.