Skip to content

microsoft.dotnet.designtools.client.proxies.ControlProxy not available #7657

@AdmiralSnyder

Description

@AdmiralSnyder

Environment

VS 2022 Version 17.4.0 Preview 1.0
windows 11, 64bit

.NET version

since it's a VS extension, it targets Framework 4.8

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

sure, in VS2019 it's been working (i don't remember when the switch to the new oop designer happened, but that is the relevant breaking point.

Issue description

i'm trying to migrate a VS extension to VS2022 that is using DTE to get to the currently selected control in the winforms designer, and toggles through its Dock property, so that a control can be snapped to the sides of its parent via hotkey.

in VS2022, the out of process designer is being used, and the object that is selected (that DTE / ISelectionService returns) is an
microsoft.dotnet.designtools.client.proxies.ControlProxy

i cannot find this type. is it not publicly visible? are there interfaces i could cast it to?
basically, i need to get to the underlying control to set its dock property.

Any help is greatly appreciated.

Steps to reproduce

i can put the extension project onto github and make it publicly available, if requested.

Diagnostics

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-VSDesignerWindows Forms out-of-proc designer related issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions