Class DefaultTriggerAttribute
Provides design tools information about what TriggerBase to instantiate for a given action or command.
Inheritance
Inherited Members
Namespace: System.Windows.Interactivity
Assembly: OpenSilver.Interactivity.dll
Syntax
[CLSCompliant(false)]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)]
public sealed class DefaultTriggerAttribute : Attribute
Constructors
| Improve this Doc View SourceDefaultTriggerAttribute(Type, Type, Object)
Initializes a new instance of the DefaultTriggerAttribute class.
Declaration
public DefaultTriggerAttribute(Type targetType, Type triggerType, object parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The type this attribute applies to. |
System.Type | triggerType | The type of TriggerBase to instantiate. |
System.Object | parameter | A single argument for the specified TriggerBase. |
Remarks
This constructor is useful if the specifed TriggerBase has a single argument. The resulting code will be CLS compliant.
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
DefaultTriggerAttribute(Type, Type, Object[])
Initializes a new instance of the DefaultTriggerAttribute class.
Declaration
public DefaultTriggerAttribute(Type targetType, Type triggerType, params object[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The type this attribute applies to. |
System.Type | triggerType | The type of TriggerBase to instantiate. |
System.Object[] | parameters | The constructor arguments for the specified TriggerBase. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
Properties
| Improve this Doc View SourceParameters
Gets the parameters to pass to the TriggerBase constructor.
Declaration
public IEnumerable Parameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerable | The parameters to pass to the TriggerBase constructor. |
TargetType
Gets the type that this DefaultTriggerAttribute applies to.
Declaration
public Type TargetType { get; }
Property Value
Type | Description |
---|---|
System.Type | The type this DefaultTriggerAttribute applies to. |
TriggerType
Gets the type of the TriggerBase to instantiate.
Declaration
public Type TriggerType { get; }
Property Value
Type | Description |
---|---|
System.Type | The type of the TriggerBase to instantiate. |
Methods
| Improve this Doc View SourceInstantiate()
Instantiates this instance.
Declaration
public TriggerBase Instantiate()
Returns
Type | Description |
---|---|
TriggerBase | The TriggerBase specified by the DefaultTriggerAttribute. |