Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Designer: Add a BindingSource control to a form that references a typeof() as the datasource.

$
0
0

I am creating an Add-in (Package) that I want to add a binding source to the currently active Win Forms Designer and set the DataSource property for that binding source to be typeof(<object>);

I have working code that creates a new BindingSource and adds it to the designHost.component, but where I'm having issues is, on setting the DataSource property so it looks like this (in the designer file):

bindingSource1.DataSource = typeof(MyObjectType);

The MyObjectType is a class within an assembly in the current solution.

So basically I need to know is:

1) How to get a list of available assemblies/classes in the solution

2) How to add the property so it's generated as typeof(xxx);

Any help is greatly appreciated!


Brien King


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>