传递给MvxTargetBindingFactoryRegistry的空绑定目标
我试图使用MVVMCross绑定对话框元素,但在日志中收到以下错误消息: MvxBind:错误:76.84传递给MvxTargetBindingFactoryRegistry的空绑定目标 MvxBind:警告:76.95无法为TextProperty的绑定创建目标绑定 绑定不起作用,但我不知道我错过了什么: 我的对话框视图控制器传递给MvxTargetBindingFactoryRegistry的空绑定目标,binding,xamarin,mvvmcross,Binding,Xamarin,Mvvmcross,我试图使用MVVMCross绑定对话框元素,但在日志中收到以下错误消息: MvxBind:错误:76.84传递给MvxTargetBindingFactoryRegistry的空绑定目标 MvxBind:警告:76.95无法为TextProperty的绑定创建目标绑定 绑定不起作用,但我不知道我错过了什么: 我的对话框视图控制器 partial class SearchFilterView : MvxDialogViewController { public override void
partial class SearchFilterView : MvxDialogViewController
{
public override void ViewDidLoad()
{
// Associate the ViewModel to this View. Must be called before the base.ViewDidLoad().
this.Request = new MvxViewModelRequest<SearchFilterViewModel>(null, null, new MvxRequestedBy());
base.ViewDidLoad();
AppHelper.SetBrandings(NavigationController, TableView);
var bindings = this.CreateInlineBindingTarget<SearchFilterViewModel>();
Debug.Print("ViewModel: {0}", ViewModel);
Root = new RootElement("Example Root")
{
new Section("Your details")
{
new EntryElement("Login", "Enter Login name").Bind(bindings, vm => vm.TextProperty),
new EntryElement("Password", "Enter Password", "", true).Bind(bindings, vm => vm.PasswordProperty)
},
new Section("Debug Info")
{
new StringElement("Given Login").Bind(bindings, vm => vm.TextProperty),
new StringElement("Given Password").Bind(bindings, vm => vm.PasswordProperty)
}
};
}
}
我使用了中的示例,但我没有发现任何遗漏
如何让它工作
public class SearchFilterViewModel : MvxViewModel
{
private string _textProperty;
public string TextProperty
{
get { return _textProperty; }
set { _textProperty = value; RaisePropertyChanged(() => TextProperty); }
}
private string _passwordProperty;
public string PasswordProperty
{
get { return _passwordProperty; }
set { _passwordProperty = value; RaisePropertyChanged(() => PasswordProperty); }
}
}