Ejemplo n.º 1
0
        public static void AddBindings(this IBindingContextOwner view, object target,
                                       IEnumerable <BindingDescription> bindingDescriptions, object clearKey = null)
        {
            var bindings = Binder.Bind(view.BindingContext.DataContext, target, bindingDescriptions);

            view.AddBindings(target, bindings, clearKey);
        }
Ejemplo n.º 2
0
        public static void AddBinding(this IBindingContextOwner view, object target,
                                      BindingDescription bindingDescription, object clearKey = null)
        {
            var descriptions = new[] { bindingDescription };

            view.AddBindings(target, descriptions, clearKey);
        }
Ejemplo n.º 3
0
        public static void AddBindings(this IBindingContextOwner view,
                                       IDictionary <object, string> bindingMap,
                                       object clearKey = null)
        {
            if (bindingMap == null)
            {
                return;
            }

            foreach (var kvp in bindingMap)
            {
                view.AddBindings(kvp.Key, kvp.Value, clearKey);
            }
        }
Ejemplo n.º 4
0
 public static T Bind <T>(this T element, IBindingContextOwner bindingContextOwner,
                          IEnumerable <BindingDescription> descriptions)
 {
     bindingContextOwner.AddBindings(element, descriptions);
     return(element);
 }
Ejemplo n.º 5
0
 public static T Bind <T>(this T element, IBindingContextOwner bindingContextOwner, string descriptionText)
 {
     bindingContextOwner.AddBindings(element, descriptionText);
     return(element);
 }
Ejemplo n.º 6
0
        public static void AddBindings(this IBindingContextOwner view, object target, string bindingText, object clearKey = null)
        {
            var bindings = Binder.Bind(view.BindingContext.DataContext, target, bindingText);

            view.AddBindings(target, bindings, clearKey);
        }