MultiTrigger::Conditions Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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)

property ConditionCollection^ Conditions {
	ConditionCollection^ get();

Property Value

Type: System.Windows::ConditionCollection^

The default is an empty collection.



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.

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"/>

.NET Framework
Available since 3.0
Return to top