This documentation is archived and is not being maintained.

MultiTrigger.Setters Property

Gets a collection of Setter objects, which describe the property values to apply when all of the conditions of the MultiTrigger are met.

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

public SetterBaseCollection Setters { get; }
/** @property */
public SetterBaseCollection get_Setters ()

public function get Setters () : SetterBaseCollection

 ZeroOrMoreSetters  Zero or more Setter objects. EventSetter objects are not supported. 

Property Value

The default value is null.

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. As mentioned above, adding a Setter child to a MultiTrigger object implicitly adds it to the SetterBaseCollection for the MultiTrigger object. Therefore, in the following example, <MultiTrigger.Setters> is implicit.

  <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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0