9using System.Collections.Generic;
10using System.ComponentModel;
29 private readonly UIView _view;
44 public List<Binding>
Bindings {
get;
private set; }
54 public void Add(UIView control,
string targetProperty,
object source,
string sourceProperty, BindingDirection bindingDirection)
56 Add(
new Binding(control, targetProperty, source, sourceProperty, bindingDirection));
76 public void Remove(UIView target,
string targetProperty,
object source,
string sourceProperty)
78 var binding =
Bindings.FirstOrDefault(r => ReferenceEquals(r.Target, target) &&
79 r.TargetProperty.Name == targetProperty &&
80 ReferenceEquals(r.Source, source) &&
81 r.SourceProperty.Name == sourceProperty);
101 for (var i =
Bindings.Count - 1; i >= 0; i--)
114 return Bindings.Where(r => ReferenceEquals(r.Target.ViewForBaselineLayout, view));
132 var view = _view.Subviews.FirstOrDefault(v => v.IsFirstResponder);
Contains an individual binding to tie a property on an Axml view to the property on a supplied object...
System.Reflection.PropertyInfo TargetProperty
The PropertyInfo for the property on the target view that is being bound to.
UIView Target
The iOS view that is used by the binding.
void Dispose()
Clears the bindings, references and event handlers.
object Source
The object that the view is bound to.
System.Reflection.PropertyInfo SourceProperty
The PropertyInfo for the property on the source object that is being bound to.
Provides the ability to bing properties on iOS UI controls to properties on CSLA objects.
void Remove(Binding binding)
Removes the supplied binding from the binding manager.
void UpdateSourceForView(UIView control)
Updates bindings with the current values in the supplied control.
void UpdateSourceForLastView()
Updates bindings on the view that is in current focus on the activity supplied to the BindingManager.
void Add(UIView control, string targetProperty, object source, string sourceProperty, BindingDirection bindingDirection)
Adds a new binding to be managed.
void RemoveAll()
Removes all bindings from the binding manager.
void Remove(UIView target, string targetProperty, object source, string sourceProperty)
Removes the binding matching the supplied parameters from the binding manager.
BindingManager(UIView view)
Creates a new instance of the binding manager.
IEnumerable< Binding > GetBindingsForView(UIView view)
Returns all bindings for the supplied view.
List< Binding > Bindings
A list of bindings that have been added to the manager.
void Add(Binding binding)
Adds a new binding to be managed.
string Name
Gets the property name value.