Skip to main content

ReflectionBinding Class

Definition

Namespace:Avalonia.Data
Assembly:Avalonia.Base
Package:Avalonia

A binding that uses reflection to access members.

public class ReflectionBinding

Inheritance: object -> BindingBase -> ReflectionBinding

Constructors

NameDescription
ReflectionBinding (2 overloads)Initializes a new instance of the Avalonia.Data.ReflectionBinding class.

ReflectionBinding overloads

ReflectionBinding Constructor

Initializes a new instance of the Avalonia.Data.ReflectionBinding class.

public ReflectionBinding()

ReflectionBinding Constructor

Initializes a new instance of the Avalonia.Data.ReflectionBinding class.

public ReflectionBinding(string path)
Parameters

path string

The binding path.

Properties

NameDescription
ConverterGets or sets the Avalonia.Data.Converters.IValueConverter to use.
ConverterCultureGets or sets the culture in which to evaluate the converter.
ConverterParameterGets or sets a parameter to pass to Avalonia.Data.ReflectionBinding.Converter.
DelayGets or sets the amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.
ElementNameGets or sets the name of the element to use as the binding source.
FallbackValueGets or sets the value to use when the binding is unable to produce a value.
ModeGets or sets the binding mode.
PathGets or sets the binding path.
PriorityGets or sets the binding priority.
RelativeSourceGets or sets the relative source for the binding.
SourceGets or sets the source for the binding.
StringFormatGets or sets the string format.
TargetNullValueGets or sets the value to use when the binding result is null.
TypeResolverGets or sets a function used to resolve types from names in the binding path.
UpdateSourceTriggerGets or sets a value that determines the timing of binding source updates for Avalonia.Data.BindingMode.TwoWay and Avalonia.Data.BindingMode.OneWayToSource bindings.

Converter Property

Gets or sets the Avalonia.Data.Converters.IValueConverter to use.

public Avalonia.Data.Converters.IValueConverter Converter { get; set; }

ConverterCulture Property

Gets or sets the culture in which to evaluate the converter.

public System.Globalization.CultureInfo ConverterCulture { get; set; }

Value

The default value is null.

Remarks

If this property is not set then System.Globalization.CultureInfo.CurrentCulture will be used.

ConverterParameter Property

Gets or sets a parameter to pass to Avalonia.Data.ReflectionBinding.Converter.

public object ConverterParameter { get; set; }

Delay Property

Gets or sets the amount of time, in milliseconds, to wait before updating the binding source after the value on the target changes.

public int Delay { get; set; }

Remarks

There is no delay when the source is updated via Avalonia.Data.UpdateSourceTrigger.LostFocus or Avalonia.Data.BindingExpressionBase.UpdateSource. Nor is there a delay when Avalonia.Data.BindingMode.OneWayToSource is active and a new source object is provided.

ElementName Property

Gets or sets the name of the element to use as the binding source.

public string ElementName { get; set; }

FallbackValue Property

Gets or sets the value to use when the binding is unable to produce a value.

public object FallbackValue { get; set; }

Mode Property

Gets or sets the binding mode.

public Avalonia.Data.BindingMode Mode { get; set; }

Path Property

Gets or sets the binding path.

public string Path { get; set; }

Priority Property

Gets or sets the binding priority.

public Avalonia.Data.BindingPriority Priority { get; set; }

RelativeSource Property

Gets or sets the relative source for the binding.

public Avalonia.Data.RelativeSource RelativeSource { get; set; }

Source Property

Gets or sets the source for the binding.

public object Source { get; set; }

StringFormat Property

Gets or sets the string format.

public string StringFormat { get; set; }

TargetNullValue Property

Gets or sets the value to use when the binding result is null.

public object TargetNullValue { get; set; }

TypeResolver Property

Gets or sets a function used to resolve types from names in the binding path.

public Func<string, string, Type> TypeResolver { get; set; }

UpdateSourceTrigger Property

Gets or sets a value that determines the timing of binding source updates for Avalonia.Data.BindingMode.TwoWay and Avalonia.Data.BindingMode.OneWayToSource bindings.

public Avalonia.Data.UpdateSourceTrigger UpdateSourceTrigger { get; set; }