Skip to main content

Class IBindableExtensions

Namespace: Aspid.FastTools.UIElements.Editors
Assembly: Aspid.FastTools.Editor.dll

Provides extension methods for binding IBindable elements.

public static class IBindableExtensions

Inheritance​

object ← IBindableExtensions

Methods​

BindPropertyTo<T>(T, SerializedProperty)​

Binds the element to property.

public static T BindPropertyTo<T>(this T element, SerializedProperty property) where T : VisualElement, IBindable

Parameters​

element T

The element to bind.

property SerializedProperty

The property to bind to.

Returns​

T

element for chaining.

Type Parameters​

T

A VisualElement element to configure.

BindTo<T>(T, SerializedObject, string)​

Sets the binding path and binds the element to serializedObject.

public static T BindTo<T>(this T element, SerializedObject serializedObject, string propertyPath) where T : VisualElement, IBindable

Parameters​

element T

The element to bind.

serializedObject SerializedObject

The serialized object to bind to.

propertyPath string

The property path to bind to.

Returns​

T

element for chaining.

Type Parameters​

T

A VisualElement element to configure.

SetBindingPath<T>(T, string)​

Sets the element's binding path.

public static T SetBindingPath<T>(this T element, string value) where T : VisualElement, IBindable

Parameters​

element T

The element to modify.

value string

The binding path to set.

Returns​

T

element for chaining.

Type Parameters​

T

A VisualElement element to configure.