Class GenericContainerGenerator<T>
The generic container generator.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll
Syntax
public class GenericContainerGenerator<T> : IContainerGeneratorInternal<T>, IContainerGenerator<T>, IContainerGeneratorInternal, IContainerGenerator
Type Parameters
T
The type being generated for a given item. |
Constructors
GenericContainerGenerator(ISupportContainerGenerator<T>)
Initializes a new instance of the GenericContainerGenerator<T> class.
Declaration
public GenericContainerGenerator(ISupportContainerGenerator<T> host)
Parameters
ISupportContainerGenerator<T>
host
The host. |
Properties
Status
The generation status of the GenericContainerGenerator.
Declaration
public GeneratorStatus Status { get; }
Property Value
GeneratorStatus
|
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
System.Object
item
The item for which the container should be returned. |
Returns
T
The container or |
Implements
Remarks
Use the GenerateContainer(Object) method to generate a container for the item.
GenerateConnectionContainer(IShape, IShape)
Generates the connection container.
Declaration
public T GenerateConnectionContainer(IShape source, IShape target)
Parameters
IShape
source
The source. |
IShape
target
The target. |
Returns
T
|
Implements
GenerateContainer(Object)
Generates the container for the given item.
Declaration
public T GenerateContainer(object item)
Parameters
System.Object
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
public IEnumerable<T> GenerateContainers(IEnumerable items)
Parameters
System.Collections.IEnumerable
items
The items. |
Returns
System.Collections.Generic.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
T
container
The container. |
Returns
System.Object
|
Implements
MapItemToContainer(Object, T)
Maps the item to container.
Declaration
public void MapItemToContainer(object item, T container)
Parameters
System.Object
item
The item. |
T
container
The container. |
Implements
MapItemToRecycledContainer(Object, T)
Maps the item to a recycled container.
Declaration
public void MapItemToRecycledContainer(object item, T container)
Parameters
System.Object
item
The item. |
T
container
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
T
container
The container. |
Implements
RemoveItem(Object)
Removes the item.
Declaration
public void RemoveItem(object item)
Parameters
System.Object
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 Type
System.EventHandler
|
Implements
Explicit Interface Implementations
IContainerGenerator.ContainerFromItem(Object)
Returns the container, if any, from given item.
Declaration
object IContainerGenerator.ContainerFromItem(object item)
Parameters
System.Object
item
The item which corresponds to a container. |
Returns
System.Object
|
Implements
IContainerGenerator.ItemFromContainer(Object)
Returns the item from the given container.
Declaration
object IContainerGenerator.ItemFromContainer(object container)
Parameters
System.Object
container
The container. |
Returns
System.Object
|
Implements
IContainerGeneratorInternal.ClearCache()
Clears the recycled containers cache.
Declaration
void IContainerGeneratorInternal.ClearCache()
Implements
IContainerGeneratorInternal.GenerateConnectionContainer(IShape, IShape)
Generates the connection container.
Declaration
object IContainerGeneratorInternal.GenerateConnectionContainer(IShape source, IShape target)
Parameters
IShape
source
The source of the connection. |
IShape
target
The target of the connection. |
Returns
System.Object
|
Implements
IContainerGeneratorInternal.GenerateContainer(Object)
Generates a container for the given item.
Declaration
object IContainerGeneratorInternal.GenerateContainer(object item)
Parameters
System.Object
item
The item for which to generate a container. |
Returns
System.Object
|
Implements
IContainerGeneratorInternal.GenerateContainers(IEnumerable)
Generates the containers.
Declaration
IEnumerable IContainerGeneratorInternal.GenerateContainers(IEnumerable items)
Parameters
System.Collections.IEnumerable
items
The items for which to generate a container. |
Returns
System.Collections.IEnumerable
|
Implements
IContainerGeneratorInternal.GenerateGeometryShapeContainer()
Generates the geometry shape container.
Declaration
object IContainerGeneratorInternal.GenerateGeometryShapeContainer()
Returns
System.Object
|
Implements
IContainerGeneratorInternal.GenerateShapeContainer()
Generates a shape container.
Declaration
object IContainerGeneratorInternal.GenerateShapeContainer()
Returns
System.Object
|
Implements
IContainerGeneratorInternal.GenerateTextShapeContainer()
Generates a text shape container.
Declaration
object IContainerGeneratorInternal.GenerateTextShapeContainer()
Returns
System.Object
|
Implements
IContainerGeneratorInternal.MapItemToContainer(Object, IDiagramItem)
Maps the item to a container, if any.
Declaration
void IContainerGeneratorInternal.MapItemToContainer(object item, IDiagramItem container)
Parameters
System.Object
item
The item. |
IDiagramItem
container
The container. |
Implements
IContainerGeneratorInternal.MapItemToRecycledContainer(Object, IDiagramItem)
Maps the item to a recycled container.
Declaration
void IContainerGeneratorInternal.MapItemToRecycledContainer(object item, IDiagramItem container)
Parameters
System.Object
item
The item. |
IDiagramItem
container
The recycled container. |
Implements
IContainerGeneratorInternal.RemoveContainer(Object)
Removes the container.
Declaration
void IContainerGeneratorInternal.RemoveContainer(object container)
Parameters
System.Object
container
The container. |