Windows Develop Bookmark and Share   
 index > Windows Forms Designer > How can I implement the property DataBindings in a Smart Tag of a control
 

How can I implement the property DataBindings in a Smart Tag of a control

Hi,

I have my custom smart tag for a control and I can edit the properites (e.g. Text, Color, etc.). But I am having trouble to put the DataBindings Collection into the smart tag.
If I do so a combo box appears in the smart tag, but I do not get the assistance as when I click on databings in the property grid.

may be some on can tell me what I have to do.....

regards
Stefan
  • Edited byStefan K. Friday, July 10, 2009 12:15 PM
  •  
Stefan K.  Friday, July 10, 2009 12:08 PM
Hi Stefan,

The type converter of the DataBindings property of a Control is derived from the ExpandableConverter. If the control is set to the selected object in a PropertyGrid, the property that has an ExpandableConverter will show a plus on the left hand that can be expanded.

Apparently, an expandable property item dosn't fit in the smart tag panel. This is the reason of your problem.

A solution is to implement a cutsom UITypeEditor for the DataBindings property to show a dialog to bind properties to data source.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Wednesday, July 15, 2009 10:09 AM
Hi Stefan,

The type converter of the DataBindings property of a Control is derived from the ExpandableConverter. If the control is set to the selected object in a PropertyGrid, the property that has an ExpandableConverter will show a plus on the left hand that can be expanded.

Apparently, an expandable property item dosn't fit in the smart tag panel. This is the reason of your problem.

A solution is to implement a cutsom UITypeEditor for the DataBindings property to show a dialog to bind properties to data source.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Wednesday, July 15, 2009 10:09 AM

You can use google to search for other answers

Custom Search

More Threads

• Docking Window Management Control
• Treenode Editor Question
• Runtime-only properties?
• Incorrect Serialization of Collection property in IExtenderProvider
• I want to make a composite control using custom control.
• How to attach a manifest to a dll file?.
• Hosting a designsurface within a designer
• Submitting to database
• Toolbar color changes according to appearance property?
• Overriding DataGridTextBoxColumn