示例#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 (ControlState state in style.Styles.Keys)
            {
                Styles.Add(state, new Style(style.Styles[state]));
            }
        }