Ejemplo n.º 1
0
 public ListBindViewModel()
 {
     Items = new ObservableList <ItemViewModel>()
     {
         new ItemViewModel(false, "回锅肉", OnItemClick)
     };
     SelectedDropDownIndex = new ObservableProperty <int>(0);
     DropdownData          = new List <Dropdown.OptionData>()
     {
         new Dropdown.OptionData("回锅肉"),
         new Dropdown.OptionData("水煮肉片"),
         new Dropdown.OptionData("水煮鱼"),
         new Dropdown.OptionData("辣子鸡丁"),
         new Dropdown.OptionData("鱼香肉丝")
     };
     Items.AddListener((list) => OnUpdateItem());
 }