dotnet / dotnet/winforms

Component Designer still does not work

Open
#10,458 1 comment 0 reactions 1 assignee Claimed by @KlausLoeffelmann View on GitHub
area-DesignerSupport area-VSDesigner tenet-compatibility
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

### Environment

VS2022 17.8.0

### .NET version

net6.0-windows

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

No

### Issue description

As Dennis mentioned in the https://github.com/dotnet/winforms/issues/4239 ticket, Component Designer does not work.

Just to indicate that we have been waiting for this Component Designer fix as well (for our commercial product for other .NET developers). We have a Controller class and a custom designer, a descendant of ComponentDocumentDesigner:

```
[Designer("DevExpress.ExpressApp.Design.ControllerDesigner, DevExpress.ExpressApp.Design" + XafAssemblyInfo.VersionSuffix + XafAssemblyInfo.AssemblyNamePostfix, DevExpress.Utils.Design.Aliases.IRootDesigner)]
[DesignerCategory("Component")]
[DefaultEvent("Activated")]
#endif
public abstract class Controller : Component, ISupportUpdate { ... }

[ToolboxItem(false)]
[ToolboxItemFilter("DevExpress.ExpressApp.Controller", ToolboxItemFilterType.Require)]
[ToolboxItemFilter("", ToolboxItemFilterType.Custom)]
public class ControllerDesigner : ComponentDocumentDesigner, IToolboxUser { ...}
```
Scenario
.NET developers can configure Controller properties in the property grid and also drag & drop Actions from the Visual Studio Toolbox. Actions are child components within the parent Controller component. For more information, see [this tutorial for .NET Framework](https://docs.devexpress.com/eXpressAppFramework/112737/getting-started/in-depth-tutorial-winforms-aspnet/extend-functionality/add-a-simple-action?p=netframework).

The issue affects our ASP.NET Core Blazor and WinForms .NET Core/.NET 6+ developers, because the designer throws this Value cannot be null error. As a .NET component vendor, we had to disable the Controller designer for .NET Core/.NET 6+ projects completely for now + write documentation explaining these limitations + offer additional means for code generation such as code snippets. This is all not ideal experience (our .NET users do not want to write code here) and we hope that Component Designer will eventually be supported. Thank you.

### Steps to reproduce

All info in the description.

### Diagnostics

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.