public static ControlRepository Instance(ObjectInspectorTree inspector)
        {
            if (ControlRepositories.ContainsKey(inspector))
            {
                return(ControlRepositories[inspector]);
            }
            var instance = new ControlRepository();

            ControlRepositories.Add(inspector, instance);
            return(instance);
        }
        private void FillCategoryLinks(BarSubItem barSubItem,
                                       IEnumerable <Tuple <string, Type, string, IEnumerable <EnabledItems> > > handlers)
        {
            foreach (var handler in handlers)
            {
                var item = new BarButtonItem
                {
                    Caption = handler.Item1
                };

                var handler1 = handler;
                item.ItemClick += (sender, args) =>
                {
                    var propertiesNode = ControlRepository.CreateControl(handler1);

                    AfterCreateControlHandler(propertiesNode);
                };
                barSubItem.ItemLinks.Add(item);
            }
        }