MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Feature]: Expose RasterizationScale, ShouldDetectMonitorScaleChanges and RasterizationScaleChanged of CoreWebView2Controller in WebView2 class

Open
#4,775 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Describe the feature/enhancement you need

I need to disable the windows text size scaling while keep the windows dpi scaling.
After some digging I found this: https://github.com/MicrosoftEdge/WebView2Feedback/issues/3699
However I cannot access CoreWebView2Controller in Microsoft.Web.WebView2.WinForms.WebView2, as it's a private field, ShouldDetectMonitorScaleChanges and RasterizationScaleChanged are not exposed in WebView2.

The scenario/use case where you would use this feature

I want to set ShouldDetectMonitorScaleChanges to false, then set the RasterizationScale to the value of DeviceDpi / 96, this would avoid the influence of windows text size scaling.

How important is this request to you?

Impactful. My app's user experience would be significantly compromised without it.

Suggested implementation

Expose those properties/events in Microsoft.Web.WebView2.WinForms.WebView2, or even better, _coreWebView2Controller field.

What does your app do? Is there a pending deadline for this request?

Our app use webview2 and blazor to render WinForms controls on a browser, it's now generally available internally.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked WebView2Feedback issue 3699 and the Microsoft.Web.WebView2.WinForms.WebView2 entry point named in this request. Confirm how CoreWebView2Controller is currently exposed, then define the public access for RasterizationScale, ShouldDetectMonitorScaleChanges, and RasterizationScaleChanged. Done means WinForms consumers can use these members to control monitor scaling as described.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.