سؤال

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

enter image description here

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.

enter image description here

In that window, there is no choice available in the Bindings list (beside Add). I Expected to find my BindingSource in that list.

enter image description here

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:

BindingSource

Your BindingSource control will now be available in the designer:

enter image description here

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top