Mac Guides | Samples

MonoMac.Foundation.ConnectAttribute Class

Exposes a property as an Interface Builder Outlet.

See Also: ConnectAttribute


public sealed class ConnectAttribute : Attribute


This property must be applied to properties that represent an Interface Builder Outlet on a XIB file to properly support loading XIB files. The name of the property must match the name of the outlet declared in Interface Builder.

This attribute and the property that it is applied to are automatically added by MonoDevelop to any outlets in use that have been exposed in a class.

When using this manually, you would use it like this:

C# Example

public UIImageView imageView {
    get {
        return (UIImageView) GetNativeField ("imageView");
    set {
	SetNativeField ("imageView", value);


Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions:

The members of MonoMac.Foundation.ConnectAttribute are listed below.

See Also: Attribute

Public Constructors

Default constructor, uses the name of the property as the name of the outlet.
Use this constructor to specify the name of the underlying outlet to map to, instead of defaulting to the name of the property.

Public Properties

NameString. The name of the outlet.