Class
GenericContainerGenerator<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:

cs-api-definition
public class GenericContainerGenerator<T> : IContainerGeneratorInternal<T>, IContainerGenerator<T>, IContainerGeneratorInternal, IContainerGenerator

Inheritance: objectGenericContainerGenerator<T>

Implements: IContainerGeneratorIContainerGenerator<T>IContainerGeneratorInternalIContainerGeneratorInternal<T>

Constructors

GenericContainerGenerator(ISupportContainerGenerator<T>)

Initializes a new instance of the GenericContainerGenerator<T> class.

Declaration

cs-api-definition
public GenericContainerGenerator(ISupportContainerGenerator<T> host)

Parameters

host

ISupportContainerGenerator<T>

The host.

Properties

Status

The generation status of the GenericContainerGenerator.

Declaration

cs-api-definition
public GeneratorStatus Status { get; }

Property Value

GeneratorStatus

Implements IContainerGenerator.Status

Methods

ClearCache()

Clears the recycled containers cache.

Declaration

cs-api-definition
public void ClearCache()

Implements IContainerGeneratorInternal<T>.ClearCache()

ContainerFromItem(object)

Returns the container for the given item.

Declaration

cs-api-definition
public T ContainerFromItem(object item)

Parameters

item

object

The item for which the container should be returned.

Returns

T

The container or null if the container hasn't been generated.

Implements IContainerGenerator<T>.ContainerFromItem(object)

Remarks

Use the GenerateContainer(object) method to generate a container for the item.

GenerateConnectionContainer(IShape, IShape)

Generates the connection container.

Declaration

cs-api-definition
public T GenerateConnectionContainer(IShape source, IShape target)

Parameters

source

IShape

The source.

target

IShape

The target.

Returns

T

Implements IContainerGeneratorInternal<T>.GenerateConnectionContainer(IShape, IShape)

GenerateContainer(object)

Generates the container for the given item.

Declaration

cs-api-definition
public T GenerateContainer(object item)

Parameters

item

object

The item.

Returns

T

Implements IContainerGeneratorInternal<T>.GenerateContainer(object)

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

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
public IEnumerable<T> GenerateContainers(IEnumerable items)

Parameters

items

IEnumerable

The items.

Returns

IEnumerable<T>

Implements IContainerGeneratorInternal<T>.GenerateContainers(IEnumerable)

GenerateGeometryShapeContainer()

Generates a geometry shape container.

Declaration

cs-api-definition
public T GenerateGeometryShapeContainer()

Returns

T

ItemFromContainer(T)

Returns the item for a specific container.

Declaration

cs-api-definition
public object ItemFromContainer(T container)

Parameters

container

T

The container.

Returns

object

Implements IContainerGenerator<T>.ItemFromContainer(T)

MapItemToContainer(object, T)

Maps the item to container.

Declaration

cs-api-definition
public void MapItemToContainer(object item, T container)

Parameters

item

object

The item.

container

T

The container.

Implements IContainerGeneratorInternal<T>.MapItemToContainer(object, T)

MapItemToRecycledContainer(object, T)

Maps the item to a recycled container.

Declaration

cs-api-definition
public void MapItemToRecycledContainer(object item, T container)

Parameters

item

object

The item.

container

T

The recycled container.

Implements IContainerGeneratorInternal<T>.MapItemToRecycledContainer(object, T)

OnStatusChanged()

Raises the status changed event.

Declaration

cs-api-definition
protected virtual void OnStatusChanged()

RemoveContainer(T)

Removes the container.

Declaration

cs-api-definition
public void RemoveContainer(T container)

Parameters

container

T

The container.

Implements IContainerGeneratorInternal<T>.RemoveContainer(T)

RemoveItem(object)

Removes the item.

Declaration

cs-api-definition
public void RemoveItem(object item)

Parameters

item

object

The item.

Implements IContainerGeneratorInternal.RemoveItem(object)

Events

StatusChanged

The StatusChanged event is raised by a view generator to inform controls that its status has changed.

Declaration

cs-api-definition
public event EventHandler StatusChanged

Event Value

EventHandler

Implements IContainerGenerator.StatusChanged