Show / Hide Table of Contents

Class DefaultTriggerAttribute

Provides design tools information about what TriggerBase to instantiate for a given action or command.

Inheritance
System.Object
System.Attribute
DefaultTriggerAttribute
Inherited Members
System.Attribute.Equals(System.Object)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttribute(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Boolean)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type)
System.Attribute.GetCustomAttributes(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.GetHashCode()
System.Attribute.IsDefaultAttribute()
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type)
System.Attribute.IsDefined(System.Reflection.Assembly, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.MemberInfo, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.Module, System.Type)
System.Attribute.IsDefined(System.Reflection.Module, System.Type, System.Boolean)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type)
System.Attribute.IsDefined(System.Reflection.ParameterInfo, System.Type, System.Boolean)
System.Attribute.Match(System.Object)
System.Attribute.TypeId
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Interactivity
Assembly: OpenSilver.Interactivity.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)]
public sealed class DefaultTriggerAttribute : Attribute

Constructors

| Improve this Doc View Source

DefaultTriggerAttribute(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

is not derived from TriggerBase.

| Improve this Doc View Source

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

is not derived from TriggerBase.

Properties

| Improve this Doc View Source

Parameters

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Instantiate()

Instantiates this instance.

Declaration
public TriggerBase Instantiate()
Returns
Type Description
TriggerBase

The TriggerBase specified by the DefaultTriggerAttribute.

  • Improve this Doc
  • View Source