We're implementing our own cross platform framework using the binding capabilities of MvvmCross Core. My question is how can custom bindings be registered within Mvx without the setup. Custom binding used is an imeActionBinding similar to: https://gist.github.com/slodge/8270923 attempted registration using:
Mvx.CallbackWhenRegistered<IMvxTargetBindingFactoryRegistry>(RegisterCustomBindings);
protected virtual void RegisterCustomBindings(IMvxTargetBindingFactoryRegistry registry)
{
EditTextImeActionBinding.Register(registry);
}
Tried the same thing with project ChimpLight in the LightSetup:
Mvx.RegisterSingleton<IMvxTargetBindingFactoryRegistry>(new MvxTargetBindingFactoryRegistry());
var customBindingRegistry = Mvx.Resolve<IMvxTargetBindingFactoryRegistry>();
EditTextImeActionBinding.Register(customBindingRegistry);
xaml:
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Search"
android:inputType="text"
android:imeOptions="actionSearch"
local:MvxBind="Text LastName;ImeAction ResetCommand" />
no exceptions - but it seems the custom binding never gets loaded :|
what am I missing?
IMvxTargetBindingFactoryRegistryshould already be registered as part of the binding setup - try using the existing binding registry instead of a new one - if that doesn't work, is there anything in the trace? - Stuart