void SetTextFont()
 {
     if (label != null && !string.IsNullOrEmpty(Base.TextFontFamily))
     {
         label.Typeface = FontCache.GetTypeFace(Base.TextFontFamily);
     }
 }
 void SetDetailFont()
 {
     if (detailLabel != null && !string.IsNullOrEmpty(Base.DetailFontFamily))
     {
         detailLabel.Typeface = FontCache.GetTypeFace(Base.DetailFontFamily);
     }
 }
예제 #3
0
 void SetTypeface(string fontName)
 {
     if (!string.IsNullOrEmpty(fontName))
     {
         Control.Typeface = FontCache.GetTypeFace(fontName);
     }
 }
 void SetTypeface(MvvmAspire.Controls.Editor element)
 {
     if (!string.IsNullOrEmpty(element.FontFamily))
     {
         Control.Typeface = FontCache.GetTypeFace(element.FontFamily);
     }
 }
 void SetTypeface(MvvmAspire.Controls.FormattedLabelChild element)
 {
     if (!string.IsNullOrEmpty(element.FontFamily))
     {
         var label = (TextView)Control;
         label.Typeface = FontCache.GetTypeFace(element.FontFamily);
     }
 }
예제 #6
0
        void SetTypeface()
        {
            if (!string.IsNullOrEmpty(Element.FontFamily))
            {
                editText.Typeface = FontCache.GetTypeFace(Element.FontFamily);
            }

            editText.TextSize = (float)Element.FontSize;
        }
예제 #7
0
        private void SetTypeface()
        {
            if (!string.IsNullOrEmpty(Element.FontFamily))
            {
                Control.Typeface = FontCache.GetTypeFace(Element.FontFamily);
            }

            Control.TextSize = (int)Math.Round(Element.FontSize);
        }
예제 #8
0
        void SetTypeface()
        {
            if (!string.IsNullOrEmpty(Element.FontFamily))
            {
                textView.Typeface = FontCache.GetTypeFace(Element.FontFamily);
            }

            textView.TextSize = (int)Math.Round(Element.FontSize);
        }
예제 #9
0
 void SetTypeface(string fontName)
 {
     if (!string.IsNullOrEmpty(fontName))
     {
         checkBox.Typeface = FontCache.GetTypeFace(fontName);
     }
     else
     {
         //var font = Resolver.Get<IFontService>().GetFontName(FontStyle.Regular);
         //if (!string.IsNullOrEmpty(font))
         //    checkBox.Typeface = FontCache.GetTypeFace(font);
     }
     //label.TextSize = (float)element.FontSize;
 }
        //public override void ChildDrawableStateChanged(Android.Views.View child)
        //{
        //    base.ChildDrawableStateChanged(child);

        //    Control.Text = Control.Text;
        //    SetTextAlignment(Base);
        //    Control.SetWidth(currentWidth);
        //}

        void SetTypeface()
        {
            if (Base == null || Control == null)
            {
                return;
            }

            if (!string.IsNullOrEmpty(Base.FontFamily))
            {
                var label = (TextView)Control;
                if (label != null)
                {
                    label.Typeface = FontCache.GetTypeFace(Base.FontFamily);
                }
            }
        }
예제 #11
0
        /// <summary>
        /// Tries the set font.
        /// </summary>
        /// <param name="fontName">Name of the font.</param>
        /// <returns>Typeface.</returns>
        private Typeface TrySetFont(string fontName)
        {
            Typeface tf = Typeface.Default;

            try
            {
                return(FontCache.GetTypeFace(fontName));
            }
            catch (Exception ex)
            {
                Console.Write("not found in assets {0}", ex);
                try
                {
                    tf = Typeface.CreateFromFile(fontName);
                    return(tf);
                }
                catch (Exception ex1)
                {
                    Console.Write(ex1);
                    return(Typeface.Default);
                }
            }
        }