ApplicationObject Property

Returns a reference to the custom control.


Visual Basic (Declaration) 
Overridable ReadOnly Property ApplicationObject As DependencyObject
virtual DependencyObject ApplicationObject {get;}


This property provides direct access to the control events, methods, and data.

Cast the returned control reference to the real control's type. For example:

oTxt = (TextBox)UtilityObject.ApplicationObject;

After obtaining the control reference, use the simple obj.Member syntax.

 oTxt = (TextBox)UtilityObject.ApplicationObject;
string txt = oTxt.Text;

See Also