This documentation is archived and is not being maintained.

MultiTrigger.Conditions Property

Gets a collection of Condition objects. Changes to property values are applied when all of the conditions in the collection are met.

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

public ConditionCollection Conditions { get; }

XAML Values


Zero or more Condition objects.

MultiTrigger enables you to set property values or start actions based on a collection of Condition objects. A condition is met when the value of the property (specified by the Property property of the Condition class) of the element matches the specified Value. The comparison that is performed is a reference equality check. The MultiTrigger applies the associated setters or actions when all of the conditions are true (binary and operation).

Note that for MultiTriggers, each condition in the collection must set both the Property and Value properties. See the Condition page for more information.

Property Value

Type: System.Windows.ConditionCollection
The default is an empty collection.

The following example contains two MultiTriggers. The first sets the MinWidth property value when the HasItems property is false and the Width property is Auto. The second one is similar but is for the MinHeight property.

  <Trigger Property="IsEnabled" Value="false">
    <Setter Property="Background" Value="#EEEEEE" />

      <Condition Property="HasItems" Value="false" />
      <Condition Property="Width" Value="Auto" />
    <Setter Property="MinWidth" Value="120"/>

      <Condition Property="HasItems" Value="false" />
      <Condition Property="Height" Value="Auto" />
    <Setter Property="MinHeight" Value="95"/>

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0