Xamarin 对话框中的MvvmCross多行编辑框
我正在使用Xamarin.Touch和MvvmCross,并尝试在对话框部分使用多行文本编辑框 以下是我正在使用的代码:Xamarin 对话框中的MvvmCross多行编辑框,xamarin,mvvmcross,monotouch.dialog,Xamarin,Mvvmcross,Monotouch.dialog,我正在使用Xamarin.Touch和MvvmCross,并尝试在对话框部分使用多行文本编辑框 以下是我正在使用的代码: Root = new RootElement("Settings") { new Section("Web API") { new MultilineElement("Address", "Enter Web API Location").Bind(bindings, vm => vm.ApiRoot) } }; Root.Un
Root = new RootElement("Settings")
{
new Section("Web API")
{
new MultilineElement("Address", "Enter Web API Location").Bind(bindings, vm => vm.ApiRoot)
}
};
Root.UnevenRows = true;
我在模拟器中看到的只是一个不可编辑的单行文本框
我尝试添加Root.lows=true,因为StackOverflow的回答建议将其作为一种修复方法,但没有帮助
有没有办法做到这一点?我看到的例子是这样的:
this.Root = new RootElement("View Item")
{
new Section("Example")
{
new MultilineElement("Example").Bind(this, "{'Value':{'Path':'Property.Value'}}")
},
};
所以你的看起来像:
Root = new RootElement("Settings")
{
new Section("Web API")
{
new MultilineElement("Address", "Enter Web API Location").Bind(this, "{'Value':{'Path':'YourVMProperty.Value')
}
};
Root.UnevenRows = true;
如果你那样做会发生什么?您的“绑定”逻辑在我看来是可疑的。您的示例看起来像老式绑定。请参见此处,了解我使用的fluent绑定的示例