public override void Start() { _xmlValidationManager = XmlValidationManager.Instance; // try to load existing rules // if this fails, an exception will be thrown, preventing this component from starting var rules = CollectionUtils.Map(_xmlValidationManager.GetRules(_applicationComponentClass), (XmlElement node) => new Rule(node.OuterXml, _liveComponent)); _rules.Items.AddRange(rules); _componentProperties = CollectionUtils.Select(_applicationComponentClass.GetProperties(), p => !p.DeclaringType.Equals(typeof(IApplicationComponent)) && !p.DeclaringType.Equals(typeof(ApplicationComponent))); _rulesActionModel = new CrudActionModel(true, false, true); _rulesActionModel.Add.SetClickHandler(AddNewRule); _rulesActionModel.Delete.SetClickHandler(DeleteSelectedRule); _rulesActionModel.Delete.Enabled = false; _editor = CodeEditorFactory.CreateCodeEditor(); _editor.Language = "xml"; _editorHost = new ChildComponentHost(this.Host, _editor.GetComponent()); _editorHost.StartComponent(); base.Start(); }