Skip to main content

Gets a collection of TriggerBase objects that apply property values based on specified conditions.

Namespace:   System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public TriggerCollection Triggers { get; }
property TriggerCollection^ Triggers {
	TriggerCollection^ get();
member Triggers : TriggerCollection with get
Public ReadOnly Property Triggers As TriggerCollection

Property Value


A collection of TriggerBase objects. The default is an empty collection.


The WPF styling and templating model enables you to specify triggers within your Style. Essentially, triggers are objects that enable you to apply changes when certain conditions (such as when a certain property value becomes true, or when an event occurs) are satisfied.

XAML Property Element Usage
XAML Values

Zero or more object elements that are classes deriving from TriggerBase.


The following example shows a named Style available to Button controls. The Style defines a Trigger element that changes the property of a button when the property is true.

<Style x:Key="Triggers" TargetType="Button">
    <Trigger Property="IsPressed" Value="true">
        <Setter Property = "Foreground" Value="Green"/>
Version Information
.NET Framework
Available since 3.0
Return to top