/// <summary> /// Creates a style in a context of control and parent. If an attribute is not defined in this instance it is tried to be fetched from parent. /// If parent is not available then control context is used if it is not null for some properties like Font and BGColor. Both context and parent may be null /// </summary> public Style(Control contextCtl, Style parent) { m_ContextControl = contextCtl; m_Parent = parent; }
/// <summary> /// Copies attributes from another style /// </summary> public void Assign(Style from) { m_HAlignment = from.m_HAlignment; m_BGKind = from.m_BGKind; m_BGColor = from.m_BGColor; m_BGColor2 = from.m_BGColor2; m_BGHatchColor = from.m_BGHatchColor; m_BGHatchStyle = from.m_BGHatchStyle; m_Padding = from.m_Padding; m_BorderLeft = from.m_BorderLeft; m_BorderRight = from.m_BorderRight; m_BorderTop = from.m_BorderTop; m_BorderBottom = from.m_BorderBottom; m_Font = from.m_Font; }