public OriginalStyleHelper AddCustomStyle(StyleItem item)
        {
            if (item == null || item.IsNullOrWhiteSpace())
            {
                return(this);
            }

            return(this.AddCustomStyle(item.StyleName, item.Value));
        }
        public OriginalStyleHelper RemoveCustomStyle(StyleItem item)
        {
            if (item == null || item.IsNullOrWhiteSpace())
            {
                return(this);
            }

            return(this.RemoveCustomStyle(item.StyleName));
        }
 public OriginalStyleHelper AddOrUpdateCustomStyle(StyleItem item)
 {
     if (item == null || item.IsNullOrWhiteSpace())
     {
         return(this);
     }
     if (_customStyle.ContainsKey(item.StyleName))
     {
         _customStyle[item.StyleName] = item.Value;
     }
     else
     {
         AddCustomStyle(item);
     }
     return(this);
 }
 public OriginalStyleHelper AddDiffCustomStyle(StyleItem whenSuccess, StyleItem whenFailed, Func <bool> condition)
 {
     if (whenSuccess == null || whenFailed == null || whenSuccess.IsNullOrWhiteSpace() || whenFailed.IsNullOrWhiteSpace() || condition == null)
     {
         return(this);
     }
     if (condition())
     {
         AddCustomStyle(whenSuccess);
     }
     else
     {
         AddCustomStyle(whenFailed);
     }
     _styleData = null;
     return(this);
 }