Пример #1
0
        /// <summary>
        /// Pastes the specified style.
        /// </summary>
        /// <param name="style">The style.</param>
        public void Paste(Style style)
        {
            Styles = new StyleCollection();

            foreach (ControlState state in Enum.GetValues(typeof(ControlState)))
            {
                Styles.Add(state, new Style(style));
            }
        }
Пример #2
0
        /// <summary>
        /// Pastes the specified style.
        /// </summary>
        /// <param name="style">The style.</param>
        public void Paste(ControlStyle style)
        {
            Styles = new StyleCollection();

            foreach (var state in style.Styles.Keys)
            {
                Styles.Add(state, new Style(style.Styles[state]));
            }
        }