Export (0) Print
Expand All

ValueSource.IsExpression Property

Gets a value that declares whether this value resulted from an evaluated expression. This might be a BindingExpression supporting a binding, or an internal expression such as those that support the DynamicResource Markup Extension.

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

public bool IsExpression { get; }

Property Value

Type: System.Boolean
true if the value came from an evaluated expression; otherwise, false.

An evaluated expression will also report the specific base value setting condition where the expression was applied, as a value in BaseValueSource. The BaseValueSource is still very relevant for any property where IsExpression is true. Knowing whether a value came through an expression can be particularly useful if the value was set indirectly, such as through a template or an inherited property value.

If an expression fails to evaluate (the binding failed; no resource of that name was found), then the value will come from some other participant in the property system, most likely the default value. That source is then reported in BaseValueSource. Failed expression evaluations will return false for IsExpression.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2014 Microsoft