Share via


KeyTrigger Members

A Trigger that is triggered by a keyboard event. If the target Key and Modifiers are detected, it fires.

The following tables list the members exposed by the KeyTrigger type.

Public Constructors

  Name Description
KeyTrigger Initializes a new instance of the EventTriggerBase`1 class.

Top

Public Fields

  Name Description
public fieldstatic ActionsProperty  (Inherited from TriggerBase)
public fieldstatic ActiveOnFocusProperty  
public fieldstatic FiredOnProperty  
public fieldstatic KeyProperty  
public fieldstatic ModifiersProperty  
public fieldstatic SourceNameProperty  (Inherited from EventTriggerBase)
public fieldstatic SourceObjectProperty  (Inherited from EventTriggerBase)

Top

Public Properties

(see also Protected Properties)

  Name Description
public property Actions  Gets the actions associated with this trigger.  (Inherited from TriggerBase)
public property ActiveOnFocus If true, the Trigger only listens to its trigger Source object, which means that element must have focus for the trigger to fire. If false, the Trigger listens at the root, so any unhandled KeyDown/Up messages will be caught.
public property CanFreeze  (Inherited from Freezable)
public property DependencyObjectType  (Inherited from DependencyObject)
public property Dispatcher  (Inherited from DispatcherObject)
public property FiredOn Determines whether or not to listen to the KeyDown or KeyUp event.
public property HasAnimatedProperties  (Inherited from Animatable)
public property IsFrozen  (Inherited from Freezable)
public property IsSealed  (Inherited from DependencyObject)
public property Key The key that must be pressed for the trigger to fire.
public property Modifiers The modifiers that must be active for the trigger to fire (the default is no modifiers pressed).
public property Source  Gets the resolved source. If is not set or cannot be resolved, defaults to AssociatedObject.  (Inherited from EventTriggerBase)
public property SourceName  Gets or sets the name of the element this EventTriggerBase listens for as a source. If the name is not set or cannot be resolved, the AssociatedObject will be used. This is a dependency property.  (Inherited from EventTriggerBase)
public property SourceObject  Gets or sets the target object. If TargetObject is not set, the target will look for the object specified by TargetName. If an element referred to by TargetName cannot be found, the target will default to the AssociatedObject. This is a dependency property.  (Inherited from EventTriggerBase)

Top

Protected Properties

  Name Description
protected property AssociatedObject  Gets the object to which the trigger is attached.  (Inherited from TriggerBase)
protected property AssociatedObjectTypeConstraint  Gets the type constraint of the associated object.  (Inherited from EventTriggerBase)
protected property SourceTypeConstraint  Gets the source type constraint.  (Inherited from EventTriggerBase)

Top

Public Methods

(see also Protected Methods)

  Name Description
public method ApplyAnimationClock  Overloaded. (Inherited from Animatable)
public method Attach  (Inherited from TriggerBase)
public method BeginAnimation  Overloaded. (Inherited from Animatable)
public method CheckAccess  (Inherited from DispatcherObject)
public method ClearValue  Overloaded. (Inherited from DependencyObject)
public method Clone  (Inherited from Animatable)
public method CloneCurrentValue  (Inherited from Freezable)
public method CoerceValue  (Inherited from DependencyObject)
public method Detach  Detaches this instance from its associated object.  (Inherited from TriggerBase)
public method Equals  Overloaded. (Inherited from DependencyObject)
public method Freeze  Overloaded. (Inherited from Freezable)
public method GetAnimationBaseValue  (Inherited from Animatable)
public method GetAsFrozen  (Inherited from Freezable)
public method GetCurrentValueAsFrozen  (Inherited from Freezable)
public method GetHashCode  (Inherited from DependencyObject)
public method GetLocalValueEnumerator  (Inherited from DependencyObject)
public method GetType  (Inherited from Object)
public method GetValue  (Inherited from DependencyObject)
public method InvalidateProperty  (Inherited from DependencyObject)
public method ReadLocalValue  (Inherited from DependencyObject)
public methodstatic ReferenceEquals  (Inherited from Object)
public method SetCurrentValue  (Inherited from DependencyObject)
public method SetValue  Overloaded. (Inherited from DependencyObject)
public methodstatic ShouldSerializeStoredWeakReference  (Inherited from Animatable)
public method ToString  (Inherited from Object)
public method VerifyAccess  (Inherited from DispatcherObject)

Top

Protected Methods

  Name Description
protected method CloneCore  (Inherited from Freezable)
protected method CloneCurrentValueCore  (Inherited from Freezable)
protected method CreateInstance  (Inherited from Freezable)
protected method CreateInstanceCore  Creates a new instance of the TriggerBase derived class.  (Inherited from TriggerBase)
protected method Finalize  (Inherited from Object)
protected methodstatic Freeze  Overloaded. (Inherited from Freezable)
protected method FreezeCore  (Inherited from Animatable)
protected method GetAsFrozenCore  (Inherited from Freezable)
protected method GetCurrentValueAsFrozenCore  (Inherited from Freezable)
protected method GetEventName Overridden. Specifies the name of the Event this EventTriggerBase is listening for.
protected method InvokeActions  (Inherited from TriggerBase)
protected method MemberwiseClone  (Inherited from Object)
protected method OnAttached  Called after the trigger is attached to an AssociatedObject.  (Inherited from EventTriggerBase)
protected method OnChanged  (Inherited from Freezable)
protected method OnDetaching Overridden. Called when the trigger is being detached from its AssociatedObject, but before it has actually occurred.
protected method OnEvent Overridden.  
protected method OnFreezablePropertyChanged  Overloaded. (Inherited from Freezable)
protected method OnPropertyChanged  (Inherited from Freezable)
protected method OnSourceChanged  Called when the source property changes.  (Inherited from EventTriggerBase)
protected method ReadPreamble  (Inherited from Freezable)
protected method ShouldSerializeProperty  (Inherited from DependencyObject)
protected method WritePostscript  (Inherited from Freezable)
protected method WritePreamble  (Inherited from Freezable)

Top

Public Events

  Name Description
public event Changed  (Inherited from Freezable)
public event PreviewInvoke  Event handler for registering to PreviewInvoke.  (Inherited from TriggerBase)

Top

Explicit Interface Implementations

  Name Description
System.Windows.Interactivity.IAttachedObject.AssociatedObject  Gets the object to which the trigger is attached.  (Inherited from TriggerBase)

Top

See Also

Reference

KeyTrigger Class
Microsoft.Expression.Interactivity.Input Namespace