当前位置: 首页>>代码示例>>C#>>正文


C# UICollectionView.DequeueReusableSupplementaryView方法代码示例

本文整理汇总了C#中UICollectionView.DequeueReusableSupplementaryView方法的典型用法代码示例。如果您正苦于以下问题:C# UICollectionView.DequeueReusableSupplementaryView方法的具体用法?C# UICollectionView.DequeueReusableSupplementaryView怎么用?C# UICollectionView.DequeueReusableSupplementaryView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UICollectionView的用法示例。


在下文中一共展示了UICollectionView.DequeueReusableSupplementaryView方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetViewForSupplementaryElement

        public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
        {
            if (elementKind == (NSString)"UICollectionElementKindSectionHeader") {
                PictureHeaderVIew header = (PictureHeaderVIew)collectionView.DequeueReusableSupplementaryView
                    (UICollectionElementKindSection.Header, (NSString)"header", indexPath);
                header.title.Frame = new RectangleF (20, 15, 230, 300);
                header.title.Text = Items.Title;
                header.title.Lines = 0;
                header.title.SizeToFit ();
                header.photo.Image = UIImage.FromFile ("./Assets/photo.png");
                header.picturesCount.Text = Items.Images.Count.ToString();

                return header;
            }
            else {
                StartReadingView footer = (StartReadingView)collectionView.DequeueReusableSupplementaryView
                    (UICollectionElementKindSection.Footer, (NSString)"collectionfooter", indexPath);
                footer.StartReading.SetBackgroundImage (UIImage.FromFile ("./Assets/buttonlong.png"), UIControlState.Normal);
                footer.StartReading.TouchUpInside += (object sender, EventArgs e) => {
                    UIStoryboard board = UIStoryboard.FromName ("MainStoryboard", null);
                    var prefs = (PreferencesSubController)board.InstantiateViewController ("preferencessub");
                    this.NavigationController.PushViewController(prefs, true);
                };
                return footer;
            }
        }
开发者ID:jgrozdanov,项目名称:mono-sport,代码行数:26,代码来源:PicturesCollectionController.cs

示例2: GetViewForSupplementaryElement

		// TODO: Step 2c: uncomment to get a header instance to use for the Supplementary View
		public override UICollectionReusableView GetViewForSupplementaryElement (UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
		{
			// get a Header instance to use for the supplementary view
			var headerView = (Header)collectionView.DequeueReusableSupplementaryView (elementKind, headerId, indexPath);
			headerView.Text = "Evolve Speakers";
			return headerView;
		}
开发者ID:CodeMangler,项目名称:XamarinUniversity,代码行数:8,代码来源:CollectionViewController.cs

示例3: GetViewForSupplementaryElement

 public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
 {
     if (elementKind == (NSString)"UICollectionElementKindSectionHeader") {
         return (UICollectionReusableView)collectionView.DequeueReusableSupplementaryView
             (UICollectionElementKindSection.Header, (NSString)"collectionheader", indexPath);
     } else {
         StartReadingView footer = (StartReadingView)collectionView.DequeueReusableSupplementaryView
             (UICollectionElementKindSection.Footer, (NSString)"collectionfooter", indexPath);
         footer.StartReading.SetBackgroundImage (UIImage.FromFile ("./Assets/buttonlong.png"), UIControlState.Normal);
         if (!attached) {
             footer.StartReading.TouchUpInside += (object sender, EventArgs e) => {
                 var tabbar = new MainTabController ();
                 UIApplication.SharedApplication.Delegate.Window.RootViewController = tabbar;
             };
             attached = true;
         }
         return footer;
     }
 }
开发者ID:jgrozdanov,项目名称:mono-sport,代码行数:19,代码来源:PreferencesController.cs

示例4: GetViewForSupplementaryElement

        public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
        {
            if (elementKind == UICollectionElementKindSectionKey.Header)
            {
                var header = collectionView.DequeueReusableSupplementaryView(UICollectionElementKindSection.Header, QuickCurrencyHeaderCell.Key, indexPath) as QuickCurrencyHeaderCell;
                header.Setup(CurrentBaseCurrency, CurrentBaseCurrencyAmount);

                UITapGestureRecognizer guesture = new UITapGestureRecognizer(() =>
                {
                    HeaderTapped();
                })
                {
                    NumberOfTapsRequired = 1
                };

                header.AddGestureRecognizer(guesture);

                return header;
            }

            return null;
        }
开发者ID:nicwise,项目名称:codemania2014,代码行数:22,代码来源:CurrencyListCollectionViewController.cs

示例5: GetViewForSupplementaryElement

 public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
 {
     var headerView = (Header) collectionView.DequeueReusableSupplementaryView (elementKind, headerId, indexPath);
     headerView.Center = collectionView.Center;
     return headerView;
 }
开发者ID:chrisntr,项目名称:MonkeySpace,代码行数:6,代码来源:PhotosCollectionViewController.cs

示例6: GetViewForSupplementaryElement

 public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
 {
     _headerView = (HeaderView)collectionView.DequeueReusableSupplementaryView (elementKind, headerId, indexPath);
     _headerView.TileGrid = _tileGrid;
     return _headerView;
 }
开发者ID:CarriePlaced,项目名称:Minesweeper,代码行数:6,代码来源:GameGridView.cs


注:本文中的UICollectionView.DequeueReusableSupplementaryView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。