/// <summary> /// Override method to add suitable control. /// </summary> public override void FinishInit() { CheckDisposed(); Debug.Assert(m_cache != null); Debug.Assert(m_configurationNode != null); base.FinishInit(); m_fieldName = XmlUtils.GetManditoryAttributeValue(m_configurationNode, "field"); string className = m_cache.MetaDataCacheAccessor.GetClassName((uint)m_obj.ClassID); m_flid = AutoDataTreeMenuHandler.ContextMenuHelper.GetFlid(m_cache.MetaDataCacheAccessor, className, m_fieldName); MorphTypeAtomicLauncher launcher = new MorphTypeAtomicLauncher(); launcher.Initialize(m_cache, m_obj, m_flid, m_fieldName, null, Mediator, DisplayNameProperty, BestWsName); // TODO: Get better default 'best ws'. launcher.ConfigurationNode = m_configurationNode; // We don't want to be visible until later, since otherwise we get a temporary // display in the wrong place with the wrong size that serves only to annoy the // user. See LT-1518 "The drawing of the DataTree for Lexicon/Advanced Edit draws // some initial invalid controls." Becoming visible when we set the width and // height seems to delay things enough to avoid this visual clutter. launcher.Visible = false; Control = launcher; }