public string GetContent(TabstripItemContainer container)
        {
            var contentSpecifications = GetContentSpecifications();
            var contentSpecifier      = contentSpecifications.First(specification => specification.IsSatisifiedBy(container));

            return(contentSpecifier.GetContent(container));
        }
Exemple #2
0
 public TabstripItemContentConfigurator(ITabstripItemConfigurator configurator, TabstripItemContainer container)
 {
     configurator.Guard("ITabstripItemConfigurator must not be null.");
     container.Guard("TabstripItemContainer must not be null.");
     _configurator = configurator;
     _container    = container;
 }
Exemple #3
0
        private void CreatePanelbarItem(TabStripItemFactory item, TabstripItemContainer tabstripItemContainer, ITabContentSpecificationProcessor specificationProcessor)
        {
            var content = specificationProcessor.GetContent(tabstripItemContainer);

            item.Add().Text(tabstripItemContainer.Title).Selected(tabstripItemContainer.Selected)
            .Content(content);
        }
        public ITabstripItemContentConfigurator TabItemFor(string tabstripTitle)
        {
            tabstripTitle.Guard("Title must not be not null or empty.");
            var item = new TabstripItemContainer(_configurationContainer.UpdateTabItems)
            {
                Title = tabstripTitle,
            };

            _configurationContainer.AddItemTabstrip(item);
            return(new TabstripItemContentConfigurator(this, item));
        }
 public bool IsSatisifiedBy(TabstripItemContainer container)
 {
     return((container.Content as MvcHtmlString) != null);
 }
        public string GetContent(TabstripItemContainer container)
        {
            var content = (MvcHtmlString)container.Content;

            return(string.Format("<br/>{0}<br/>", content.ToHtmlString()));
        }
 public bool IsSatisifiedBy(TabstripItemContainer container)
 {
     return((container.Content as Func <object, object>) != null);
 }
        public string GetContent(TabstripItemContainer container)
        {
            var content = (Func <object, object>)container.Content;

            return(string.Format("<br/>{0}<br/>", content(new object())));
        }
Exemple #9
0
 public void AddItemTabstrip(TabstripItemContainer item)
 {
     _content.Add(item);
 }