All c# extension methods for control
-
SafeInvoke
Properly invokes an action if it is required. Best way to handle events and threaded operations on a form.C# System.Control David Harris -
FindControl<T>
Generic recursive FindControl.C# System.Web.UI.Control John Adams -
Strongly Typed Databinding
This is an extension that I use for doing strongly typed databinding to controls in a winforms project. I dislike using strings to databind because they do not generate compiler errors when the bound object changes. This extension allows you to, instead of using a string, use an expression to bind to for both the control property and the object property.C# System.Windows.Forms.Control http://stackoverflow.com/questions/3444294/strong-typed-windows-forms-databinding -
GetChildren
This is a recursive function to get all child controls under the target control.C# System.Control Ryan Helms -
FindParent
A simple type safe method to find a parent controlC# System.Web.UI.Control Rob White -
FindControlR
Recursive find control method used for finding controls within templates.C# System.Web.UI.Control Brendan Enrick -
Resize To Text Width
Resizes width of a Windows control to the text that contains.C# System.Windows.Forms.Control Gabriel Espinoza -
FindControlByType
Used in conjunction with GetChildren(), it will return a T from a list of children of a control. If you are looking to return a list of T, use FindControlsByType() at http://www.extensionmethod.net/Details.aspx?ID=310 Get Children is located at: http://www.extensionmethod.net/Details.aspx?ID=309C# System.Control Ryan Helms -
FindControlsByType
Used in conjunction with GetChildren(), it will return a list of T from a list of children of a control. Get Children is located at: http://www.extensionmethod.net/Details.aspx?ID=309C# System.Control Ryan Helms -
FindImmediateParentOfType<T>
An extension method to find the parent control of a specific type in asp.netC# System.Web.UI.Control Haris Munawar