NanoByte.StructureEditor 0.7.2

.NET 6.0 .NET Framework 4.5
dotnet add package NanoByte.StructureEditor --version 0.7.2
NuGet\Install-Package NanoByte.StructureEditor -Version 0.7.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NanoByte.StructureEditor" Version="0.7.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NanoByte.StructureEditor --version 0.7.2
#r "nuget: NanoByte.StructureEditor, 0.7.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install NanoByte.StructureEditor as a Cake Addin
#addin nuget:?package=NanoByte.StructureEditor&version=0.7.2

// Install NanoByte.StructureEditor as a Cake Tool
#tool nuget:?package=NanoByte.StructureEditor&version=0.7.2

NanoByte Structure Editor

Build NuGet API documentation
NanoByte Structure Editor is a WinForms library that helps you build split-screen editors for your data structures, consisting of:

  1. a collapsible tree-view of the data structure,
  2. a graphical editor for the currently selected node in the tree (PropertyGrid or custom) and
  3. a text editor (based on ICSharpCode.TextEditor) with a serialized (XML) representation of the currently selected node.

This allows you to create an IDE-like experience for your users when editing complex domain specific languages, configuration files, etc..



Add a reference to the NanoByte.StructureEditor.WinForms NuGet package to your project. It is available for .NET Framework 2.0+ and .NET 6.0+.


Create an instance of StructureEditor<T> and add it to your Form:

var editor = new StructureEditor<MyData>();

Alternatively, you may want to derive your own class from StructureEditor<T>. This will allow you to use the graphical WinForms designer in Visual Studio (which does not support generic types) to place the Editor on your Form.

public class MyDataEditor : StructureEditor<MyData>

You need to "describe" your data structure to the Editor. You can do this directly after instantiating the editor or in the constructor of your derived class.

  • Call DescribeRoot() and then use the fluent API provided as a return value to describe the properties on your main data type.
  • Call Describe<TContainer>() to describe the properties on a data type TContainer exposed by another property. You can use multiple calls with different type parameters to describe arbitrarily deep hierarchies.

The fluent API provides the following methods:

  • .AddProperty() describes a simple value property.
  • .AddPlainList() describes a non-polymorphic list.
  • .AddList() describes a polymorphic list. After calling it you need to chain .AddElement() calls for each specific type of element the list can hold.

There are numerous overloads for each of these methods, e.g., allowing you to specify a custom editor control for a data type or to keep the auto-generated one.

editor.DescribeRoot("Address Book")
      .AddPlainList("Group", x => x.Groups);
      .AddPlainList("Contact", x => x.Contacts);
      .AddProperty("Home Address", x => PropertyPointer.For(() => x.HomeAddress))
      .AddProperty("Work Address", x => PropertyPointer.For(() => x.WorkAddress))
      .AddList(x => x.PhoneNumbers)
      .AddElement("Landline Number", new LandlineNumber())
      .AddElement("Mobile Number", new MobileNumber());


Use the Open() method to load an XML file into the editor:


Use the Save() method on the CommandManager property to save the editor's content as an XML file:


Take a look a the sample project for a more complete setup, including undo/redo functionality.


The source code is in src/, config for building the API documentation is in doc/ and generated build artifacts are placed in artifacts/. The source code does not contain version numbers. Instead the version is determined during CI using GitVersion.

To build install Visual Studio 2022 or newer and run .\build.ps1.


We welcome contributions to this project such as bug reports, recommendations and pull requests.

This repository contains an EditorConfig file. Please make sure to use an editor that supports it to ensure consistent code style, file encoding, etc.. For full tooling support for all style and naming conventions consider using JetBrains' ReSharper or Rider products.

Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 net481
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on NanoByte.StructureEditor:

Package Downloads

WinForms controls for building split-screen editors for data structures

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.7.2 116 2/21/2023
0.7.1 150 1/30/2023
0.7.0 127 1/30/2023
0.6.1 136 1/30/2023
0.6.0 193 11/28/2022
0.5.10 248 10/16/2022
0.5.9 244 10/16/2022
0.5.8 260 9/20/2022
0.5.7 263 9/5/2022
0.5.6 298 7/20/2022
0.5.5 301 6/12/2022
0.5.4 309 5/18/2022
0.5.3 308 4/4/2022
0.5.2 340 2/24/2022
0.5.1 323 1/21/2022
0.5.0 216 12/6/2021
0.4.15 876 11/29/2021
0.4.14 242 10/18/2021
0.4.13 268 9/13/2021
0.4.12 254 8/28/2021
0.4.11 242 8/27/2021
0.4.10 276 5/5/2021
0.4.9 259 4/22/2021
0.4.8 260 4/19/2021
0.4.7 249 3/20/2021
0.4.6 244 3/9/2021
0.4.5 248 3/9/2021
0.4.4 237 3/9/2021
0.4.3 256 2/7/2021
0.4.2 307 1/24/2021
0.4.1 381 11/30/2020
0.4.0 352 11/21/2020
0.3.3 461 10/1/2020
0.3.2 453 7/19/2020
0.3.1 502 5/24/2020
0.3.0 552 1/8/2020
0.2.3 405 10/17/2019
0.2.2 415 7/25/2019
0.2.1 461 5/20/2019
0.2.0 444 4/2/2019
0.1.0 519 2/4/2019