Share via


Binding Class

Definition

A binding that connects a property on a source object to a property on a target object.

public ref class Binding sealed : Microsoft::Maui::Controls::BindingBase
public sealed class Binding : Microsoft.Maui.Controls.BindingBase
type Binding = class
    inherit BindingBase
Public NotInheritable Class Binding
Inherits BindingBase
Inheritance

Remarks

This class is immutable.

Constructors

Name Description
Binding()

Initializes a new instance of the Binding class.

Binding(String, BindingMode, IValueConverter, Object, String, Object)

Initializes a new instance of the Binding class with the specified path, mode, converter, and source.

Fields

Name Description
DoNothing

A value returned from a converter to indicate that the binding should not update the target property.

SelfPath

Properties

Name Description
Converter

Gets or sets the converter used to convert values between the source and target.

ConverterParameter

Gets or sets the parameter passed to the converter.

FallbackValue

Gets or sets the value used when the binding cannot produce a source value (e.g. path not found, conversion failure).

(Inherited from BindingBase)
Mode

Gets or sets the mode for this binding.

(Inherited from BindingBase)
Path

Gets or sets the property path to bind to on the source object.

Source

Gets or sets the source object for this binding.

StringFormat

Gets or sets the string format applied to the bound value.

(Inherited from BindingBase)
TargetNullValue

Gets or sets the value to use when the binding successfully resolves the source path and the resulting source value is null.

(Inherited from BindingBase)
UpdateSourceEventName

Gets or sets the name of the event that triggers the source update in OneWayToSource bindings.

Methods

Name Description
ThrowIfApplied()

Throws InvalidOperationException if the binding has already been applied.

(Inherited from BindingBase)

Applies to