# ContainerNodeViewModelBase

Telerik Diagramming Framework provides a list of **ViewModels** defined in the **Telerik.Windows.Controls.Diagrams.Extensions.dll**.

This article describes the **ContainerNodeViewModelBase** defined in the Diagramming Extensions.

## Overview

**ContainerNodeViewModelBase** is a **ViewModel** designed to serve as a base **ViewModel** for **RadDiagramContainerShapes** in a data-bound **RadDiagram**. The class is defined to expose properties that allow you to track and save the state of a ContainerShape in business models. It derives from the  [NodeViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-nodeviewmodel) class and implements the [IContainerItem](http://www.telerik.com/help/wpf/t_telerik_windows_diagrams_core_icontaineritem.html) interface.

ContainerNodeViewModelBase Inheritance Model
![raddiagram-data-containernodeviewmodel](https://www.telerik.com/products/wpf/documentation/assets/acbcad89e5df26cc8b0c1f13849bb4e5/raddiagram-data-containernodeviewmodel.png)

**ContainerNodeViewModelBase** has a single constructor - ContainerNodeViewModelBase() that initializes a new instance of the class.

## Properties

The **ContainerNodeViewModelBase** class exposes the following properties:

Properties:

| Name          | Description                                                                        |
| ------------- | ---------------------------------------------------------------------------------- |
| InternalItems | Gets the internal ObservableCollection of nodes that are wrapped in the container. |

And as the class derives from the **NodeViewModelBase**, it also inherits all of its properties:

Inherited Properties

| Name          | Description                                                                                    |
| ------------- | ---------------------------------------------------------------------------------------------- |
| Width         | Gets or sets a Double value indicating the Width of the represented shape.                     |
| Height        | Gets or sets a Double value indicating the Height of the represented shape.                    |
| RotationAngle | Gets or sets a Double value indicating the rotation angle of the represented shape.            |
| Visibility    | Gets or sets the Visibility of the represented shape. The property is of type Visibility.      |
| Position      | Gets or sets the coordinates of a Point that represents the position of the represented shape. |
| Content       | Gets or sets an object that represents the content of a shape.                                 |
| IsSelected    | Gets or sets a Boolean value indicating whether the represented shape is selected.             |

## Methods

The **ContainerNodeViewModelBase** class exposes the following methods:

| Name       | Description                                          |
| ---------- | ---------------------------------------------------- |
| AddItem    | Adds an object to the InternalItems collection.      |
| RemoveItem | Removes an object from the InternalItems collection. |

## See Also

* [ItemViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-itemviewmodels)
* [NodeViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-nodeviewmodel)
* [LinkViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-linkviewmodel)
* [HierarchicalNodeViewModel](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-hierarchicalnodeviewmodel)
* [GraphSourceBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-graphsourcebase)
* [ObservableGraphSourceBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-observablegraphsource)
* [SerializableGraphSourceBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-serializablegraphsource)
