ViewController绑定中的Mvvmcross MVXView

时间:2017-05-15 13:04:04

标签: ios xamarin binding mvvmcross

我正在尝试绑定View中包含的MvxView的属性,但绑定似乎不起作用。

MvxView:

[Register("UIWeek")]
public partial class UIWeek : MvxView

Picture of the View Containing UIWeek

我试图在UIWeek中绑定的属性:

public DateTime SelectedDate
{
  get
  {
    return _selectedDate;
  }
  set
  {
    if (_selectedDate != value)
    {
      DateTime oldSelectedDate = _selectedDate;
      _selectedDate = value;
      _dispatcher.RequestMainThreadAction(() => RaiseSelectedDateChanged(_selectedDate, oldSelectedDate));
    }
  }
}

视图控制器中的绑定:

set.Bind(InvoiceDateWeekView).For(v => v.SelectedDate).To(vm => vm.InvoiceDate);

0 个答案:

没有答案