/// <summary> /// Sets control of the object /// </summary> /// <param name="categoryObject">The object</param> /// <param name="control">The control</param> /// <returns>True in case of succces and false otherwise</returns> static public bool SetControl(this ICategoryObject categoryObject, Control control) { IUIFactory factory = StaticExtensionDiagramUIFactory.UIFactory; IObjectLabelUI label = factory.CreateLabel(categoryObject); if (label == null) { return(false); } label.SetControl(control); return(true); }