Skip to content
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

ControlDesigner GetHitTest is not supported under net6.0 #12112

Open
EVA-SS opened this issue Sep 11, 2024 · 5 comments
Open

ControlDesigner GetHitTest is not supported under net6.0 #12112

EVA-SS opened this issue Sep 11, 2024 · 5 comments
Labels
untriaged The team needs to look at this issue in the next triage
Milestone

Comments

@EVA-SS
Copy link

EVA-SS commented Sep 11, 2024

Environment

17.11.3

.NET version

net6.0 - net8.0

Did this work in a previous version of Visual Studio and/or previous .NET release?

framework all is normal

Issue description

my custom controls cannot capture mouse clicks, but System.Windows.Forms.TabControl can

Steps to reproduce

Here is a demo, the framework 4.8 can capture the mouse in the designer, but I hope the designer can also capture the mouse normally under net6.0

TestDesignGetHitTest.zip

Diagnostics

No response

@EVA-SS EVA-SS added the untriaged The team needs to look at this issue in the next triage label Sep 11, 2024
@JeremyKuhne JeremyKuhne added this to the .NET 10.0 milestone Sep 11, 2024
@Shyam-Gupta
Copy link
Member

@EVA-SS In contrast to .NET Framework projects, WinForms designer for .NET projects uses a completely different architecture. It spawns an external process to load .NET assemblies and resolve types. There is a distinction in the way it loads design time and runtime assemblies.
For WinForms .NET designer, you will need to reference WinForms designer SDK package available on nuget.org.
For documentation and samples check: https://github.com/microsoft/winforms-designer-extensibility

cc: @KlausLoeffelmann, @JeremyKuhne

@EVA-SS
Copy link
Author

EVA-SS commented Sep 27, 2024

@EVA-SS In contrast to .NET Framework projects, WinForms designer for .NET projects uses a completely different architecture. It spawns an external process to load .NET assemblies and resolve types. There is a distinction in the way it loads design time and runtime assemblies. For WinForms .NET designer, you will need to reference WinForms designer SDK package available on nuget.org. For documentation and samples check: https://github.com/microsoft/winforms-designer-extensibility

cc: @KlausLoeffelmann, @JeremyKuhne

Thank you, but GetHitTest still doesn't work 😂

@Shyam-Gupta
Copy link
Member

Could you please share your updated project?

@JeremyKuhne JeremyKuhne added the 📭 waiting-author-feedback The team requires more information from the author label Sep 27, 2024
@EVA-SS
Copy link
Author

EVA-SS commented Sep 29, 2024

Here, after trying to reference the WinForms designer SDK, only System.ComponentModel.Design.DesignerActionList can be recognized normally on the Core project. Many UITypeEditor still do not support it, including override bool GetPaintValueSupported and override void PaintValue

TestDesignGetHitTest.zip


image

How should I use the SDK correctly, or is this interaction method not allowed by the official 🤔

@dotnet-policy-service dotnet-policy-service bot removed the 📭 waiting-author-feedback The team requires more information from the author label Sep 29, 2024
@Shyam-Gupta
Copy link
Member

@KlausLoeffelmann Would you have some suggestions here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged The team needs to look at this issue in the next triage
Projects
None yet
Development

No branches or pull requests

3 participants