Xamarin.Forms Guides | Samples

Xamarin.Forms.BindingCondition Class

Class that represents a value comparison with the target of an arbitrary binding.

See Also: BindingCondition

Syntax

[Xamarin.Forms.Xaml.AcceptEmptyServiceProvider]
public sealed class BindingCondition : Condition, IValueProvider

See Also

Remarks

The BindingCondition class can compare a value a binding on any class within the current scope. Developers who want to compare to a value to a bound property on the control that contains the conditions surrounding MultiTrigger may want to use a PropertyCondition in addition to any binding conditions in the trigger list.

The XML example below creates a binding condition within a surrounding MultiTrigger (omitted) that succeeds when the referenced name has a Text.Length property length that is equal to 0. (name must refer to an element, such as a TextCell, that has a Text property that, in turn, has a Length property.)

XML Example

    <BindingCondition Binding="{Binding Source={x:Reference name},
                                    Path=Text.Length}"
                                    Value="0" />

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

The members of Xamarin.Forms.BindingCondition are listed below.

See Also: Condition

Public Constructors

Initializes a new BindingCondition instance.

Public Properties

BindingBindingBase. Gets or sets the binding against which the BindingCondition.Value property will be compared.
ValueObject. The binding value that satisfies the condition.

Explicitly Implemented Interface Members