AdvancedDemo.AdvancedDemoViewController.CarouselDataSource.PlaceholderViewAtIndex C# (CSharp) Метод

PlaceholderViewAtIndex() публичный Метод

public PlaceholderViewAtIndex ( iCarousel carousel, uint index, UIView view ) : UIView
carousel iCarousel
index uint
view UIView
Результат UIView
            public override UIView PlaceholderViewAtIndex(iCarousel carousel, uint index, UIView view)
            {
                UILabel label = null;
                UIImageView imageView = null;

                //create new view if no view is available for recycling
                if (null == view) {
                    //don't do anything specific to the index within
                    //this `if (view == nil) {...}` statement because the view will be
                    //recycled and used with other index values later
                    imageView = new UIImageView (new RectangleF (0f, 0f, 200.0f, 200.0f));
                    imageView.Image = UIImage.FromBundle ("page.png");
                    imageView.ContentMode = UIViewContentMode.Center;
                    label = new UILabel (imageView.Bounds);
                    label.BackgroundColor = UIColor.Clear;
                    label.TextAlignment = UITextAlignment.Center;
                    label.Font = label.Font.WithSize (50f);
                    label.Tag = 1;
                    imageView.AddSubview (label);
                } else {
                    label = (UILabel)view.ViewWithTag (1);
                    imageView = (UIImageView)view;
                }
                //set item label
                //remember to always set any properties of your carousel item
                //views outside of the `if (view == nil) {...}` check otherwise
                //you'll get weird issues with carousel item content appearing
                //in the wrong place in the carousel
                label.Text = (index == 0) ? "[" : "]";

                return imageView;
            }