Skip to main content

TreeListNodeBase.Content Property

Gets or sets the node’s content.

Namespace: DevExpress.Data.TreeList

Assembly: DevExpress.Data.v22.2.dll

NuGet Package: DevExpress.Data


public virtual object Content { get; set; }

Property Value

Type Description

An object that specifies the node’s content.


Nodes can be specified by objects of different types. The only requirement is that these data objects should have common fields (columns).


This example shows how to manually create a tree (unbound mode). It is shown how to create nodes in XAML and code.

using System;
using System.Windows;
using DevExpress.Xpf.Grid;

namespace TreeListView_UnboundMode {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
        public MainWindow() {

        private void BuildTree() {
            TreeListNode rootNode = CreateRootNode(new ProjectObject() { Name = "Project: Stanton", Executor = "Nicholas Llams" });
            TreeListNode childNode = CreateChildNode(rootNode, new StageObject() { Name = "Information Gathering", Executor = "Ankie Galva" });
            CreateChildNode(childNode, new TaskObject() { Name = "Design", Executor = "Reardon Felton", State = "In progress" });

        private TreeListNode CreateRootNode(object dataObject) {
            TreeListNode rootNode = new TreeListNode(dataObject);
            return rootNode;

        private TreeListNode CreateChildNode(TreeListNode parentNode, object dataObject) {
            TreeListNode childNode = new TreeListNode(dataObject);
            return childNode;

    public class StageObject {
        public String Name { get; set; }
        public string Executor { get; set; }

    public class ProjectObject {
        public String Name { get; set; }
        public string Executor { get; set; }

    public class TaskObject {
        public String Name { get; set; }
        public string Executor { get; set; }
        public string State { get; set; }

The following code snippets (auto-collected from DevExpress Examples) contain references to the Content property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also