CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Axml.Binding.Binding Class Reference

Contains an individual binding to tie a property on an Axml view to the property on a supplied object. More...

Inheritance diagram for Csla.Axml.Binding.Binding:

Public Member Functions

 Binding (View target, string targetProperty, object source, string sourceProperty)
 Creates a new instance of the Binding class. More...
 
 Binding (View target, string targetProperty, object source, string sourceProperty, Func< object, object > convert)
 Creates a new instance of the Binding class. More...
 
 Binding (View target, string targetProperty, object source, string sourceProperty, Func< object, object > convert, Func< object, object > convertBack)
 Creates a new instance of the Binding class. More...
 
void UpdateSource ()
 Updates the source with the current value in the target object. More...
 
void UpdateTarget ()
 Updates the target with the current value in the source object. More...
 
void Dispose ()
 Clears the bindings, references and event handlers. More...
 

Properties

View Target [get]
 The Axml view that is used by the binding. More...
 
object Source [get]
 The object that the view is bound to. More...
 
System.Reflection.PropertyInfo TargetProperty [get]
 The PropertyInfo for the property on the target view that is being bound to. More...
 
System.Reflection.PropertyInfo SourceProperty [get]
 The PropertyInfo for the property on the source object that is being bound to. More...
 
Func< object, object > Convert [get]
 A reference to a function to do a custom conversion from the source property to the target property. More...
 
Func< object, object > ConvertBack [get]
 A reference to a function to do a custom conversion from the target property to the source property. More...
 

Detailed Description

Contains an individual binding to tie a property on an Axml view to the property on a supplied object.

Definition at line 18 of file Csla.Axml.Android/Binding/Binding.cs.

Constructor & Destructor Documentation

◆ Binding() [1/3]

Csla.Axml.Binding.Binding.Binding ( View  target,
string  targetProperty,
object  source,
string  sourceProperty 
)

Creates a new instance of the Binding class.

Parameters
targetA reference to the control to bind to.
targetPropertyThe name of the property on the view to bind to.
sourceA reference to the object that will be bound to the control.
sourcePropertyThe name of the property on the object that will be bound to the target property.

Definition at line 57 of file Csla.Axml.Android/Binding/Binding.cs.

◆ Binding() [2/3]

Csla.Axml.Binding.Binding.Binding ( View  target,
string  targetProperty,
object  source,
string  sourceProperty,
Func< object, object >  convert 
)

Creates a new instance of the Binding class.

Parameters
targetA reference to the control to bind to.
targetPropertyThe name of the property on the view to bind to.
sourceA reference to the object that will be bound to the control.
sourcePropertyThe name of the property on the object that will be bound to the target property.
convertA reference to a function to do a custom conversion from the source property to the target property.

Definition at line 69 of file Csla.Axml.Android/Binding/Binding.cs.

◆ Binding() [3/3]

Csla.Axml.Binding.Binding.Binding ( View  target,
string  targetProperty,
object  source,
string  sourceProperty,
Func< object, object >  convert,
Func< object, object >  convertBack 
)

Creates a new instance of the Binding class.

Parameters
targetA reference to the control to bind to.
targetPropertyThe name of the property on the view to bind to.
sourceA reference to the object that will be bound to the control.
sourcePropertyThe name of the property on the object that will be bound to the target property.
convertA reference to a function to do a custom conversion from the source property to the target property.
convertBackA reference to a function to do a custom conversion from the target property to the source property.

Definition at line 82 of file Csla.Axml.Android/Binding/Binding.cs.

Member Function Documentation

◆ Dispose()

void Csla.Axml.Binding.Binding.Dispose ( )

Clears the bindings, references and event handlers.

Definition at line 154 of file Csla.Axml.Android/Binding/Binding.cs.

◆ UpdateSource()

void Csla.Axml.Binding.Binding.UpdateSource ( )

Updates the source with the current value in the target object.

Uses the ConvertBack function to convert the data if available.

Definition at line 124 of file Csla.Axml.Android/Binding/Binding.cs.

◆ UpdateTarget()

void Csla.Axml.Binding.Binding.UpdateTarget ( )

Updates the target with the current value in the source object.

Uses the Convert function to convert the data if available.

Definition at line 139 of file Csla.Axml.Android/Binding/Binding.cs.

Property Documentation

◆ Convert

Func<object, object> Csla.Axml.Binding.Binding.Convert
get

A reference to a function to do a custom conversion from the source property to the target property.

Definition at line 43 of file Csla.Axml.Android/Binding/Binding.cs.

◆ ConvertBack

Func<object, object> Csla.Axml.Binding.Binding.ConvertBack
get

A reference to a function to do a custom conversion from the target property to the source property.

Definition at line 48 of file Csla.Axml.Android/Binding/Binding.cs.

◆ Source

object Csla.Axml.Binding.Binding.Source
get

The object that the view is bound to.

Definition at line 28 of file Csla.Axml.Android/Binding/Binding.cs.

◆ SourceProperty

System.Reflection.PropertyInfo Csla.Axml.Binding.Binding.SourceProperty
get

The PropertyInfo for the property on the source object that is being bound to.

Definition at line 38 of file Csla.Axml.Android/Binding/Binding.cs.

◆ Target

View Csla.Axml.Binding.Binding.Target
get

The Axml view that is used by the binding.

Definition at line 23 of file Csla.Axml.Android/Binding/Binding.cs.

◆ TargetProperty

System.Reflection.PropertyInfo Csla.Axml.Binding.Binding.TargetProperty
get

The PropertyInfo for the property on the target view that is being bound to.

Definition at line 33 of file Csla.Axml.Android/Binding/Binding.cs.