You have to set the DataSource property on your BindingSource control, like so:
Your BindingSource control will now be available in the designer:
题
I am creating a UserControl in Winforms, using Visual Studio 2013 designer. It contains a TextBox. I added a BindingSource (which DataSource property is set in code to a List).
When I click on the TextBox, look in the property window (F4), expand the "(DataBindings)" node and click on the "(Advanced)" button the Binding window opens.
In that window, there is no choice available in the Bindings list (beside Add). I Expected to find my BindingSource in that list.
Is it possible to get my custom BindingSource (added with Drag&Drop in the designer) available in that Binding window?
解决方案
You have to set the DataSource property on your BindingSource control, like so:
Your BindingSource control will now be available in the designer: