TriggerModel Class |
Namespace: Livit.Learn.Model.Triggers
[SerializableAttribute] public class TriggerModel : ConditionsDependantModel
The TriggerModel type exposes the following members.
Name | Description | |
---|---|---|
![]() | TriggerModel | Initializes a new instance of the TriggerModel class |
Name | Description | |
---|---|---|
![]() | Actions |
Lists the Actions to be performed if
the Conditions of this Trigger are met or blank.
|
![]() | Attached |
Defines an attached property.
(Inherited from BaseModel.) |
![]() | Comments |
(Development) Includes comments in the XML code.
(Inherited from BaseModel.) |
![]() | Conditions | (Inherited from ConditionsDependantModel.) |
![]() | ConditionTimeout | (Inherited from ConditionsDependantModel.) |
![]() ![]() | DataContext |
Contains a source of all bindings defined for element.
(Inherited from BaseModel.) |
![]() | ExternalXmlPath | (Inherited from BaseModel.) |
![]() | FailActions |
Lists the Actions to be performed if
the Conditions of this Trigger are not met.
|
![]() | Id |
Defines a unique identifier for an element in the simulation.
(Inherited from BaseModel.) |
![]() | IsIdAutogenerated | (Inherited from BaseModel.) |
![]() | IsUsingDropTarget | |
![]() | TemplateVersionId |
Contains a id of source template.
(Inherited from BaseModel.) |
![]() | XmlComments |
(Development) Used as temporary storage for XML comments (like ) to keep them.
(Inherited from BaseModel.) |
Name | Description | |
---|---|---|
![]() | DeepCopy |
Creates an in-memory clone of this object using a BinaryFormatter to ensure all child properties are copied as well.
(Inherited from BaseModel.) |
![]() | ShallowCopy | (Inherited from BaseModel.) |
![]() | ToString |
Returns a string that represents the current object.
(Inherited from BaseModel.) |
![]() | UpdateModels |
This method will update this model and all its child models.
(Inherited from BaseModel.) |
The Trigger must include Actions to be performed when the Trigger is set off.
The Trigger may also include Conditions to be met for the Actions to be performed. In this case, the Trigger can also include FailActions, to be performed if the Conditions are not met.
An element can contain multiple Triggers.
This Trigger will be set off on the Switch element upon receiving a Click event.
If the Switch has the On State, it will perform the Actions, changing the Switch State to Off.
If the Switch does not have the On State, it will perform the FailActions, changing the Switch State to On.
<Element Id="Switch" IsClickable="true"> <Triggers> <EventTrigger Event="Click"> <Conditions> <DataCondition Property="ActiveStates" Comparison="Contains" Value="On" /> </Conditions> <Actions> <GotoState StateId="Off" /> </Actions> <FailActions> <GotoState StateId="On" /> </FailActions> </EventTrigger> </Triggers> </Element>