# NodeViewModelBase

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

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

## Overview

**NodeViewModelBase** is a **ViewModel** designed to serve as a base **ViewModel** for **RadDiagramShapes** in a data-bound **RadDiagram**. The class is defined to expose properties that allow you to track and save the state of a shape in business models. It derives from the  [ItemViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-itemviewmodels) class.

NodeViewModelBase Inheritance Model
![raddiagram-data-nodeviewmodel](https://www.telerik.com/products/wpf/documentation/assets/56a4c97944bbcbee0ab851fa484b0b38/raddiagram-data-nodeviewmodel.png)

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

## Properties

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. |

Inherited Properties

| Name       | Description                                                                                    |
| ---------- | ---------------------------------------------------------------------------------------------- |
| 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.             |

## Serialize NodeViewModelBase With Custom Properties

When specifying custom properties, the name of the properties must differ from the names declared in the **SerializationConstants.cs** class. Otherwise, the serialization mechanism of the RadDiagram won't work as expected.

## See Also

* [ItemViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-itemviewmodels)
* [ContainerNodeViewModelBase](https://www.telerik.com/products/wpf/documentation/controls/raddiagram/diagramextensions-viewmodels/data-containernodeviewmodel)
* [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)
