ComboBox Binding Sequence Affecting Binding Ability of Other Controls
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 103
Description
### .NET version
7.0.302
### Did it work in .NET Framework?
No
### Did it work in any of the earlier releases of .NET Core or .NET 5+?
_No response_
### Issue description
The binding ability of the CheckBox control is affected by the sequence of ComboBox binding. If the ComboBox is binded first, the subsequent binding will not work.
https://github.com/dotnet/winforms/assets/97237245/d355b199-8fb3-4df2-8ee4-11b9f99c06cf
### Steps to reproduce
1. Open the sln file and run the WinformApp. [Binding Sequence Issue.zip](https://github.com/dotnet/winforms/files/11716905/Binding.Sequence.Issue.zip)
2. Click on Button, go to tabPage2.
3. Toggle the Checkbox and to change the visibility of the Label in the GroupBox. Note that the checkbox is working as intended.
4. Open the UserControl2.cs file.
5. Go to Line 35 and move the BindComboBox line above of the two other bindings.
6. Run the program again by repeating step 1-3.
7. Note that the toggling of CheckBox is no longer working, where the Label is invisible regardlessly.
Note that when the GroupBox (containing the Label) and CheckBox is in tabPage1 instead of tabPage2 , the ComboBox binding sequence won’t affect the functionality of the CheckBox
1. Go to Line 79 & 80 in UserControl2.Designer.cs.
2. Replace the tabPage2 of groupBox and checkBox with tabPage1.
3. Launch the program and the checkbox is working fine.
Contributor guide
Assessment
This issue has not been assessed yet.