/// ------------------------------------------------------------------------------------ /// <summary> /// Raises the handle created event. /// </summary> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event /// data.</param> /// ------------------------------------------------------------------------------------ protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (m_styleTable.Count == 0) { FillStyleList(); } // Mark the current styles m_styleListHelper.MarkCurrentStyle(m_paraStyleName); m_styleListHelper.MarkCurrentStyle(m_charStyleName); // Select the current paragraph style in the list if (m_fCanApplyParagraphStyle && m_paraStyleName != null) { m_styleListHelper.SelectedStyleName = m_paraStyleName; } else if (m_fCanApplyCharacterStyle) { if (m_charStyleName != null) { m_styleListHelper.SelectedStyleName = m_charStyleName; } else { m_styleListHelper.SelectedStyleName = StyleUtils.DefaultParaCharsStyleName; } } }