The generic container generator.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.WinControls.RadDiagram.dll
Type Parameters:
T
The type being generated for a given item.
Syntax:
public class GenericContainerGenerator<T> : IContainerGeneratorInternal<T>, IContainerGenerator<T>, IContainerGeneratorInternal, IContainerGenerator
Inheritance: objectGenericContainerGenerator<T>
Implements:
Constructors
Initializes a new instance of the GenericContainerGenerator<T> class.
public GenericContainerGenerator(ISupportContainerGenerator<T> host)
The host.
Properties
The generation status of the GenericContainerGenerator.
public GeneratorStatus Status { get; }
Implements:
Methods
Clears the recycled containers cache.
public void ClearCache()
Implements:
Returns the container for the given item.
public T ContainerFromItem(object item)
The item for which the container should be returned.
Returns:T
The container or null if the container hasn't been generated.
Implements:
Use the GenerateContainer(object) method to generate a container for the item.
Generates the container for the given item.
public T GenerateContainer(object item)
The item.
Returns:T
Implements:
- If the item is an IShape or an IConnection then the item is its own container.
- If the item implements the ILink interface an IConnection will be returned.
- A generic object (like a string or a control) will have an IShape as container and the item will be put in the Content.
Generates the containers.
public IEnumerable<T> GenerateContainers(IEnumerable items)
The items.
Returns:IEnumerable<T>
Implements:
Generates a geometry shape container.
public T GenerateGeometryShapeContainer()
T
Returns the item for a specific container.
public object ItemFromContainer(T container)
The container.
Returns:Implements:
Maps the item to container.
public void MapItemToContainer(object item, T container)
The item.
containerTThe container.
Implements:
Maps the item to a recycled container.
public void MapItemToRecycledContainer(object item, T container)
The item.
containerTThe recycled container.
Implements:
Raises the status changed event.
protected virtual void OnStatusChanged()
Removes the container.
public void RemoveContainer(T container)
The container.
Implements:
Removes the item.
Events
The StatusChanged event is raised by a view generator to inform controls that its status has changed.
public event EventHandler StatusChanged
Implements: