-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows Forms] Controls support #1100
Comments
Combobox is working now, but with broken accessibility. |
Combobox is working now. |
I'm pretty sure IDispatch is needed for WebBrowser scripting and eventing support (and besides WebBrowser, also for some Clipboard / Drag'n'drop scenarios; also for ActiveX hosting scenarios, both ways, consuming and providing controls). We had several recent issues due to changes in how IDispatch works in WinForms in .NET Core (its no longer provided by base classes, users have to request it explicitly now). So its clearly needed and people are using it. You may be able to run a limited form of WinForms this way, but definitely cannot get it fully working without proper COM support. It may be possible to roll custom COM support into WinForms (for e.g. IDispatch and whatever else is missing) but its probably still quite some work. |
The work that is related to this item is for NativeAOT as I understand it; not the AOT (PublishReadyToRun) of NET6 today and related to COM issues. Will this work improve on NET6 trimming capability in current days AOT or does this only apply to NativeAOT? |
This work does not affect trimming in any way. At least I think that's separate issue.
If not blocked by tooling, you may have similar experience with
Any further work on WinForms would require improve trimming of WinForms itself, and would happens in WinForms repo itself. So I would say, any NativeAOT work and ReadyToRun work would go side-by-side and improve both at the same time. At least I see it this way now. Other option which may help you, is to use custom build of WinForms where you remove all not used code yourself. With WinForms that's extremely simple to do. WPF is out of discussion for now, due to lack of resources (IMO) in supporting team. |
Just to clarify; I assume the gap in webbrowsing component is related to nuget Microsoft.Web.WebView2 ? |
No, this is regular |
WinForms support for Native AOT is tracked by dotnet/winforms#4649 |
Here the summary of controls working in Windows Forms in my limited testing
Common Controls
Containers
Menu & Toolstrip
Dialogs
DataGridView
All crashes so far is from loading images from stream and require support forInterop.Ole32.IStream
fromSystem.Drawing.Common
This is resurrection of dotnet/corert#7995 and all tests was done with
WinFormsComWrappers
from https://github.com/kant2002/WinFormsComInterop/To make combobox works require implementation ofAccessibility.IAccessible
.The text was updated successfully, but these errors were encountered: