Mac Guides | Samples

MonoMac.Foundation.ActionAttribute Class

Flags a method to respond to an Objective-C action

See Also: ActionAttribute

Syntax

[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class ActionAttribute : ExportAttribute

Remarks

You can apply this attribute to a method, turning it into an action that can be invoked by the Objective-C world.

C# Example

	    [Action ("clicked:")]
	    void Submit (NSObject sender)
	    {
		    // User has clicked on the Submit button, respond to this action
	    }

Requirements

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

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

See Also: ExportAttribute

Public Constructors

Initializes a new instance of an Action attribute
Creates a new instance of the action attribtue with the given selector.