469,586 Members | 2,220 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,586 developers. It's quick & easy.

Question: How to show a property of a component for data binding at design time

What interface do I need to implement in order to get a component with a
public property to show up in the data binding drop down boxes at design
time in VS.net?

I've tried to look just about every where I can think and I can not find the
solution. The closest I can come is to implement IBindingList or
IListSource to expose a list for the DataSource property on controls. This
works great for controls like a list box but doesn't work for single value
type controls like text box or up down controls.

How would you get a component's property to bind to the "Text" property of a
text box at design time? I know I could manually type in the code to create
a new Binding object and add it to the control's collection but I would like
to select the property using the design time features.

Here is a little code to illustrate what I would like to do.

public class MyComponent : Component
{ //....lots of code not shown
public int MyProperty
{//...more code not shown

How would you at design time get MyComponent.MyProperty to show up in the
drop down box in the property grid for a text box?

Thank you,
(To email me take out the dots in the address)
Nov 15 '05 #1
0 1520

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Shawn Meyer | last post: by
6 posts views Thread by Mike | last post: by
7 posts views Thread by News | last post: by
3 posts views Thread by deko | last post: by
9 posts views Thread by =?Utf-8?B?VGVycnk=?= | last post: by
14 posts views Thread by Siv | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.