void UpdateText (FontEntry mEntry) { //FormattedString formattedString = base.Element.FormattedText ?? base.Element.Text; FormattedString formattedString = base.Element.Text; this.view.TextFormatted = formattedString.ToAttributed (Font.Default, base.Element.TextColor, this.view); if (mEntry.Font.FontFamily != null) this.view.Typeface = Typeface.CreateFromAsset (Forms.Context.Assets, string.Format ("{0}.ttf", GetFontFamily(mEntry.Font))); if (mEntry.Font.FontSize > 0) this.view.TextSize = (float)mEntry.Font.FontSize; }
View CreateTwitterEntry () { var twitter = new FontEntry { Font = Font.OfSize(Fonts.OpenSansLight, 14), HeightRequest = 30 }; twitter.Keyboard = Keyboard.Text; twitter.SetBinding (Entry.TextProperty, "Twitter"); return twitter; }
View CreatePhoneEntry () { var phone = new FontEntry { Font = Font.OfSize(Fonts.OpenSansLight, 14), HeightRequest = 30 }; phone.Keyboard = Keyboard.Telephone; phone.SetBinding (Entry.TextProperty, "Phone"); return phone; }
View CreateEmailEntry () { var email = new FontEntry { Font = Font.OfSize(Fonts.OpenSansLight, 14), HeightRequest = 30 }; email.Keyboard = Keyboard.Email; email.SetBinding (Entry.TextProperty, "Email"); return email; }
View CreateCompanyEntry () { var company = new FontEntry { Font = Font.OfSize(Fonts.OpenSansLight, 14), Placeholder = "required", HeightRequest = 30 }; company.Keyboard = Keyboard.Text; company.SetBinding (Entry.TextProperty, "Company"); return company; }
View CreateTitleEntry () { var title = new FontEntry { Font = Font.OfSize(Fonts.OpenSansLight, 14), Placeholder = "required", HeightRequest = 30 }; title.Keyboard = Keyboard.Text; title.SetBinding (Entry.TextProperty, "Title"); return title; }
View CreateLastNameEntry() { var last = new FontEntry { Font = Font.OfSize(Fonts.OpenSansLight, 14), Placeholder = "required", HeightRequest = 30 }; last.Keyboard = Keyboard.Text; last.SetBinding (Entry.TextProperty, "LastName"); return last; }