public SessionCell(UITableViewCellStyle style, NSString ident, MonkeySpace.Core.Session session, string big, string small) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; bigLabel = new UILabel() { TextAlignment = UITextAlignment.Left, BackgroundColor = UIColor.Clear }; smallLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.Clear }; button = UIButton.FromType(UIButtonType.Custom); button.TouchDown += delegate { UpdateImage(ToggleFavorite()); }; UpdateCell(session, big, small); ContentView.Add(bigLabel); ContentView.Add(smallLabel); ContentView.Add(button); }
private UITableViewCellStyle StringToStyle(string str) { UITableViewCellStyle style = UITableViewCellStyle.Subtitle; str = str ?? ""; switch (str.ToLower()) { case "default": style = UITableViewCellStyle.Default; break; case "value1": style = UITableViewCellStyle.Value1; break; case "value2": style = UITableViewCellStyle.Value2; break; case "subtitle": style = UITableViewCellStyle.Subtitle; break; default: style = UITableViewCellStyle.Subtitle; break; } return(style); }
/// <summary> /// Initializes a new instance of the <see cref="PickerCells.PickerViewCell"/> class. /// </summary> /// <param name="items">Items.</param> public PickerViewCell(List<String> items, UITableViewCellStyle style = UITableViewCellStyle.Default) : base(style) { if (items != null) { var simps = new Dictionary<int,PickerViewCellComponent>(); simps[0] = new PickerViewCellComponent() { Width = -1, Items = new List<PickerViewCellItem>() { } }; foreach (var aItem in items) { simps[0].Items.Add(new PickerViewCellItem() { SelectedValue = aItem, DisplayValue = aItem, }); } mDataDict = simps; } SecondarySetup(); }
public PatientTableViewCell (UITableViewCellStyle style, NSString ident, Patient showPatient) : base (style, ident) { this.SelectionStyle = UITableViewCellSelectionStyle.Blue; showPatient.ItemUpdated += (sender, args) => this.UpdateCell(showPatient); this.nameLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; this.companyLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; this.image = new UIImageView(); this.UpdateCell(showPatient); this.ContentView.Add (this.nameLabel); this.ContentView.Add (this.companyLabel); this.ContentView.Add (this.image); }
/// <summary> /// Initializes a new instance of the <see cref="PickerCells.PickerViewCell"/> class. /// </summary> /// <param name="dictionary">Dictionary.</param> /// <param name="style">Style.</param> public PickerViewCell(Dictionary<int,PickerViewCellComponent> dictionary, UITableViewCellStyle style = UITableViewCellStyle.Default) : base(style) { mDataDict = dictionary; SecondarySetup(); }
public PrimaryCell(CGSize parentSize, UITableViewCellStyle style, string cellIdentifier) : base(style, cellIdentifier) { BackgroundColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color); SelectionStyle = UITableViewCellSelectionStyle.None; Image = new UIImageView( ); Image.BackgroundColor = UIColor.Yellow; Image.ContentMode = UIViewContentMode.ScaleAspectFill; Image.Layer.AnchorPoint = CGPoint.Empty; AddSubview(Image); // Banner Image Image.Image = new UIImage(NSBundle.MainBundle.BundlePath + "/" + PrivateConnectConfig.MainPageHeaderImage); Image.SizeToFit( ); // resize the image to fit the width of the device nfloat imageAspect = Image.Bounds.Height / Image.Bounds.Width; Image.Frame = new CGRect(0, 0, parentSize.Width, parentSize.Width * imageAspect); Title = new UILabel( ); Title.Text = ConnectStrings.Main_Connect_Header; Title.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Large_FontSize); Title.Layer.AnchorPoint = CGPoint.Empty; Title.TextColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.TextField_ActiveTextColor); Title.LineBreakMode = UILineBreakMode.TailTruncation; Title.TextAlignment = UITextAlignment.Center; Title.Frame = new CGRect(5, Image.Frame.Bottom, parentSize.Width - 10, 0); Title.SizeToFit( ); AddSubview(Title); }
public MvxBindableTableViewSource(UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, IEnumerable<MvxBindingDescription> descriptions) { _tableView = tableView; _cellStyle = style; _cellIdentifier = cellIdentifier; _bindingDescriptions = descriptions; }
UITableViewCell CreateReusableCell_CodeBehind(UITableView tableView, UITableViewCellStyle style, NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell(CellId, indexPath); if (cell == null) { cell = new UITableViewCell(style, CellId); cell.TextLabel.TextColor = UIColor.Blue; cell.Accessory = UITableViewCellAccessory.DetailDisclosureButton; if (cell.DetailTextLabel != null) { cell.DetailTextLabel.TextColor = UIColor.Gray; } ++_reusableCellCount; Console.WriteLine("Reusable cell count: {0}", _reusableCellCount); } else { if (cell.ImageView != null) { cell.ImageView.Image.Dispose(); } } return(cell); }
public SessionCell(UITableViewCellStyle style, NSString ident, MonkeySpace.Core.Session session, string big, string small) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; bigLabel = new UILabel () { TextAlignment = UITextAlignment.Left, BackgroundColor = UIColor.Clear }; smallLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.Clear }; button = UIButton.FromType (UIButtonType.Custom); button.TouchDown += delegate { UpdateImage (ToggleFavorite ()); }; UpdateCell (session, big, small); ContentView.Add (bigLabel); ContentView.Add (smallLabel); ContentView.Add (button); }
public BubbleCell(UITableViewCellStyle style, string reuseIdentifier) : base(style, reuseIdentifier) { if (reuseIdentifier == IncomingCell.CellId) { typebubble = MessageType.Incoming; } else if (reuseIdentifier == IncomingFileCell.CellId) { typebubble = MessageType.IncomingFile; } else if (reuseIdentifier == OutgoingCell.CellId) { typebubble = MessageType.Outgoing; } else if (reuseIdentifier == OutgoingFileCell.CellId) { typebubble = MessageType.OutgoingFile; } if (reuseIdentifier == IncomingFileCell.CellId || reuseIdentifier == OutgoingFileCell.CellId) { blnTieneArchivo = true; } else { blnTieneArchivo = false; } Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref="PickerCells.PickerViewCell"/> class. /// </summary> /// <param name="dictionary">Dictionary.</param> /// <param name="style">Style.</param> public PickerViewCell(Dictionary <int, PickerViewCellComponent> dictionary, UITableViewCellStyle style = UITableViewCellStyle.Default) : base(style) { mDataDict = dictionary; SecondarySetup(); }
public MvxBindableTableViewCell(IEnumerable<MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(bindingDescriptions, cellStyle, cellIdentifier, tableViewCellAccessory) { InitialiseImageHelper(); }
public MovieCell(UITableViewCellStyle style, string reuseId) : base(style, reuseId) { SelectionStyle = UITableViewCellSelectionStyle.None; _thumbnail = new UIImageView { BackgroundColor = UIColor.Gray }; ContentView.AddSubview(_thumbnail); _movieTitle = new UILabel { TextColor = UIColor.Blue, Font = Fonts.Bold14 }; ContentView.AddSubview(_movieTitle); _freshImg = ImageInitializer.InitImageView(ImgPath.Indicators.FreshSmall); _rottenImg = ImageInitializer.InitImageView(ImgPath.Indicators.RottenSmall); ContentView.AddSubviews(_freshImg, _rottenImg); // _freshImg.Hidden = _rottenImg.Hidden = true; _criticScore = InitInfoLabel(); _actors = InitInfoLabel(); _mppaRuntime = InitInfoLabel(); }
public MenuElementCell(UITableViewCellStyle style) : base(style, Key) { Add(ImageView = new UIImageView(new CGRect(0, 0, ImageWidth, ImageWidth)) { ContentMode = UIViewContentMode.Center, }); }
public MvxStandardTableViewCell(IEnumerable <MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(bindingDescriptions, cellStyle, cellIdentifier, tableViewCellAccessory) { InitialiseImageLoader(); }
public override UITableViewCell GetCell(Xamarin.Forms.Cell item, UITableView tv) { TextCell textCell = (TextCell)item; UITableViewCellStyle style = UITableViewCellStyle.Value1; string text = "Xamarin.Forms.TextCell"; CellTableViewCell cellTableViewCell = tv.DequeueReusableCell(text) as CellTableViewCell; if (cellTableViewCell == null) { cellTableViewCell = new CellTableViewCell(style, text); } else { cellTableViewCell.Cell.PropertyChanged -= new PropertyChangedEventHandler(cellTableViewCell.HandlePropertyChanged); } cellTableViewCell.Cell = textCell; textCell.PropertyChanged += new PropertyChangedEventHandler(cellTableViewCell.HandlePropertyChanged); cellTableViewCell.PropertyChanged = new Action <object, PropertyChangedEventArgs>(this.HandlePropertyChanged); cellTableViewCell.TextLabel.Text = textCell.Text; cellTableViewCell.DetailTextLabel.Text = textCell.Detail; //cellTableViewCell.TextLabel.TextColor = textCell.TextColor.ToUIColor(TextCellRenderer.DefaultTextColor); //cellTableViewCell.DetailTextLabel.TextColor = textCell.DetailColor.ToUIColor(TextCellRenderer.DefaultDetailColor); base.UpdateBackground(cellTableViewCell, item); cellTableViewCell.Accessory = UITableViewCellAccessory.DisclosureIndicator; return(cellTableViewCell); }
public FamilySearchResultCell(UITableViewCellStyle style, string cellIdentifier) : base(style, cellIdentifier) { BackgroundColor = UIColor.Clear; FamilyView = new FamilySearchResultView( ); AddSubview(FamilyView); }
// We need to create our own cell so we can position the image view appropriately protected override UITableViewCell CreateTableViewCell(UITableViewCellStyle style, string key) { if (UsePinnedImage) return new PinnedImageTableViewCell(style, key); else return base.CreateTableViewCell(style, key); }
public PatientTableViewCell(UITableViewCellStyle style, NSString ident, Patient showPatient) : base(style, ident) { this.SelectionStyle = UITableViewCellSelectionStyle.Blue; showPatient.ItemUpdated += (sender, args) => this.UpdateCell(showPatient); this.nameLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; this.companyLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; this.image = new UIImageView(); this.UpdateCell(showPatient); this.ContentView.Add(this.nameLabel); this.ContentView.Add(this.companyLabel); this.ContentView.Add(this.image); }
public PrimaryCell( CGSize parentSize, UITableViewCellStyle style, string cellIdentifier ) : base( style, cellIdentifier ) { BackgroundColor = Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.BG_Layer_Color ); SelectionStyle = UITableViewCellSelectionStyle.None; Image = new UIImageView( ); Image.BackgroundColor = UIColor.Yellow; Image.ContentMode = UIViewContentMode.ScaleAspectFill; Image.Layer.AnchorPoint = CGPoint.Empty; AddSubview( Image ); // Banner Image Image.Image = new UIImage( NSBundle.MainBundle.BundlePath + "/" + PrivateConnectConfig.MainPageHeaderImage ); Image.SizeToFit( ); // resize the image to fit the width of the device nfloat imageAspect = Image.Bounds.Height / Image.Bounds.Width; Image.Frame = new CGRect( 0, 0, parentSize.Width, parentSize.Width * imageAspect ); Title = new UILabel( ); Title.Text = ConnectStrings.Main_Connect_Header; Title.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont( ControlStylingConfig.Font_Bold, ControlStylingConfig.Large_FontSize ); Title.Layer.AnchorPoint = CGPoint.Empty; Title.TextColor = Rock.Mobile.UI.Util.GetUIColor( ControlStylingConfig.TextField_ActiveTextColor ); Title.LineBreakMode = UILineBreakMode.TailTruncation; Title.TextAlignment = UITextAlignment.Center; Title.Frame = new CGRect( 5, Image.Frame.Bottom, parentSize.Width - 10, 0 ); Title.SizeToFit( ); AddSubview( Title ); }
public BadgeTableViewCell(UITableViewCellStyle style, string reuseIdentifier) : base(style, reuseIdentifier) { _badgeView = new BadgeView(new RectangleF(0.0f, 0.0f, 55.0f, 20.0f)); _badgeView.BackgroundColor = UIColor.Clear; _badgeView.BadgeAlignment = BadgeViewAlignment.Right; AccessoryView = _badgeView; }
public MvxTableViewCell(string bindingText, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { Accessory = tableViewCellAccessory; this.CreateBindingContext(bindingText); }
/// <summary> /// Initializes a new instance of the <see cref="PickerCells.PickerViewCell"/> class. /// </summary> /// <param name="items">Items.</param> public PickerViewCell(List <String> items, UITableViewCellStyle style = UITableViewCellStyle.Default) : base(style) { if (items != null) { var simps = new Dictionary <int, PickerViewCellComponent>(); simps[0] = new PickerViewCellComponent() { Width = -1, Items = new List <PickerViewCellItem>() { } }; foreach (var aItem in items) { simps[0].Items.Add(new PickerViewCellItem() { SelectedValue = aItem, DisplayValue = aItem, }); } mDataDict = simps; } SecondarySetup(); }
/// <summary> /// You specify the table style in the constructor when using a UITableViewController /// </summary> public TableScreen (UITableViewStyle tableStyle, UITableViewCellStyle cellStyle , UITableViewCellAccessory cellAccessory) : base (tableStyle) { this.cellStyle = cellStyle; this.cellAccessory = cellAccessory; }
public MvxStandardTableViewCell(IEnumerable<MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(bindingDescriptions, cellStyle, cellIdentifier, tableViewCellAccessory) { this.InitializeImageLoader(); }
public MvxBindableTableViewCell(string bindingText, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { Accessory = tableViewCellAccessory; InitialiseImageHelper(); _bindings = Binder.Bind(null, this, bindingText).ToList(); }
public SeriesCell(UITableViewCellStyle style, string cellIdentifier) : base(style, cellIdentifier) { Image = new UIImageView( ); Image.ContentMode = UIViewContentMode.ScaleAspectFit; Image.Layer.AnchorPoint = CGPoint.Empty; AddSubview(Image); Title = new UILabel( ); Title.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont(ControlStylingConfig.Font_Bold, ControlStylingConfig.Medium_FontSize); Title.Layer.AnchorPoint = CGPoint.Empty; Title.TextColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.Label_TextColor); Title.BackgroundColor = UIColor.Clear; Title.LineBreakMode = UILineBreakMode.TailTruncation; AddSubview(Title); Date = new UILabel( ); Date.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont(ControlStylingConfig.Font_Regular, ControlStylingConfig.Small_FontSize); Date.Layer.AnchorPoint = CGPoint.Empty; Date.TextColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.TextField_PlaceholderTextColor); Date.BackgroundColor = UIColor.Clear; Date.LineBreakMode = UILineBreakMode.TailTruncation; AddSubview(Date); Chevron = new UILabel( ); AddSubview(Chevron); Chevron.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont(PrivateControlStylingConfig.Icon_Font_Secondary, PrivateNoteConfig.Series_Table_IconSize); Chevron.TextColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.TextField_PlaceholderTextColor); Chevron.Text = PrivateNoteConfig.Series_Table_Navigate_Icon; Chevron.SizeToFit( ); Seperator = new UIView( ); AddSubview(Seperator); Seperator.Layer.BorderWidth = 1; Seperator.Layer.BorderColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color).CGColor; }
/// <summary> /// You specify the table style in the constructor when using a UITableViewController /// </summary> public TableScreen(UITableViewStyle tableStyle, UITableViewCellStyle cellStyle , UITableViewCellAccessory cellAccessory) : base(tableStyle) { this._cellStyle = cellStyle; this._cellAccessory = cellAccessory; }
public AspectItem(string text, string detailtext, UITableViewCellStyle style, UITableViewCellAccessory accessory) { Text = text; DetailText = detailtext; Style = style; Accessory = accessory; }
public MenuElement(string title, string detail, UITableViewCellStyle style) : base(title, detail, style) { BackgroundColor = UIColor.Clear; TextColor = UIColor.FromRGB(213, 213, 213); DetailColor = UIColor.White; DetailColor = UIColor.White; }
const int buttonSpace = 45; //24; public SessionCell (UITableViewCellStyle style, NSString ident, Session showSession, string big, string small) : base (style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; titleLabel = new UILabel () { TextAlignment = UITextAlignment.Left, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; speakerLabel = new UILabel () { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha (0f, 0f) }; locationImageView = new UIImageView(); locationImageView.Image = building; button = UIButton.FromType (UIButtonType.Custom); button.TouchDown += delegate { UpdateImage (ToggleFavorite ()); if (AppDelegate.IsPad) { NSObject o = new NSObject(); NSDictionary progInfo = NSDictionary.FromObjectAndKey(o, new NSString("FavUpdate")); NSNotificationCenter.DefaultCenter.PostNotificationName( "NotificationFavoriteUpdated", o, progInfo); } }; UpdateCell (showSession, big, small); ContentView.Add (titleLabel); ContentView.Add (speakerLabel); ContentView.Add (button); ContentView.Add (locationImageView); }
public PatientCell(UITableViewCellStyle style, NSString ident, Patient showSpeaker) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; nameLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; companyLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; image = new UIImageView(); UpdateCell(showSpeaker); ContentView.Add(nameLabel); ContentView.Add(companyLabel); ContentView.Add(image); }
public DefaultTableCellTemplateSelector(UITableViewCellStyle style, Action <UITableViewCell, BindingSet <UITableViewCell, TSource> > initializeTemplate, bool isDefaultCellPropertiesBindable = false) { Should.NotBeNull(initializeTemplate, nameof(initializeTemplate)); _style = style; _initializeTemplate = initializeTemplate; _bindable = isDefaultCellPropertiesBindable; }
public CustomOwnerDrawnElement (UITableViewCellStyle style, string cellIdentifier, UITableViewCellSelectionStyle selectionStyle, UITableViewCellAccessory accesory) : this(style, cellIdentifier) { this.SelectionStyle = selectionStyle; this.Accessory = accesory; }
public DropdownMenuTableViewCell(UITableViewCellStyle style, string reuseIdentifier, DropdownMenuConfiguration configuration) : base(style, reuseIdentifier) { this.Configuration = configuration; // Setup cell CellContentFrame = new CGRect(0, 0, UIScreen.MainScreen.Bounds.Width, this.Configuration.CellHeight); this.ContentView.BackgroundColor = this.Configuration.CellBackgroundColor; this.SelectionStyle = UITableViewCellSelectionStyle.None; this.TextLabel.TextAlignment = UITextAlignment.Left; this.TextLabel.TextColor = this.Configuration.CellTextLabelColor; this.TextLabel.Font = this.Configuration.CellTextLabelFont; this.TextLabel.Frame = new CGRect(20, 0, CellContentFrame.Width, CellContentFrame.Height); // Checkmark icon this.CheckMarkIcon = new UIImageView(new CGRect(CellContentFrame.Width - 50, (CellContentFrame.Height - 30)/2, 30, 30)); this.CheckMarkIcon.Hidden = true; this.CheckMarkIcon.Image = this.Configuration.CheckMarkImage; this.CheckMarkIcon.ContentMode = UIViewContentMode.ScaleAspectFill; this.ContentView.AddSubview (this.CheckMarkIcon); // Separator for cell var separator = new DropdownMenuTableCellContentView(CellContentFrame); separator.BackgroundColor = UIColor.Clear; this.ContentView.AddSubview (separator); }
public GeneralTableViewCell(IEnumerable <MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(bindingDescriptions, cellStyle, cellIdentifier, tableViewCellAccessory) { InitializeImageHelper(); }
public CheckElement( string caption = null, string value = null, UITableViewCellStyle style = UITableViewCellStyle.Value1) : base(caption, value, style) { Checked = false; }
private static Task <DropDownListSelection <T> > ShowInternal <T>( UIView containerView, object anchorUIElement, UITableViewCellStyle itemStyle, UITableViewStyle viewStyle, IEnumerable <T> items, Func <T, GenericCellDescriptor> itemDescriber, string dropDownTitle, UIPopoverArrowDirection arrowDirection, CGSize?fitSize ) { if (itemDescriber == null) { throw new ArgumentNullException("displayNameGetter"); } return(ShowInternal( containerView, anchorUIElement, itemStyle, viewStyle, new [] { items }, (s) => new GenericTableViewSection <T>(dropDownTitle, items), itemDescriber, arrowDirection, fitSize )); }
protected void ConfigureCell(UITableViewCellStyle style, UITableViewCell cell, PlaceAutocompleteAPI_Prediction prediction, int idx) { if (cell != null) { switch (style) { case UITableViewCellStyle.Default: cell.TextLabel.Font = UIFont.FromName("Helvetica Light", 14); cell.TextLabel.AdjustsFontSizeToFitWidth = true; // gets smaller if it doesn't fit cell.TextLabel.MinimumFontSize = 12f; // never gets smaller than this size cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap; cell.TextLabel.Text = prediction.description; break; case UITableViewCellStyle.Subtitle: cell.TextLabel.Font = UIFont.FromName("Helvetica Light", 14); cell.TextLabel.AdjustsFontSizeToFitWidth = true; // gets smaller if it doesn't fit cell.TextLabel.MinimumFontSize = 12f; // never gets smaller than this size cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap; cell.TextLabel.Text = prediction.description; cell.DetailTextLabel.Font = UIFont.FromName("Helvetica Light", 12); cell.DetailTextLabel.Text = String.Join(", ", prediction.types); break; } if (idx % 2 == 0) { cell.BackgroundColor = new UIColor(217.0f / 255.0f, 217.0f / 255.0f, 217.0f / 255.0f, 1.0f); } //string detailedStr = string.Format ("{0:C} | {1}", product.IntroPrice, product.YearIntroduced); //cell.DetailTextLabel.Text = detailedStr; } }
public SpeakerCell(UITableViewCellStyle style, NSString ident, Speaker showSpeaker) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; nameLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = bigFont, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; companyLabel = new UILabel() { TextAlignment = UITextAlignment.Left, Font = smallFont, TextColor = UIColor.DarkGray, BackgroundColor = UIColor.FromWhiteAlpha(0f, 0f) }; image = new UIImageView(); UpdateCell(showSpeaker); ContentView.Add(nameLabel); ContentView.Add(companyLabel); ContentView.Add(image); }
public SWTableViewCell(UITableViewCellStyle style, string reuseIdentifier, UITableView containingTable, IEnumerable <UIButton> rightUtilityButtons, UIView leftView) : base(style, reuseIdentifier) { this.scrollViewLeft = leftView; this.rightUtilityButtons = rightUtilityButtons.ToArray(); this.scrollViewButtonViewRight = new SWUtilityButtonView(this.rightUtilityButtons, this); this.containingTableView = containingTable; this.height = containingTableView.RowHeight; this.scrollViewDelegate = new SWScrollViewDelegate(this); // Check if the UITableView will display Indices on the right. If that's the case, add a padding if (containingTableView.RespondsToSelector(new MonoTouch.ObjCRuntime.Selector("sectionIndexTitlesForTableView:"))) { var indices = containingTableView.Source.SectionIndexTitles(containingTableView); additionalRightPadding = indices == null || indices.Length == 0 ? 0 : SectionIndexWidth; } // Set up scroll view that will host our cell content this.cellScrollView = new UIScrollView(new RectangleF(0, 0, Bounds.Width, height)); //TODO:frames this.cellScrollView.ContentSize = new SizeF(Bounds.Width + this.UtilityButtonsPadding, height); //TODO:frames this.cellScrollView.ContentOffset = ScrollViewContentOffset; this.cellScrollView.Delegate = this.scrollViewDelegate; this.cellScrollView.ShowsHorizontalScrollIndicator = false; this.cellScrollView.ScrollsToTop = false; UITapGestureRecognizer tapGestureRecognizer = new UITapGestureRecognizer(OnScrollViewPressed); this.cellScrollView.AddGestureRecognizer(tapGestureRecognizer); // Set up the views that will hold the utility buttons this.scrollViewLeft.Frame = new RectangleF(ScrollLeftViewWidth, 0, ScrollLeftViewWidth, height); //TODO:frame this.cellScrollView.AddSubview(scrollViewLeft); this.scrollViewButtonViewRight.Frame = new RectangleF(Bounds.Width, 0, RightUtilityButtonsWidth, height); //TODO:frame this.cellScrollView.AddSubview(scrollViewButtonViewRight); // Populate the button views with utility buttons this.scrollViewButtonViewRight.PopulateUtilityButtons(); // Create the content view that will live in our scroll view this.scrollViewContentView = new UIView(new RectangleF(ScrollLeftViewWidth, 0, Bounds.Width, height)); this.scrollViewContentView.BackgroundColor = UIColor.White; this.cellScrollView.AddSubview(this.scrollViewContentView); // Add the cell scroll view to the cell var contentViewParent = Subviews[0]; foreach (var subView in contentViewParent.Subviews) { this.scrollViewContentView.AddSubview(subView); } AddSubview(this.cellScrollView); HideSwipedContent(false); }
protected MvxBaseBindableTableViewSource(UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, IEnumerable <MvxBindingDescription> descriptions, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) { _tableView = tableView; _cellStyle = style; _cellIdentifier = cellIdentifier; _bindingDescriptions = descriptions; _tableViewCellAccessory = tableViewCellAccessory; }
protected MvxBaseBindableTableViewSource(UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, IEnumerable<MvxBindingDescription> descriptions, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) { _tableView = tableView; _cellStyle = style; _cellIdentifier = cellIdentifier; _bindingDescriptions = descriptions; _tableViewCellAccessory = tableViewCellAccessory; }
protected override UITableViewCell CreateTableViewCell(UITableViewCellStyle style, string key) { var cell = new Cell(style, key); cell.ImageView.Layer.MasksToBounds = true; cell.ImageView.TintColor = UIColor.FromRGB(0xd5, 0xd5, 0xd5); return(cell); }
// Create the UIViews that we will use here, layout happens in LayoutSubviews public PhotoCell (UITableViewCellStyle style, NSString ident, List<ImageInfo> filenames, int rowIndex, Action<BuzzPhoto> onPhotoClicked) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.None; photoRowView = new PhotoCellView (filenames, rowIndex, onPhotoClicked); ContentView.Add (photoRowView); }
public MvxBaseBindableTableViewCell(string bindingText, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { Accessory = tableViewCellAccessory; CreateFirstBindAction(bindingText); }
public GenericTableViewCell(UITableViewCellStyle style, string reuseID, CGSize?imageViewSize = null) : base(style, reuseID, false) { _imageViewSize = imageViewSize != null ? imageViewSize.Value : new CGSize(DefaultImageViewWidth, DefaultImageViewHeight); if (ImageView != null) { ImageView.Layer.MasksToBounds = true; } }
public MvxTableViewCell(string bindingText, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { this.Accessory = tableViewCellAccessory; this.CreateBindingContext(bindingText); }
// Create the UIViews that we will use here, layout happens in LayoutSubviews public TweetCell(UITableViewCellStyle style, NSString ident, Tweet tweet) : base(style, ident) { SelectionStyle = UITableViewCellSelectionStyle.Blue; tweetView = new TweetCellView(tweet); UpdateCell(tweet); ContentView.Add(tweetView); }
public MvxBaseBindableTableViewCell(IEnumerable<MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { Accessory = tableViewCellAccessory; CreateFirstBindAction(bindingDescriptions); }
public MvxStandardTableViewSource( UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, string bindingText, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : this(tableView, style, cellIdentifier, ParseBindingText(bindingText), tableViewCellAccessory) { }
public MvxActionBasedTableViewSource(UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, string bindingText, UITableViewCellAccessory tableViewCellAccessory) : base(tableView, style, cellIdentifier, bindingText, tableViewCellAccessory) { Initialize(); }
public MvxActionBasedTableViewSource(UITableView tableView, UITableViewCellStyle style, NSString cellIdentifier, IEnumerable<MvxBindingDescription> descriptions, UITableViewCellAccessory tableViewCellAccessory) : base(tableView, style, cellIdentifier, descriptions, tableViewCellAccessory) { Initialize(); }
public DetailTableViewCell(SizeF size, UITableViewCellStyle style, string reuseIdentifier) : base(style, reuseIdentifier) { //aparte view toevoegen CellDetailView = new UIView(new RectangleF(size.Width / 4 - 15, 0, ((size.Width / 4) * 3), Frame.Height)); CellDetailView.BackgroundColor = UIColor.Clear; Add(CellDetailView); }
public MvxTableViewCell(IEnumerable<MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { Accessory = tableViewCellAccessory; this.CreateBindingContext(bindingDescriptions); }
public VerticalLayoutCell(UITableViewCellStyle style, string reuseIdentifier): base(style, reuseIdentifier) { this.TextLabel.Lines = 0; this.TextLabel.Font = TextFont; if (this.DetailTextLabel!=null) { this.DetailTextLabel.Lines = 0; this.DetailTextLabel.TextColor = UIColor.FromRGB(0.22f, 0.33f, 0.53f); this.DetailTextLabel.Font = DetailTextFont; } }
public PinnedImageTableViewCell(UITableViewCellStyle style, string key) : base(style, key) { this.SeparatorInset = new MonoTouch.UIKit.UIEdgeInsets(0, 48f, 0, 0); ImageView.ContentMode = UIViewContentMode.ScaleAspectFill; // ImageView.Layer.CornerRadius = 4.0f; // ImageView.Layer.MasksToBounds = true; // ImageView.Layer.ShouldRasterize = true; // ImageView.Layer.RasterizationScale = UIScreen.MainScreen.Scale; }
protected UITableViewCell DequeueOrCreateTableCell(UITableView tableView, string cellId, UITableViewCellStyle style) { var cell = tableView.DequeueReusableCell(cellId); if (cell == null) { cell = new UITableViewCell(style, cellId); cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; } return cell; }
public MvxTableViewCell(IEnumerable<MvxBindingDescription> bindingDescriptions, UITableViewCellStyle cellStyle, NSString cellIdentifier, UITableViewCellAccessory tableViewCellAccessory = UITableViewCellAccessory.None) : base(cellStyle, cellIdentifier) { // note that we allow the virtual Accessory property to be set here - but do not seal // it. Previous `sealed` code caused odd, unexplained behaviour in MonoTouch // - see https://github.com/MvvmCross/MvvmCross/issues/524 this.Accessory = tableViewCellAccessory; this.CreateBindingContext(bindingDescriptions); }