dotnet / dotnet/winforms

Bindingsource not assigned

Open
#8,908 4 comments 0 reactions 1 assignee Claimed by @KlausLoeffelmann View on GitHub
area-Binding area-VSDesigner
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### Environment

Visual Studio 2022 - 17.5.3

### .NET version

7.0

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

Yes

### Issue description

Assigning a class as data source to a binding source doesn't seems to work within the designer. The data source class can be selected but isn't assigned as data source.

see attached sample project and screenshots
![screen1](https://user-images.githubusercontent.com/17042351/228161370-51a561bb-d807-4708-a5e2-045f0ef36c91.png)
![screen2](https://user-images.githubusercontent.com/17042351/228161395-e83c11df-0e27-4de2-aae8-230c7849f1fc.png)
[WinFormsAppTestBindingSource.zip](https://github.com/dotnet/winforms/files/11086587/WinFormsAppTestBindingSource.zip)

### Steps to reproduce

- Create a new winform
- drop / drop a bindingsource to the form
- create a simple class with one property / member
- open datasource of the bindingsource property and assign the class with "Add new object data source"
- select the simple class and press ok

- expected: the class is assigned as data source
- current behaviour: the class isn't assigned

### 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.