Introduction
The following example shows how to create the component container used
for adding personalized gadgets:
CopyC#
using System;
using System.Collections.Generic;
namespace EPiServer.Shell.ViewComposition.Containers
{
[Component(IsAvailableForUserSelection = false)]
public class ComponentContainer : ContainerBase
{
public ComponentContainer() : base("epi.shell.widget.layout.ComponentContainer") { }
protected ComponentContainer(string widgetType) : base(widgetType)
{
Settings.Add(new Setting("numberOfColumns", 1));
Settings.Add(new Setting("showToolbar", true));
Settings.Add(new Setting("containerUnlocked", false));
Settings.Add(new Setting("closable", false));
Settings.Add(new PersonalizableSetting("componentCategory"));
}
public virtual string ComponentCategory
{
get
{
return Settings["componentCategory"] as string;
}
set
{
Settings["componentCategory"] = value;
}
}
}
}