public MilestoneTableViewCell()
            : base(new CGRect(0, 0, 320f, 80))
        {
            AutosizesSubviews             = true;
            ContentView.AutosizesSubviews = true;
            SeparatorInset = UIEdgeInsets.Zero;

            _milestoneView                  = new MilestoneView();
            _milestoneView.Frame            = this.Frame;
            _milestoneView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            ContentView.Add(_milestoneView);
        }
Beispiel #2
0
            public MilestoneTableViewCell()
                : base(UITableViewCellStyle.Default, Key)
            {
                Frame                         = new RectangleF(0, 0, 320f, 80);
                AutosizesSubviews             = true;
                ContentView.AutosizesSubviews = true;
                SeparatorInset                = UIEdgeInsets.Zero;

                _milestoneView                  = new MilestoneView();
                _milestoneView.Frame            = this.Frame;
                _milestoneView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
                ContentView.Add(_milestoneView);
            }
        public MilestoneTableViewCell(IntPtr handle)
            : base(handle)
        {
            _milestoneView                  = new MilestoneView();
            _milestoneView.Frame            = Frame;
            _milestoneView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            ContentView.Add(_milestoneView);

            this.WhenActivated(d => {
                d(this.OneWayBind(ViewModel, x => x.Title, x => x._milestoneView.Title));
                d(this.WhenAnyValue(x => x.ViewModel.IsSelected).Subscribe(x => Accessory           = x ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None));
                d(this.WhenAnyValue(x => x.ViewModel.DueDate).Subscribe(x => _milestoneView.DueDate = x));
                d(this.WhenAnyValue(x => x.ViewModel.OpenIssues, x => x.ViewModel.ClosedIssues)
                  .Subscribe(x => _milestoneView.OpenClosedIssues = new Tuple <int, int>(x.Item1, x.Item2)));
            });
        }
Beispiel #4
0
        public MilestoneTableViewCell(IntPtr handle)
            : base(handle)
        {
            var frame = Frame = new CGRect(0, 0, 320f, 80);

            AutosizesSubviews             = true;
            ContentView.AutosizesSubviews = true;

            _milestoneView                  = new MilestoneView();
            _milestoneView.Frame            = frame;
            _milestoneView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight;
            ContentView.Add(_milestoneView);

            this.WhenAnyValue(x => x.ViewModel)
            .Where(x => x != null)
            .Subscribe(x => _milestoneView.Init(x.Title, x.OpenIssues, x.ClosedIssues, x.DueDate));
        }