Print Page | Close Window

Can you bind to a custom control in the same way that other controls bind?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=133
Printed Date: 07-Nov-2025 at 2:56pm


Topic: Can you bind to a custom control in the same way that other controls bind?
Posted By: Customer
Subject: Can you bind to a custom control in the same way that other controls bind?
Date Posted: 12-Jul-2007 at 10:33am
We have a lot of controls that wrap Infragistics controls. We do this so we can apply custom formatting in one place and it can apply it to every where else in the system. I noticed in the control binding manager it only allows for windows, devexpress and Infragistics controls. Can you bind to a custom control in the same way that other controls bind?



Replies:
Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 10:34am
To get a custom control to display in the ConfigureBindings menu, you need to write a custom binder.  I've attached an example solution that shows how to bind to a "BlueTextBox" control.  The BlueTextBox control is a TextBox control that has been wrapped in such a way that the back color of the TextBox is blue.
 
Here is the documennt:
 
http://www.ideablade.com/forum/uploads/20070713_123147_BlueTextBoxDoc.zip - uploads/20070713_123147_BlueTextBoxDoc.zip
 
Here is the solution:
 
http://www.ideablade.com/forum/uploads/20070713_123921_OriginalBlueTex.zip - uploads/20070713_123921_OriginalBlueTex.zip



Print Page | Close Window