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.BindingManager Class Reference

Provides the ability to bing properties on Axml controls to properties on CSLA objects. More...

Public Member Functions

 BindingManager (Activity activity)
 Creates a new instance of the binding manager. More...
 
void Add (int viewId, string targetProperty, object source, string sourceProperty)
 Adds a new binding to be managed. More...
 
void Add (View target, string targetProperty, object source, string sourceProperty)
 Adds a new binding to be managed. More...
 
void Add (Binding binding)
 Adds a new binding to be managed. More...
 
void Remove (View target, string targetProperty, object source, string sourceProperty)
 Removes the binding matching the supplied parameters from the binding manager. More...
 
void Remove (Binding binding)
 Removes the supplied binding from the binding manager. More...
 
void RemoveAll ()
 Removes all bindings from the binding manager. More...
 
IEnumerable< BindingGetBindingsForView (View view)
 Returns all bindings for the supplied view. More...
 
void UpdateSourceForView (View view)
 Updates bindings with the current values in the supplied view. More...
 
void UpdateSourceForLastView ()
 Updates bindings on the view that is in current focus on the activity supplied to the BindingManager. More...
 

Properties

List< BindingBindings [get]
 A list of bindings that have been added to the manager. More...
 

Detailed Description

Provides the ability to bing properties on Axml controls to properties on CSLA objects.

Bindinds update normally when the control looses focus.

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

Constructor & Destructor Documentation

◆ BindingManager()

Csla.Axml.Binding.BindingManager.BindingManager ( Activity  activity)

Creates a new instance of the binding manager.

Parameters
activityThe Android activity that is using the view with the controls to bind to.

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

Member Function Documentation

◆ Add() [1/3]

void Csla.Axml.Binding.BindingManager.Add ( Binding  binding)

Adds a new binding to be managed.

Parameters
bindingThe new binding to add.

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

◆ Add() [2/3]

void Csla.Axml.Binding.BindingManager.Add ( int  viewId,
string  targetProperty,
object  source,
string  sourceProperty 
)

Adds a new binding to be managed.

Parameters
viewIdThe id of 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 46 of file Csla.Axml.Android/Binding/BindingManager.cs.

◆ Add() [3/3]

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

Adds a new binding to be managed.

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 59 of file Csla.Axml.Android/Binding/BindingManager.cs.

◆ GetBindingsForView()

IEnumerable< Binding > Csla.Axml.Binding.BindingManager.GetBindingsForView ( View  view)

Returns all bindings for the supplied view.

Parameters
viewA reference to the view to return bindings for.
Returns
A enumerable containing the bindings for the supplied view.

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

◆ Remove() [1/2]

void Csla.Axml.Binding.BindingManager.Remove ( Binding  binding)

Removes the supplied binding from the binding manager.

Parameters
bindingThe binding to remove.

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

◆ Remove() [2/2]

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

Removes the binding matching the supplied parameters from the binding manager.

If no bindings matched the method does nothing.

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

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

◆ RemoveAll()

void Csla.Axml.Binding.BindingManager.RemoveAll ( )

Removes all bindings from the binding manager.

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

◆ UpdateSourceForLastView()

void Csla.Axml.Binding.BindingManager.UpdateSourceForLastView ( )

Updates bindings on the view that is in current focus on the activity supplied to the BindingManager.

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

◆ UpdateSourceForView()

void Csla.Axml.Binding.BindingManager.UpdateSourceForView ( View  view)

Updates bindings with the current values in the supplied view.

Parameters
viewThe view to update bindings for.

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

Property Documentation

◆ Bindings

List<Binding> Csla.Axml.Binding.BindingManager.Bindings
get

A list of bindings that have been added to the manager.

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