Пример #1
0
        void ReleaseDesignerOutlets()
        {
            if (MonthCollectionView != null)
            {
                MonthCollectionView.Dispose();
                MonthCollectionView = null;
            }

            if (MonthTitle_UILabel != null)
            {
                MonthTitle_UILabel.Dispose();
                MonthTitle_UILabel = null;
            }

            if (NextMonth_UIButton != null)
            {
                NextMonth_UIButton.Dispose();
                NextMonth_UIButton = null;
            }

            if (PreviousMonth_UIButton != null)
            {
                PreviousMonth_UIButton.Dispose();
                PreviousMonth_UIButton = null;
            }
        }
        private async void DatePickerOnDateSelected(object sender, DateChangedEventArgs e)
        {
            var month = ViewModel.GetMonthByDate(e.NewDate);

            if (month != null)
            {
                MonthCollectionView.ScrollTo(ViewModel.Months.IndexOf(month), animate: false);
            }

            _shouldSelectFirstDayWhenSwitchMonth = false;
            ViewModel.SelectDayCommand.Execute(e.NewDate);

            // Necessary in order not to fire ToDoCollectionOnSelectionChanged with false param
            await Task.Delay(800);

            _shouldSelectFirstDayWhenSwitchMonth = true;
        }
Пример #3
0
 public override void AwakeFromNib()
 {
     MonthCollectionView.RegisterClassForCell(typeof(DayCollectionViewCell), "dayViewIdentifier");
 }
 private void MenuItemOnClicked(object sender, EventArgs e)
 {
     MonthCollectionView.ScrollTo(ViewModel.Months.ElementAt(ViewModel.CurrentMonthIndex), animate: false);
 }