Skip to content

[Problem/Bug]: WPF Webview2compositioncontrol load but doesnt render while WV2 works fine #5189

Description

What happened?

Hello

This bug is related to a plugin I am working on with a MVVM wpf UI I am developing for the Autodesk Building information modeling software Revit.
I am trying to use the webview2 compositioncontrol instead of webview2 to solve the airspace issue as documented inside #286
Within the same application and the same view, Webview 2 works as intended, but webview2compositioncontrol doesn't render. Right-clicking tells me the webpage is loaded and navigation is completed. I can inspect or even screenshot the webpage in my webview2compositioncontrol. My mouse recognizes the button on the webpage, but it doesn't render.
within revit 2025 and net8, I was getting the same error as #5163 but I resolved it by specifying the target platform to "net8.0-windows10.0.22000.0" and ensure NET8 SDK is 8.0.407. after that the same WV2composition control render bug as Revit 2024 and net48 still persist
it is also worth noting this example here functions on my machine https://github.com/MicrosoftEdge/WebView2Samples/tree/main/SampleApps/WebView2WpfCompositionControl

Thank you for looking at my issue

Image

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

134.0.3124.93

SDK Version

1.0.3171-prerelease

Framework

WPF

Operating System

Windows 11

OS Version

10.0.22621 Build 22621

Repro steps

Please note the uploaded MRE cannot be debugged outside of the API context of Autodesk Revit. I was able to reproduce this bug on 3 different developer's machine, all with very similar if not identical system enviroment

  1. download the repo
  2. makesure you have the some version of Autodesk revit downloadedm Trial will do, I prefer 2024(net 48) and 2025(net 8) for debugging, this issue is reproducible in both
  3. select the debug matching your revit version (debug R24 for revit 2024)
  4. launch the "show modeless window" under the "RevitAddIn" tab in revit UI

Upload of MRE zip failed so here is a onedrive link https://corganone-my.sharepoint.com/:u:/g/personal/peter_zhang_corgan_com/EQXjRXeercFEpVGC2C1lUz8BcYRVvIyKWdfHlBicgTI20Q?e=lXIe4e

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions