Foundation.ConnectAttribute Class
Exposes a property as an Interface Builder Outlet.

See Also: ConnectAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Property)]
public sealed class ConnectAttribute : Attribute

Remarks

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 Xamarin Studio to any outlets in use that have been exposed in a class.

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

C# Example

[Connect]
public UIImageView imageView {
    get {
        return (UIImageView) GetNativeField ("imageView");
    }
    set {
	SetNativeField ("imageView", value);
    }
}

  

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0