/// <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)); } }
/// <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])); } }