Exemplo n.º 1
0
        /// <summary>
        /// Adds the style by specified <see cref="StyleCollection"/> instance that satisfied condition.
        /// </summary>
        /// <param name="condition">The condition should be satisfiled.</param>
        /// <param name="styles">The instance of <see cref="StyleCollection"/> class.</param>
        public Style Add(bool condition, StyleCollection styles)
        {
            if (styles is null)
            {
                throw new ArgumentNullException(nameof(styles));
            }

            foreach (var item in styles.Styles)
            {
                Add(condition, item.Key, item.Value);
            }
            return(this);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds the style by specified <see cref="StyleCollection"/> instance.
 /// </summary>
 /// <param name="styles">The instance of <see cref="StyleCollection"/> class.</param>
 public Style Add(StyleCollection styles)
 => Add(true, styles);