Bugfix: Boolean property True value incorrect
For ActiveX controls it used to be normal to use the integer value -1 for the boolean state "True" and 0 for "False".
WebView2 is a WinRT component with what you could call a "new style" COM interface, we made the mistake to use the old ActiveX style -1 value for when a property is set to True.
As it turns out, this is not always what Microsoft's WebView2 control is expecting.
For some of its boolean values, the WebView2 control only expects to see the integer value 1 for boolean state "True" and nothing else. In quite a few other areas, the value -1 is also accepted for a boolean True, as well as value 1.
On top of that, sometimes the change of a property only applies after a page navigation in the browser engine.
All this added to our confusion while trying to find out what was happening when we noticed that a property refused to be set back to "true" whereas this did work when doing so in C#.
After a lot of debugging, testing and reading.. we've come to the conclusion that using a value of 1 for "True" works everywhere and as such we've adapted our code to use that consistently.
A sidenote is that AntView, being a normal ActiveX control, actually does expect -1 for True in boolean variables and properties.
This bugfix addresses the "can't set the property back to true" problem for the following properties:
AntView interface
You can disable the bugfix by setting the property DisableBooleanPropertyBugfix in the AntViewGlobal object to True and the way the boolean properties are working is identical 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 on behavior.
The default setting of the DisableBooleanPropertyBugfix 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