ConstraintExpression ConstraintExpression Class

Definition

Defines a constraint relationship.

public class ConstraintExpression : Xamarin.Forms.Xaml.IMarkupExtension<Xamarin.Forms.Constraint>
type ConstraintExpression = class
    interface IMarkupExtension<Constraint>
    interface IMarkupExtension
Inheritance
ConstraintExpressionConstraintExpression
Implements

Remarks

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

Property Value
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.

Constructors

ConstraintExpression() ConstraintExpression()

Creates a new ConstraintExpression with default values.

Properties

Constant Constant

Gets or sets the constant constraint value..

ElementName ElementName

Gets or sets the name of a source element against which to calculate the constraint.

Factor Factor

Gets or sets the factor by which to scale a constrained dimension, relative to the source element.

Property Property

Gets or sets name of the property on the source element to use in the constraint calculation.

Type Type

Gets or sets the constraint type.

Methods

ProvideValue(IServiceProvider) ProvideValue(IServiceProvider)

When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.

Explicit Interface Implementations

IMarkupExtension.ProvideValue(IServiceProvider) IMarkupExtension.ProvideValue(IServiceProvider)

For internal use only.

Extension Methods

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to