wxr
2020-01-10 1a4b95a7ebef71838bd3eda2c22056bbf0db65ec
Shared.IOS/UI/Button.cs
@@ -2,6 +2,7 @@
using Foundation;
using Shared.IO;
using System;
using CoreGraphics;
namespace Shared
{
@@ -101,6 +102,42 @@
        }
        /// <summary>
        /// 是否显示粗体
        /// </summary>
        bool isBold;
        public bool IsBold
        {
            get
            {
                return isBold;
            }
            set
            {
                isBold = value;
                if (isBold)
                {
                    iosButton.TitleLabel.Font = UIFont.FromName("Helvetica-Bold", mTextSize);
                }
                else
                {
                    iosButton.TitleLabel.Font = UIFont.FromName("Helvetica", mTextSize);
                }
            }
        }
        /// <summary>
        /// 获取字体长度
        /// </summary>
        public int GetTextWidth()
        {
            int textWidth = 0;
            CGSize fontSize = this.Text.StringSize(iosButton.TitleLabel.Font);
            textWidth = (int)fontSize.Width;
            return textWidth;
        }
        /// <summary>
        /// 创新需要创新的信息
        /// </summary>
        public override void Refresh()
@@ -109,11 +146,12 @@
         IsSelected = isSelected;
      }
      /// <summary>
      /// 文字大小,默认12
      /// </summary>
      /// <value>The size of the text.</value>
      public float TextSize
        float mTextSize = Application.FontSize;
        /// <summary>
        /// 文字大小,默认12
        /// </summary>
        /// <value>The size of the text.</value>
        public float TextSize
      {
         get
         {
@@ -121,6 +159,7 @@
         }
         set
         {
                mTextSize = value;
                iosButton.TitleLabel.Font = UIFont.FromName(FontName, value);
         }
      }
@@ -154,11 +193,11 @@
      }
      uint selecteTextColor = 0xFFFFFFFF;
/// <summary>
/// 文字颜色
/// </summary>
/// <value>The color of the text.</value>
public uint SelectedTextColor
        /// <summary>
        /// 文字颜色
        /// </summary>
        /// <value>The color of the text.</value>
        public uint SelectedTextColor
      {
         get
         {