Xamarin.Forms Guides | Samples

Xamarin.Forms.ConstraintExpression Class

Defines a constraint relationship.

See Also: ConstraintExpression

Syntax

public class ConstraintExpression : Xamarin.Forms.Xaml.IMarkupExtension<Constraint>

Remarks

XAML for Xamarin.Forms supports the following properties for the ConstraintExpression class:

PropertyValue
Constant

An optionally signed integer literal.

ElementName

The name of a source element against which to calculate the constraint.

Factor

A decimal literal in the range (0,1].

Property

The name of the property on the source element to use in the constraint calculation.

Type

Constant, RelativeToParent, or RelativeToView.

Requirements

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

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

See Also: Object

Public Constructors

Creates a new ConstraintExpression with default values.

Public Properties

ConstantDouble. Gets or sets the constant constraint value..
ElementNameString. Gets or sets the name of a source element against which to calculate the constraint.
FactorDouble. Gets or sets the factor by which to scale a constrained dimension, relative to the source element.
PropertyString. Gets or sets name of the property on the source element to use in the constraint calculation.
TypeConstraintType. Gets or sets the constraint type.

Public Methods

ProvideValue(IServiceProvider) : Object
Returns a Constraint for this ConstraintExpression.
ProvideValue(IServiceProvider) : Constraint
When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.

Explicitly Implemented Interface Members