Defines the appearance of the item.
For a list of all members of this type, see ItemAppearance Members.
System.Object
Sitecore.Data.Appearance
Sitecore.Data.Items.ItemAppearance
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Appearance defines how the item appears in the Sitecore client.
The Icon property provides the item with a graphical representation.
The Style property defines the CSS style that is applied to item when displayed in the content tree.
The following example builds a listview control containing icons for each version of an item.
public void DisplayVersions(Control parent, Item item) {
foreach (Item version in item.Versions.GetVersions()) {
ListviewItem listviewItem = new ListviewItem();
Sitecore.Context.ClientPage.AddControl(parent, listviewItem);
listviewItem.ID = "Version" + version.Version.Number.ToString();
listviewItem.Header = version.Version.Number.ToString();
listviewItem.Icon = version.Appearance.Icon;
}
}
Namespace: Sitecore.Data.Items
Assembly: Sitecore.Kernel (in Sitecore.Kernel.dll)
ItemAppearance Members | Sitecore.Data.Items Namespace