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

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

Public Member Functions

 BindingManager (UIView view)
 Creates a new instance of the binding manager. More...
 
void Add (UIView control, string targetProperty, object source, string sourceProperty, BindingDirection bindingDirection)
 Adds a new binding to be managed. More...
 
void Add (Binding binding)
 Adds a new binding to be managed. More...
 
void Remove (UIView 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 (UIView view)
 Returns all bindings for the supplied view. More...
 
void UpdateSourceForView (UIView control)
 Updates bindings with the current values in the supplied control. 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 iOS UI controls to properties on CSLA objects.

Bindings update normally when the control looses focus.

Definition at line 24 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

Constructor & Destructor Documentation

◆ BindingManager()

Csla.Iosui.Binding.BindingManager.BindingManager ( UIView  view)

Creates a new instance of the binding manager.

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

Definition at line 35 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

Member Function Documentation

◆ Add() [1/2]

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

Adds a new binding to be managed.

Parameters
bindingThe new binding to add.

Definition at line 63 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ Add() [2/2]

void Csla.Iosui.Binding.BindingManager.Add ( UIView  control,
string  targetProperty,
object  source,
string  sourceProperty,
BindingDirection  bindingDirection 
)

Adds a new binding to be managed.

Parameters
controlA 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.
bindingDirectionIndicates if the binding is one way or two way.

Definition at line 54 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ GetBindingsForView()

IEnumerable< Binding > Csla.Iosui.Binding.BindingManager.GetBindingsForView ( UIView  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 112 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ Remove() [1/2]

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

Removes the supplied binding from the binding manager.

Parameters
bindingThe binding to remove.

Definition at line 90 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ Remove() [2/2]

void Csla.Iosui.Binding.BindingManager.Remove ( UIView  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 76 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ RemoveAll()

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

Removes all bindings from the binding manager.

Definition at line 99 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ UpdateSourceForLastView()

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

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

Definition at line 130 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

◆ UpdateSourceForView()

void Csla.Iosui.Binding.BindingManager.UpdateSourceForView ( UIView  control)

Updates bindings with the current values in the supplied control.

Parameters
controlThe control to update bindings for.

Definition at line 121 of file Csla.Iosui.Ios/Binding/BindingManager.cs.

Property Documentation

◆ Bindings

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

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

Definition at line 44 of file Csla.Iosui.Ios/Binding/BindingManager.cs.