Export (0) Print
Expand All

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:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

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

public function get Setters () : SetterBaseCollection

<object>
  <object.Setters>
    ZeroOrMoreSetters
  </object.Setters>
</object>
 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.

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

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

  <MultiTrigger>
    <MultiTrigger.Conditions>
      <Condition Property="HasItems" Value="false" />
      <Condition Property="Height" Value="Auto" />
    </MultiTrigger.Conditions>
    <Setter Property="MinHeight" Value="95"/>
  </MultiTrigger>
</Style.Triggers>

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

Community Additions

ADD
Show:
© 2014 Microsoft