Skip to content

ControlDesigner GetHitTest is not supported under net6.0 #12112

Open

Description

@Eviav

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

Activity

  1. added
    untriaged
    on Sep 11, 2024
  2. added this to the .NET 10.0 milestone on Sep 11, 2024
  3. Shyam-Gupta commented on Sep 27, 2024

    @Shyam-Gupta
    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

  4. Eviav commented on Sep 27, 2024

    @Eviav
    Author

    @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 😂

  5. Shyam-Gupta commented on Sep 27, 2024

    @Shyam-Gupta
    Member

    Could you please share your updated project?

  6. added
    waiting-author-feedback
    on Sep 27, 2024
  7. Eviav commented on Sep 29, 2024

    @Eviav
    Author

    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 🤔

  8. removed
    waiting-author-feedback
    on Sep 29, 2024
  9. Shyam-Gupta commented on Sep 30, 2024

    @Shyam-Gupta
    Member

    @KlausLoeffelmann Would you have some suggestions here?

  10. added
    area-VSDesigner
    and removed
    untriaged
    on Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-VSDesigner

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions