0

I'm using Xamarin.Touch and MvvmCross and am trying to get a multi-line text edit box to work in a dialog section

Here is the code I'm using:

Root = new RootElement("Settings")
{
    new Section("Web API")
    {
        new MultilineElement("Address", "Enter Web API Location").Bind(bindings, vm => vm.ApiRoot)
    }
};

Root.UnevenRows = true;

All I see in the simulator is a single line text box that is not editable.

I tried adding Root.UnevenRows = true as a StackOverflow answer suggested it as a fix but it didn't help.

Any ideas how to do this?

Steve Chadbourne
  • 6,873
  • 3
  • 54
  • 82

1 Answers1

0

The examples I've seen do something like this:

this.Root = new RootElement("View Item")
{
    new Section("Example")
    {
        new MultilineElement("Example").Bind(this, "{'Value':{'Path':'Property.Value'}}")
    },
};

So yours would look like:

Root = new RootElement("Settings")
{
    new Section("Web API")
    {
        new MultilineElement("Address", "Enter Web API Location").Bind(this, "{'Value':{'Path':'YourVMProperty.Value')
    }
};

Root.UnevenRows = true;

What happens if you do that? your "Bind" logic is what looks suspect to me.

PkL728
  • 955
  • 8
  • 21
  • Your example looks like old style binding. See here for an example of the fluent binding I'm using https://github.com/MvvmCross/MvvmCross/wiki/Databinding – Steve Chadbourne Jun 02 '14 at 21:58