protected override void DisconnectHandler(UICollectionView nativeView)
        {
            collectionView.DataSource = null;
            dataSource.Dispose();
            dataSource = null;

            collectionView.Delegate = null;
            cvdelegate.Dispose();
            cvdelegate = null;

            collectionView.Dispose();
            collectionView = null;

            layout.Dispose();
            layout = null;

            base.DisconnectHandler(nativeView);
        }
        protected override UICollectionView CreateNativeView()
        {
            layout = new CvLayout(this);
            layout.ScrollDirection = VirtualView.Orientation switch
            {
                ListOrientation.Vertical => UICollectionViewScrollDirection.Vertical,
                ListOrientation.Horizontal => UICollectionViewScrollDirection.Horizontal,
                _ => UICollectionViewScrollDirection.Vertical
            };
            layout.EstimatedItemSize       = UICollectionViewFlowLayout.AutomaticSize;
            layout.SectionInset            = new UIEdgeInsets(0, 0, 0, 0);
            layout.MinimumInteritemSpacing = 0f;
            layout.MinimumLineSpacing      = 0f;

            collectionView = new UICollectionView(CGRect.Empty, layout);

            return(collectionView);
        }