protected MvxContextWrapper(Context context, IMvxBindingContextOwner bindingContextOwner) : base(context) { if (bindingContextOwner == null) throw new InvalidOperationException("Wrapper can only be set on IMvxBindingContextOwner"); this._bindingContextOwner = bindingContextOwner; }
public static void AdaptForBinding(VisualElement element, IMvxBindingContextOwner contextOwner) { var mvxPage = element as IMvxContentPage; if (mvxPage != null) { contextOwner.BindingContext = new MvxBindingContext(); contextOwner.BindingContext.DataContext = mvxPage.ViewModel; } }
public MvxFluentBindingDescription(IMvxBindingContextOwner bindingContextOwner, TTarget target) : base(bindingContextOwner, target) { }
public static MvxFluentBindingDescription <TTarget> CreateBinding <TTarget>( this IMvxBindingContextOwner contextOwner, TTarget target) where TTarget : class { return(new MvxFluentBindingDescription <TTarget>(contextOwner, target)); }
public MvxInlineBindingTarget(IMvxBindingContextOwner bindingContextOwner) { BindingContextOwner = bindingContextOwner; }
/* * This overload removed at present - it caused confusion on iOS * because it could lead to the bindings being described before * the table cells were fully available * public static void DelayBind(this IMvxBindingContextOwner view, params IMvxApplicable[] applicables) * { * view.BindingContext.DelayBind(() => applicables.Apply()); * } */ public static void DelayBind(this IMvxBindingContextOwner view, Action bindingAction) { view.BindingContext.DelayBind(bindingAction); }
public static void AddBindings(this IMvxBindingContextOwner view, object target, string bindingText, object clearKey = null) { var bindings = Binder.Bind(view.BindingContext.DataContext, target, bindingText); view.AddBindings(target, bindings, clearKey); }
public static View BindingInflate(this IMvxBindingContextOwner owner, int resourceId, ViewGroup viewGroup, bool attachToParent) { var context = (IMvxAndroidBindingContext)owner.BindingContext; return(context.BindingInflate(resourceId, viewGroup, attachToParent)); }
public static void CreateBindingContext(this IMvxBindingContextOwner view, IEnumerable <MvxBindingDescription> bindings) { view.BindingContext = Mvx.Resolve <IMvxBindingContext>().Init(null, view, bindings); }
public MvxBaseFluentBindingDescription(IMvxBindingContextOwner bindingContextOwner, TTarget target) { _bindingContextOwner = bindingContextOwner; _target = target; }
public static void ClearBindings(this IMvxBindingContextOwner owner, object target) { owner.BindingContext.ClearBindings(target); }
public static void CreateBindingContext(this IMvxBindingContextOwner view, string bindingText) { view.BindingContext = new MvxBindingContext(null, new Dictionary <object, string> { { view, bindingText } }); }
public static ContextWrapper Wrap(Context @base, IMvxBindingContextOwner bindingContextOwner) { return new MvxContextWrapper(@base, bindingContextOwner); }
public static void CreateBindingContext(this IMvxBindingContextOwner view) { view.BindingContext = new MvxBindingContext(); }
public static MvxInlineBindingTarget <TViewModel> CreateInlineBindingTarget <TViewModel>( this IMvxBindingContextOwner bindingContextOwner) { return(new MvxInlineBindingTarget <TViewModel>(bindingContextOwner)); }
public static T Bind <T>(this T element, IMvxBindingContextOwner bindingContextOwner, IEnumerable <MvxBindingDescription> descriptions) { bindingContextOwner.AddBindings(element, descriptions); return(element); }
public static T Bind <T>(this T element, IMvxBindingContextOwner bindingContextOwner, string descriptionText) { bindingContextOwner.AddBindings(element, descriptionText); return(element); }
public static ContextWrapper Wrap(Context @base, IMvxBindingContextOwner bindingContextOwner) { return(new MvxContextWrapper(@base, bindingContextOwner)); }
public static void AddLangBindings(this IMvxBindingContextOwner view, object target, string bindingText) { var bindings = Binder.LanguageBind(view.BindingContext.DataContext, target, bindingText); view.AddBindings(target, bindings); }
public static void CreateBindingContext(this IMvxBindingContextOwner view) { view.BindingContext = Mvx.Resolve <IMvxBindingContext>(); }
public static void ClearAllBindings(this IMvxBindingContextOwner owner) { owner.BindingContext.ClearAllBindings(); }
public static void CreateBindingContext(this IMvxBindingContextOwner view, string bindingText) { view.BindingContext = Mvx.Resolve <IMvxBindingContext>().Init(null, view, bindingText); }