Mac Guides | Samples

MonoMac.Foundation.ActionAttribute Class

Flags a method to respond to an Objective-C action

See Also: ActionAttribute


public sealed class ActionAttribute : ExportAttribute


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


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

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.