ClassGenericContainerGenerator<T>
The generic container generator.
Definition
Namespace:Telerik.Windows.Diagrams.Core
Assembly:Telerik.Windows.Diagrams.Core.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
GenericContainerGenerator(ISupportContainerGenerator<T>)
Initializes a new instance of the GenericContainerGenerator<T> class.
Declaration
public GenericContainerGenerator(ISupportContainerGenerator<T> host)
Parameters
host
The host.
Properties
Status
The generation status of the GenericContainerGenerator.
Declaration
public GeneratorStatus Status { get; }
Property Value
Implements
Methods
ClearCache()
Clears the recycled containers cache.
Declaration
public void ClearCache()
Implements
ContainerFromItem(object)
Returns the container for the given item.
Declaration
public T ContainerFromItem(object item)
Parameters
item
The item for which the container should be returned.
Returns
T
The container or null if the container hasn't been generated.
Implements
Remarks
Use the GenerateContainer(object) method to generate a container for the item.
GenerateConnectionContainer(IShape, IShape)
Generates the connection container.
GenerateContainer(object)
Generates the container for the given item.
Declaration
public T GenerateContainer(object item)
Parameters
item
The item.
Returns
T
Implements
Remarks
- 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.
GenerateContainers(IEnumerable)
Generates the containers.
Declaration
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public IEnumerable<T> GenerateContainers(IEnumerable items)
Parameters
items
The items.
Returns
IEnumerable<T>
Implements
GenerateGeometryShapeContainer()
Generates a geometry shape container.
Declaration
public T GenerateGeometryShapeContainer()
Returns
T
ItemFromContainer(T)
Returns the item for a specific container.
Declaration
public object ItemFromContainer(T container)
Parameters
container
T
The container.
Returns
Implements
MapItemToContainer(object, T)
Maps the item to container.
Declaration
public void MapItemToContainer(object item, T container)
Parameters
item
The item.
container
T
The container.
Implements
MapItemToRecycledContainer(object, T)
Maps the item to a recycled container.
Declaration
public void MapItemToRecycledContainer(object item, T container)
Parameters
item
The item.
container
T
The recycled container.
Implements
OnStatusChanged()
Raises the status changed event.
Declaration
protected virtual void OnStatusChanged()
RemoveContainer(T)
Removes the container.
Declaration
public void RemoveContainer(T container)
Parameters
container
T
The container.
Implements
RemoveItem(object)
Removes the item.
Declaration
public void RemoveItem(object item)
Parameters
item
The item.
Implements
Events
StatusChanged
The StatusChanged event is raised by a view generator to inform controls that its status has changed.
Declaration
public event EventHandler StatusChanged
Event Value
Implements