コード例 #1
0
		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;
		}
コード例 #2
0
		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;
		}
コード例 #3
0
		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;
		}
コード例 #4
0
		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;
		}
コード例 #5
0
		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;
		}
コード例 #6
0
		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;
		}
コード例 #7
0
		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;
		}