2015-12-04 55 views
0

我正在使用xamarin.forms。我在我的應用程序中使用了CalendarView。當我嘗試在打開日曆時設置SelectedDate時,它不反映視圖。但在調試過程中,我發現這些值綁定正確。但不能反映在CalendarView上。我的代碼如下:如何在CalendarView中的xamarin.forms中設置SelectedDate

CalendarView _calendarView; 
    _calendarView = new CalendarView(); 
        _calendarView.MinDate = DateTime.Parse ("01/01/1700"); 
        _calendarView.MaxDate = DateTime.Parse ("12/31/2025"); 
        _calendarView.DateSelected += _calendarView_DateSelected; 
        _calendarView.SelectedDate=Convert.ToDateTime("12/10/2015 12:00:00 AM"); 
        _calendarView.BackgroundColor=Color.FromRgb(72,110,195); 
        _calendarView.SelectedDateBackgroundColor=Color.Red; 
        _calendarView.SelectedDateForegroundColor=Color.White; 

任何人都知道我在做什麼錯在這裏?

問候, 阿南德杜貝

回答

0

試試這個:

[Android.Runtime.Register("setDate", "(JZZ)V", "GetSetDate_JZZHandler")] 
public virtual Void SetDate (Int64 date, Boolean animate, Boolean center) 
相關問題