Bugfix: Property caching called too late
A lot of properties for the WebView2 control can only be set after the control has been created.
As the WebView2 control is an out of process control that spins up all the required browser processes in the background, that means that you could traditionally only set these in the OnCreateWebViewCompleted method or at a later time when you're sure that the control exists.
To make it easier to use properties that control the behavior of the WebView2 control we constructed a mechanism that caches these properties and automatically applies these properties after the control is created.
This mechanism allows you to set these properties at any time when the AntView control is created, so no longer depending on when the browser process finalizes its creation.
Unfortunately though, the mechanism that applied these changed settings was - by mistake - invoked after the OnCreateWebViewCompleted event was triggered.
The result of that is that any changes made to these properties in the OnCreateWebViewCompleted event could get reversed by the caching logic as it would try to apply the cached value to these properties instead of the value set in the event.
Something that is pretty confusing if you bump into that issue, so we figured to resolve it and change the time to when the cached properties are applied to before the OnCreateWebViewCompleted event is triggered, just as one would expect.
In summary, the caching mechanism worked fine when setting the properties early, but ignored changes made by developers to these properties in the OnCreateWebViewCompleted event.
The bugfix applies to the following properties:
By fixing this issue, the original intention of caching the properties, to make things easier, now works as expected.
You can disable the bugfix by setting the property DisablePropertyCachingBugfix in the AntViewGlobal object to true and the caching continues to work as in earlier versions of AntView.
This property is made available in the global object as an easy way to upgrade to our latest version of the control without unexpected changes in behavior.
The default setting of the DisablePropertyCachingBugfix property is false as that way the issue is fixed going forward.
This compatibility property might be removed in newer versions of AntView (version 3.x or later).
AntView - The MS Edge WebView2 ActiveX control Date last changed: 2026/07/13