Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MvvmCross binding to multiple properties on android control using swiss syntax

What is the correct syntax for binding to multiple properties on an Android element?

I tried something like this local:MvxBind="{ Value StartTime, Text StartTimeText}"

where properties StartTime and StartTime text are defined in the ViewModel but this does not work. Value and Text are properties of this custom control.

The ViewModel may look like this:

public class ViewModel
{
   public DateTime StartTime{get;set;}
   public string StartTimeText {get;set;}
}

I found this related question, but cannot find the correct Swiss syntax for multiple bindings. Any one done multiple bindings on an element?

TIA.

like image 870
Klaus Nji Avatar asked Aug 03 '13 04:08

Klaus Nji


1 Answers

Syntax I was looking for is:

local:MvxBind="Value StartTime; Text StartTimeText"

Don't forget the space after the ";". Without it you won't get the first binding.

like image 198
Klaus Nji Avatar answered Nov 05 '22 06:11

Klaus Nji