skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class GenericContainerGenerator<T>

The generic container generator.

Inheritance
System.Object
GenericContainerGenerator<T>
Namespace: Telerik.Windows.Diagrams.Core
Assembly: Telerik.Windows.Diagrams.Core.dll

Syntax

public class GenericContainerGenerator<T> : Object, 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
IContainerGenerator.Status

Methods

ClearCache()

Clears the recycled containers cache.

Declaration
public void ClearCache()
Implements
IContainerGeneratorInternal<T>.ClearCache()

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 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
public T GenerateConnectionContainer(IShape source, IShape target)
Parameters
IShape source

The source.

IShape target

The target.

Returns
T

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

GenerateContainer(Object)

Generates the container for the given item.

Declaration
public T GenerateContainer(object item)
Parameters
System.Object item

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
public IEnumerable<T> GenerateContainers(IEnumerable items)
Parameters
System.Collections.IEnumerable items

The items.

Returns
System.Collections.Generic.IEnumerable<T>

Implements
IContainerGeneratorInternal<T>.GenerateContainers(IEnumerable)

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
IContainerGenerator<T>.ItemFromContainer(T)

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
IContainerGeneratorInternal<T>.MapItemToContainer(Object, T)

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
IContainerGeneratorInternal<T>.MapItemToRecycledContainer(Object, T)

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
IContainerGeneratorInternal<T>.RemoveContainer(T)

RemoveItem(Object)

Removes the item.

Declaration
public void RemoveItem(object item)
Parameters
System.Object item

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
public event EventHandler StatusChanged
Event Type
System.EventHandler

Implements
IContainerGenerator.StatusChanged

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.ContainerFromItem(Object)

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
IContainerGenerator.ItemFromContainer(Object)

IContainerGeneratorInternal.ClearCache()

Clears the recycled containers cache.

Declaration
void IContainerGeneratorInternal.ClearCache()
Implements
IContainerGeneratorInternal.ClearCache()

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.GenerateConnectionContainer(IShape, IShape)

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.GenerateContainer(Object)

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.GenerateContainers(IEnumerable)

IContainerGeneratorInternal.GenerateGeometryShapeContainer()

Generates the geometry shape container.

Declaration
object IContainerGeneratorInternal.GenerateGeometryShapeContainer()
Returns
System.Object

Implements
IContainerGeneratorInternal.GenerateGeometryShapeContainer()

IContainerGeneratorInternal.GenerateShapeContainer()

Generates a shape container.

Declaration
object IContainerGeneratorInternal.GenerateShapeContainer()
Returns
System.Object

Implements
IContainerGeneratorInternal.GenerateShapeContainer()

IContainerGeneratorInternal.GenerateTextShapeContainer()

Generates a text shape container.

Declaration
object IContainerGeneratorInternal.GenerateTextShapeContainer()
Returns
System.Object

Implements
IContainerGeneratorInternal.GenerateTextShapeContainer()

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.MapItemToContainer(Object, IDiagramItem)

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.MapItemToRecycledContainer(Object, IDiagramItem)

IContainerGeneratorInternal.RemoveContainer(Object)

Removes the container.

Declaration
void IContainerGeneratorInternal.RemoveContainer(object container)
Parameters
System.Object container

The container.

Implements
IContainerGeneratorInternal.RemoveContainer(Object)

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

See Also

IContainerGenerator
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.