dotnet / dotnet/winforms

Multi Select Enum Editor (UITypeEditor) Not Working Properly in .NET Core

Open
#14,093 8 comments 0 reactions 0 assignees View on GitHub
area-VSDesigner untriaged
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### Environment

Visual Studio 2026 - version 18.0.2

### .NET version

.NET 80, .NET90 and .NET10

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

No

### Issue description

#### Case 1: Comparsion of Net Framework and UITypeEditor Usage Without Client/Server Implementation
In .NET Framework, the custom EnumEditor (derived from UITypeEditor) works as expected. It displays a dropdown editor with checkboxes and a reset button.
In .NET Core, the same editor does not render correctly — the checkboxes and button are missing from the dropdown.

#### Case 2: UITypeEditor Usage With Client/Server Approach Fails
We attempted to use the EnumEditor on the client side in a .NET Core client/server approach.
The editor still fails to render properly and throws an ArgumentException.
Upon further analysis, we found that the value parameter in the EditValue method does not contain the expected enum value.
Instead, it shows the: "Cannot evaluate expression since the function evaluation requires all threads to run."

**Additionally, based on this query - https://github.com/dotnet/winforms/issues/13987**

We reviewed the internal issue link you provided, but unfortunately, it's not accessible to us and returns a 404 error. Regarding the blog post you shared (https://devblogs.microsoft.com/dotnet/custom-controls-for-winforms-out-of-process-designer/), we had already received it as a recommendation earlier and have implemented the client-server approach based on the guidance provided there.

However, even after implementing the client-server model, we are still facing issues with enum types not being handled correctly. Could you please provide further guidance or a more specific solution to address this issue?

**.NET Core Demo Link**
[CustomControlLibrary.NetCore._WithSample.Nuget.zip](https://github.com/user-attachments/files/23840285/CustomControlLibrary.NetCore._WithSample.Nuget.zip)

**.NET Framework Demo Link**

[CustomControlLibrary.NetFramework._WithSample.Nuget.zip](https://github.com/user-attachments/files/23840289/CustomControlLibrary.NetFramework._WithSample.Nuget.zip)

#### Issue Replication Video
**.NET Framework**

https://github.com/user-attachments/assets/6eaff698-e1e1-4c1f-b496-b01f463d0064

**.NET Core**

https://github.com/user-attachments/assets/17d7ed0c-68c8-4d27-82a8-124e9695815c

### Steps to reproduce

1. Open the Designer.
2. Click the CustomControl and go to the property window.
3. Now, open the dropdown of the "CustomProperty" property.

**Note**: An exception occurs when we click the dropdown again or click on the property window after opening the dropdown.

**Observed Behavior** - The UITypeEditor implemented in the client project does not work.
**Expected Behavior** - The UITypeEditor implemented in the client project should work properly.

### Diagnostics

```text

```

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.