Open amaitland opened 2 years ago
Guidance on adding support seems to be limited, have created
Working branch https://github.com/cefsharp/CefSharp/tree/winforms/oopdesigner
Will wait to hear from the WinForms Team
before progressing any further with this.
thank you
Example of crash in https://github.com/cefsharp/CefSharp/issues/4148#issue-1284865877 when using designer.
Still no meaningful error message provided by the designer crash.
Thanks to @davidei1955 for providing a link to a newer designer guide that was published a few months ago.
https://devblogs.microsoft.com/dotnet/custom-controls-for-winforms-out-of-process-designer/
There still isn't a newer SDK available
and I was previously very reluctant to provide a dependency on a preview package
. After extracting the designer Nupkg
I can see it only includes ref assemblies so we should be able to use this as a development dependency (no direct reference will be added to the CefSharp
nuget packages).
CefSharp.Core.Runtime.dll
. (Change to P/Invoke
)There's some other code that can be converted to P/Invoke
that might simplify designer support.
Anyone wanting to test out the latest changes in relation to the WinForms OOP Designer
can use the latest -CI
build from https://www.myget.org/F/cefsharp/ (not the -RCI
builds, they won't include the changes yet).
You should hopefully be able to add the ChromiumWebBrowser
to a form using the designer, it will just say ChromiumWebBrowser
if all goes well.
There's still likely issues. I still regularly see crashes with the WinForms OOP Designer
with bare WinForms
projects (no CefSharp
references), so I suspect there are some issues that still need to be worked out.
The new OOP designer likely requires a new design time class.
Details in https://devblogs.microsoft.com/dotnet/state-of-the-windows-forms-designer-for-net-applications/
https://www.nuget.org/packages/Microsoft.WinForms.Designer.SDK