public static PlayingCard Create(Card card) { var cardView = (PlayingCard)Nib.Instantiate(null, null).First(); cardView.Layer.BorderWidth = 1; cardView.Layer.CornerRadius = 5; cardView.Layer.BorderColor = UIColor.Black.CGColor; cardView.CardSuitImage.Image = GetcardSuit(card); cardView.CardValueTop.Text = GetCardValue(card); cardView.CardValueBottom.Text = GetCardValue(card); cardView.CardBackgroundImage.Image = null; return(cardView); }
public static LocationChooserViewCell Create() { var cell = (LocationChooserViewCell)Nib.Instantiate(null, null)[0]; cell.TitelLabel.SetFont(); return(cell); }
public static PriceTileErrorViewCell Create() { PriceTileErrorViewCell created = (PriceTileErrorViewCell)Nib.Instantiate(null, null) [0]; created.ContentView.BackgroundColor = Styles.RTFailRed; return(created); }
public static NativeiOSMessageCell Create(ChatMessage chatMessage, NSObject owner) { var cell = Nib.Instantiate(owner, null).First() as NativeiOSMessageCell; cell.ChatCell = chatMessage; return(cell); }
public static PriceTileViewCell Create() { PriceTileViewCell created = (PriceTileViewCell)Nib.Instantiate(null, null) [0]; created.ContentView.BackgroundColor = Styles.RTDarkerBlue; created.Notional.Delegate = new NotionalTextFieldDelegate(created); var numberToolbar = new UIToolbar(new RectangleF(0.0f, 0.0f, (float)created.Frame.Size.Width, 40.0f)); numberToolbar.Items = new UIBarButtonItem[] { new UIBarButtonItem("Cancel", UIBarButtonItemStyle.Bordered, created, new ObjCRuntime.Selector("CancelNumberPad")), new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), new UIBarButtonItem(UIBarButtonSystemItem.Done, created, new ObjCRuntime.Selector("DoneNumberPad")) }; created.Notional.InputAccessoryView = numberToolbar; // // TODO: Reinstate change of notional currency once data model / back end support this. // For now we just disable the button (not that some relevant implementation of the button click remains). // created.NotionalCCY.UserInteractionEnabled = false; UserModel.Instance.OnChanged .Subscribe(created.OnUserModelChanged); created.DecorateWithTradingEnabled(UserModel.Instance.OneTouchTradingEnabled); return(created); }
public static NodeViewCellDetail Create(IListNode nodeView) { var view = (NodeViewCellDetail)Nib.Instantiate(null, null)[0]; view._nodeView = nodeView; return(view); }
public static BaseItemView Create(CGRect frame, NodeViewController nodeViewController, TreeNode node, UIColor kleur) { var view = (BaseItemView)Nib.Instantiate(null, null) [0]; view.Frame = frame; view.Node = node; view.NodePath = node.Path; view.SetShadow(); view.TerugButton.TouchUpInside += delegate { nodeViewController.PopView(); }; view.TitelLabel.Text = node.Name; view.TitelLabel.SetFont(); view.FullScreenButton.TouchUpInside += delegate { nodeViewController.ToggleFullScreen(); }; if (kleur != null) { view.kleurenBalk.BackgroundColor = kleur; } view.HideBackButton(); return(view); }
public static RepositoryCellView Create(bool fakeCell = false) { var cell = Nib.Instantiate(null, null).GetValue(0) as RepositoryCellView; cell._fakeCell = fakeCell; return(cell); }
public static MenuViewCellTop Create() { var view = (MenuViewCellTop)Nib.Instantiate(null, null)[0]; view.TitelLabel.SetFont(); return(view); }
public ListSettingsView(IntPtr handle) : base(handle) { ContentView = (UIView)Nib.Instantiate(this, null)[0]; ContentView.Frame = Bounds; ContentView.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions; Add(ContentView); }
public static TimelineView Create(TimelineViewModel viewModel) { TimelineView view = Nib.Instantiate(null, null)[0] as TimelineView; view.SetViewModel(viewModel); return(view); }
public static NewsCellView Create() { var linkAttributes = new NSMutableDictionary(); linkAttributes.Add(UIStringAttributeKey.UnderlineStyle, NSNumber.FromBoolean(true)); var cell = (NewsCellView)Nib.Instantiate(null, null)[0]; cell.SeparatorInset = new UIEdgeInsets(0, 48f, 0, 0); cell.Body.LinkAttributes = new NSDictionary(); cell.Body.ActiveLinkAttributes = linkAttributes; cell.Body.Lines = 4; cell.Body.LineBreakMode = UILineBreakMode.TailTruncation; cell.Header.LinkAttributes = new NSDictionary(); cell.Header.ActiveLinkAttributes = linkAttributes; cell.Header.Lines = 2; cell.Header.LineBreakMode = UILineBreakMode.TailTruncation; cell.Image.Layer.MasksToBounds = true; cell.Image.Layer.CornerRadius = cell.Image.Frame.Height / 2; cell.ActionImage.TintColor = cell.Time.TextColor; return(cell); }
public static NodeViewCellDefault Create() { var view = (NodeViewCellDefault)Nib.Instantiate(null, null)[0]; view.TitelLabel.SetFont(); return(view); }
public static MultilinedCellView Create() { var cell = (MultilinedCellView)Nib.Instantiate(null, null)[0]; cell.CaptionLabel.TextColor = Theme.CurrentTheme.MainTextColor; cell.DetailsLabel.TextColor = Theme.CurrentTheme.MainTextColor; return cell; }
public static NewsCellView Create(bool isFakeCell = false) { var cell = Nib.Instantiate(null, null).GetValue(0) as NewsCellView; cell._isFakeCell = isFakeCell; return(cell); }
public static CustomImageTableCell Create(GalleryView BaseView2, GalleryDataModel GelenDTO) { var OlusanView = (CustomImageTableCell)Nib.Instantiate(null, null)[0]; OlusanView.BaseView = BaseView2; OlusanView.GelenDTO = GelenDTO; return(OlusanView); }
public static BuptisGoldCustomSlideItem Create(string imagee, string aciklama) { var OlusanView = (BuptisGoldCustomSlideItem)Nib.Instantiate(null, null)[0]; OlusanView.SlideImage.Image = UIImage.FromBundle("Images/" + imagee); OlusanView.SlideMetin.Text = aciklama; return(OlusanView); }
public static MenuFooterViewCell Create() { var view = (MenuFooterViewCell)Nib.Instantiate(null, null)[0]; view.BackgroundColor = UIColor.Clear; view.TitelLabel.SetFont(); return(view); }
public static GistDetailViewCell Create() { var cell = (GistDetailViewCell)Nib.Instantiate(null, null)[0]; cell.MainImage.Layer.ShadowColor = UIColor.DarkGray.CGColor; cell.MainImage.Layer.ShadowOffset = new SizeF(0, 0); cell.MainImage.Layer.ShadowOpacity = 0.7f; return(cell); }
public void FromName() { using (UINib n = UINib.FromName("EmptyNib", null)) { Assert.NotNull(n, "created with null options"); // newer version (same selector) var result2 = n.Instantiate(null, null); Assert.That(result2.Length, Is.EqualTo(0), "Instantiate"); } }
public static RepositoryTableViewCell Create() { var cell = (RepositoryTableViewCell)Nib.Instantiate(null, null)[0]; cell.RepositoryImageView.Layer.MasksToBounds = true; cell.RepositoryImageView.Layer.CornerRadius = cell.RepositoryImageView.Frame.Height / 2f; cell.SeparatorInset = new UIEdgeInsets(0, cell.TitleLabel.Frame.Left, 0, 0); return(cell); }
public static HediyelerCustomListItem Create(HediyeGonderVC BaseView2, HediyelerDataModel GelenDTO) { var OlusanView = (HediyelerCustomListItem)Nib.Instantiate(null, null)[0]; OlusanView.BaseView = BaseView2; OlusanView.GelenDTO = GelenDTO; OlusanView.HediyeImageView.ContentMode = UIViewContentMode.ScaleAspectFit; return(OlusanView); }
public static MenuViewCell Create() { var cell = (MenuViewCell)Nib.Instantiate(null, null)[0]; cell.BackgroundColor = UIColor.Clear; cell.TitelLabel.SetFont(); cell.Editing = true; // Make the cell deletable cell.ShouldIndentWhileEditing = true; return(cell); }
public static GistCellView Create() { var cell = (GistCellView)Nib.Instantiate(null, null)[0]; cell.MainImageView.Layer.MasksToBounds = true; cell.MainImageView.Layer.CornerRadius = cell.MainImageView.Frame.Height / 2f; cell.SeparatorInset = new UIEdgeInsets(0, cell.TitleLabel.Frame.Left, 0, 0); cell.TitleLabel.TextColor = UIColor.FromRGB(0, 64, 128); cell.TimeLabel.TextColor = UIColor.Gray; cell.ContentLabel.TextColor = UIColor.FromRGB(41, 41, 41); return(cell); }
public static MenuViewCellDetail Create() { var view = (MenuViewCellDetail)Nib.Instantiate(null, null)[0]; view.VerwijderButton.TouchUpInside += (object sender, EventArgs e) => { if (view.DeleteButtonPressed != null) { view.DeleteButtonPressed(); } }; return(view); }
public static NewsCellView Create() { var cell = (NewsCellView)Nib.Instantiate(null, null)[0]; cell.SeparatorInset = EdgeInsets; cell.Body.LinkAttributes = new NSDictionary(); cell.Body.ActiveLinkAttributes = new NSMutableDictionary(); cell.Body.ActiveLinkAttributes[MonoTouch.CoreText.CTStringAttributeKey.UnderlineStyle] = NSNumber.FromBoolean(true); cell.Body.Lines = 0; cell.Body.LineBreakMode = UILineBreakMode.TailTruncation; cell.Header.LinkAttributes = new NSDictionary(); cell.Header.ActiveLinkAttributes = new NSMutableDictionary(); cell.Header.ActiveLinkAttributes[MonoTouch.CoreText.CTStringAttributeKey.UnderlineStyle] = NSNumber.FromBoolean(true); cell.Header.Lines = 2; cell.Header.LineBreakMode = UILineBreakMode.TailTruncation; // Special for large fonts if (Theme.CurrentTheme.FontSizeRatio > 1.0f) { cell.Header.Font = HeaderFont; cell.Body.Font = BodyFont; cell.Time.Font = TimeFont; var timeSectionheight = (float)Math.Ceiling(TimeFont.LineHeight); var timeFrame = cell.Time.Frame; timeFrame.Height = timeSectionheight; cell.Time.Frame = timeFrame; var imageFrame = cell.ActionImage.Frame; imageFrame.Y += (timeFrame.Height - imageFrame.Height) / 2f; cell.ActionImage.Frame = imageFrame; var headerSectionheight = (float)Math.Ceiling(TimeFont.LineHeight); var headerFrame = cell.Header.Frame; headerFrame.Height = headerSectionheight * 2f + (float)Math.Ceiling(3f * Theme.CurrentTheme.FontSizeRatio); headerFrame.Y = 6 + timeFrame.Height + 5f; cell.Header.Frame = headerFrame; var picFrame = cell.Image.Frame; picFrame.Y = 6 + timeFrame.Height + 5f; picFrame.Y += (headerFrame.Height - picFrame.Height) / 2f; cell.Image.Frame = picFrame; var bodyFrame = cell.Body.Frame; bodyFrame.Y = headerFrame.Y + headerFrame.Height + 4f; cell.Body.Frame = bodyFrame; } return(cell); }
public void FromName() { using (UINib n = UINib.FromName("EmptyNib", null)) { Assert.NotNull(n, "created with null options"); #if !XAMCORE_2_0 // obsolete name (too long and case typo) var result = n.InstantiateWithOwneroptions(null, null); Assert.That(result.Length, Is.EqualTo(0), "InstantiateWithOwneroptions"); #endif // newer version (same selector) var result2 = n.Instantiate(null, null); Assert.That(result2.Length, Is.EqualTo(0), "Instantiate"); } }
public static RepositoryCellView Create() { var cell = (RepositoryCellView)Nib.Instantiate(null, null)[0]; cell.CaptionLabel.TextColor = Theme.CurrentTheme.MainTitleColor; cell.ContentLabel.TextColor = Theme.CurrentTheme.MainTextColor; cell.FollowersImageVIew.Image = Theme.CurrentTheme.RepositoryCellFollowers; cell.ForksImageView.Image = Theme.CurrentTheme.RepositoryCellForks; cell.UserImageView.Image = Theme.CurrentTheme.RepositoryCellUser; cell.OwnerImageView.Layer.MasksToBounds = true; cell.OwnerImageView.Layer.CornerRadius = cell.OwnerImageView.Bounds.Height / 2f; //Create the icons return(cell); }
public static NewsCellView Create() { var cell = (NewsCellView)Nib.Instantiate(null, null)[0]; cell.Body.SetUnderlineLinks(false); cell.Body.LinkColor = CodeFramework.iOS.Elements.NewsFeedElement.LinkColor; cell.Header.SetUnderlineLinks(false); cell.Header.LinkColor = CodeFramework.iOS.Elements.NewsFeedElement.LinkColor; cell.SeparatorInset = EdgeInsets; // Special for large fonts if (Theme.CurrentTheme.FontSizeRatio > 1.0f) { cell.Header.Font = HeaderFont; cell.Body.Font = BodyFont; cell.Time.Font = TimeFont; var timeSectionheight = (float)Math.Ceiling(TimeFont.LineHeight); var timeFrame = cell.Time.Frame; timeFrame.Height = timeSectionheight; cell.Time.Frame = timeFrame; var imageFrame = cell.ActionImage.Frame; imageFrame.Y += (timeFrame.Height - imageFrame.Height) / 2f; cell.ActionImage.Frame = imageFrame; var headerSectionheight = (float)Math.Ceiling(TimeFont.LineHeight); var headerFrame = cell.Header.Frame; headerFrame.Height = headerSectionheight * 2f + (float)Math.Ceiling(3f * Theme.CurrentTheme.FontSizeRatio); headerFrame.Y = 6 + timeFrame.Height + 5f; cell.Header.Frame = headerFrame; var picFrame = cell.Image.Frame; picFrame.Y = 6 + timeFrame.Height + 5f; picFrame.Y += (headerFrame.Height - picFrame.Height) / 2f; cell.Image.Frame = picFrame; var bodyFrame = cell.Body.Frame; bodyFrame.Y = headerFrame.Y + headerFrame.Height + 4f; cell.Body.Frame = bodyFrame; } //cell.Header.CenterVertically = true; return(cell); }
public override void ViewDidLoad() { base.ViewDidLoad(); UINib nib = null; if (_cellMap.TryGetValue(typeof(TThing), out nib)) { // Register the collection view cell collectionView.RegisterNibForCell(nib, "Cell"); NSObject[] views = nib.Instantiate(null, null); _prototypeCell = (IThingCell)views.First <NSObject>(); } // Add a + button to the navigation bar NavigationItem.SetRightBarButtonItem( new UIBarButtonItem(UIBarButtonSystemItem.Add, (sender, args) => { AddButtonPressed(); }), false); }