Raises a UserEvent specified by name.

The UserEvent must exist higher up in the tree than this action.

Note: See this article for a more complete explanation of user events.

Examples

The following example shows a button which raises a UserEvent when clicked.

<UserEvent ux:Name="myEvent" />
<Button>
    <Clicked>
        <RaiseUserEvent EventName="myEvent" />
    </Clicked>
</Button>

You can also pass arguments using UserEventArg. When using a JavaScript function to handle the event, the arguments will be passed to that function.

<UserEvent ux:Name="myEvent" />
<Button>
    <Clicked>
        <RaiseUserEvent EventName="myEvent">
            <UserEventArg Name="name" StringValue="james" />
            <UserEventArg Name="isAdmin" BoolValue="false" />
        </RaiseUserEvent>
    </Clicked>
</Button>

Location

Namespace
Fuse.Triggers.Actions
Package
Fuse.UserEvents 2.9.1
Show Uno properties and methods

Interface of RaiseUserEvent

Inherited from TriggerAction

AtProgress : float ux

A value between 0 and 1 for when the action should be performed. Alternative to Delay.

Delay : float ux

The number of seconds after the start of the trigger that the action should be performed.

TargetNode : Node ux

The node that the action targets. If not specified then the enclsoing Trigger will be used. Several triggers can look for a target starting from this point. Some triggers require a Target to be specified.

Unroot uno

Called when the owner of this object is unrooted. This gives an action to cleanup resources or cancel pending actions.

Inherited from PropertyObject

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Implemented Interfaces