Example #1
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();
            ClipsToBounds = true;

            ImageView.Frame = new RectangleF(0, 0, Frame.Width, 280);

            price.Frame = new RectangleF(offset, ImageView.Frame.Bottom, Bounds.Width - (offset * 2), 30);

            make.Frame = new RectangleF(offset, ImageView.Frame.Bottom, Bounds.Width * 0.70f, 30);

            mileage.Frame = new RectangleF(offset, make.Frame.Bottom + offset, Bounds.Size.Width - offset, 20);
            source.Frame  = new RectangleF(offset, mileage.Frame.Bottom, Bounds.Width - offset, 20);

            desc.Frame = new RectangleF(offset, source.Frame.Bottom + 40, Bounds.Width - (offset * 2), 50);

            var carousel = new CarouselView(new RectangleF(0, ImageView.Frame.Bottom, Bounds.Width, 50));

            carousel.DataSource   = new LinearDataSource(item);
            carousel.Delegate     = new LinearDelegate();
            carousel.CarouselType = CarouselType.Linear;
            //carousel.ConfigureView();
            //Add(carousel);
            //carousel.Autoscroll = 1.0f;

            Add(make);
            Add(price);
            Add(mileage);
            Add(source);

            using (var line = new LineView(new RectangleF(offset, source.Frame.Bottom + (offset * 2), Bounds.Width - (offset * 2), 1))) {
                line.BackgroundColor = UIColor.LightGray;
                Add(line);
            }


            Add(desc);

            using (var line = new LineView(new RectangleF(offset, desc.Frame.Bottom + (offset * 2), Bounds.Width - (offset * 2), 1))) {
                line.BackgroundColor = UIColor.LightGray;
                Add(line);
            }

            Add(GetToolBar());
        }
Example #2
0
        public override void LayoutSubviews()
        {
            base.LayoutSubviews();
            ClipsToBounds = true;

            ImageView.Frame = new RectangleF(0, 0, ContentView.Bounds.Width, 180);

            price.Frame = new RectangleF(offset, ImageView.Frame.Bottom, ContentView.Bounds.Width - (offset * 2), 30);

            make.Frame    = new RectangleF(offset, ImageView.Frame.Bottom, ContentView.Bounds.Width / 2 + offset, 20);
            mileage.Frame = new RectangleF(offset, make.Frame.Bottom, ContentView.Bounds.Size.Width - offset, 20);
            source.Frame  = new RectangleF(offset, mileage.Frame.Bottom, ContentView.Bounds.Width - offset, 20);

            desc.Frame = new RectangleF(offset, source.Frame.Bottom + 40, ContentView.Bounds.Width - (offset * 2), 50);

            SelectionStyle   = UITableViewCellSelectionStyle.None;
            EditingAccessory = UITableViewCellAccessory.DetailButton;

            ContentView.Add(make);
            ContentView.Add(price);
            ContentView.Add(mileage);
            ContentView.Add(source);

            using (var line = new LineView(new RectangleF(offset, source.Frame.Bottom + (offset * 2), ContentView.Bounds.Width - (offset * 2), 1))) {
                line.BackgroundColor = UIColor.LightGray;
                ContentView.Add(line);
            }

            ContentView.Add(desc);

            using (var line = new LineView(new RectangleF(offset, desc.Frame.Bottom + (offset * 2), ContentView.Bounds.Width - (offset * 2), 1))) {
                line.BackgroundColor = UIColor.LightGray;
                ContentView.Add(line);
            }

            ContentView.Add(GetToolBar());
        }