Returns the reference to an IApplication object.

Namespace:  ESRI.ArcGIS.Desktop.AddIns

Assembly:  ESRI.ArcGIS.Desktop.Addins (in ESRI.ArcGIS.Desktop.Addins.dll) Version: 10.0.0.0 (10.0.0.0)

Syntax

C#
protected Object Hook { get; }
Visual Basic (Declaration)
Protected ReadOnly Property Hook As Object
Visual C++
protected:
property Object^ Hook {
	Object^ get ();
}

Field Value

The hook.

Remarks

Use this property to get a hook to the application when necessary. However, the easiest way to get a reference to the application is through the application class which is automatically generated inside the Config.Designer.cs file by the add-in templates. These application classes expose several static members for accessing commonly used types. For example, inside of an ArcMap add-in, instead of casting a Hook parameter to IApplication, simply call ArcMap.Application, and calling ArcMap.Document gets a reference to IMxDocument.

See Also