예제 #1
0
파일: AlbumCell.cs 프로젝트: xjpeter/gMusic
        public AppKit.NSCollectionViewItem GetCollectionCell(AppKit.NSCollectionView collectionView, Foundation.NSIndexPath indexPath)
        {
            var cell = collectionView.MakeItem("AlbumCollectionItem", indexPath);

            if (cell == null)
            {
                cell = new NSCollectionViewItem()
                {
                    Identifier = "AlbumCollectionItem",
                };
                cell.View = new AlbumCollectionItem();
            }
            var view = cell.View as AlbumCollectionItem;

            view.Update(BindingContext as Album);
            return(cell);
        }
 public static NSDragOperation ValidateDrop(this INSCollectionViewDelegate This, NSCollectionView collectionView, NSDraggingInfo draggingInfo, out NSIndexPath proposedDropIndexPath, out NSCollectionViewDropOperation proposedDropOperation)
 {
     proposedDropIndexPath = null;
     proposedDropOperation = NSCollectionViewDropOperation.On;
     return(This.ValidateDropOperation(collectionView, draggingInfo, ref proposedDropIndexPath, ref proposedDropOperation));
 }
 public virtual NSDragOperation ValidateDrop(NSCollectionView collectionView, NSDraggingInfo draggingInfo, out NSIndexPath proposedDropIndexPath, out NSCollectionViewDropOperation proposedDropOperation)
 {
     proposedDropIndexPath = null;
     proposedDropOperation = NSCollectionViewDropOperation.On;
     return(ValidateDropOperation(collectionView, draggingInfo, ref proposedDropIndexPath, ref proposedDropOperation));
 }