Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Condition.Property Property

Gets or sets the property of the condition. This is only applicable to MultiTrigger objects.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public DependencyProperty Property { get; set; }
/** @property */
public DependencyProperty get_Property ()

/** @property */
public void set_Property (DependencyProperty value)

public function get Property () : DependencyProperty

public function set Property (value : DependencyProperty)

<object Property="DependencyProperty" .../>

Property Value

A DependencyProperty that specifies the property of the condition. The default value is null.

MultiTriggers allow you to set property values based on a set of conditions. A condition is satisfied when the value of the property (specified by the Property property) of the element matches the specified Value (reference equality check). If all specified conditions are satisfied, then the trigger is applied.

If TargetType is not set on the style of the template that contains the triggers. Then you need to qualify the property name using the ClassName.PropertyName syntax.

Note that if it is a condition for a MultiTrigger, the Property and Value properties must be set. Setting the Binding value would cause an exception in that case.

For Conditions in MultiDataTriggers, the Binding property should be used instead of this property.

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.

<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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft