public HeliosVisual CreateControl(string typeIdentifier) { HeliosVisual control = null; HeliosDescriptor descriptor = _controlDescriptors[typeIdentifier]; if (descriptor != null) { control = (HeliosVisual)Activator.CreateInstance(descriptor.ControlType); } return(control); }
public HeliosVisualRenderer CreaterRenderer(HeliosVisual visual) { HeliosVisualRenderer renderer = null; Type visualType = visual.GetType(); HeliosDescriptor descriptor = _controlDescriptors[visualType]; if (descriptor != null) { renderer = (HeliosVisualRenderer)Activator.CreateInstance(descriptor.Renderer); renderer.Visual = visual; } return(renderer); }