Lifeisforu.NodeGraph 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Lifeisforu.NodeGraph --version 0.2.1                
NuGet\Install-Package Lifeisforu.NodeGraph -Version 0.2.1                
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="Lifeisforu.NodeGraph" Version="0.2.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Lifeisforu.NodeGraph --version 0.2.1                
#r "nuget: Lifeisforu.NodeGraph, 0.2.1"                
#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 Lifeisforu.NodeGraph as a Cake Addin
#addin nuget:?package=Lifeisforu.NodeGraph&version=0.2.1

// Install Lifeisforu.NodeGraph as a Cake Tool
#tool nuget:?package=Lifeisforu.NodeGraph&version=0.2.1                

NodeGraph

WPF control librarty for node graph.

Sample Project : https://github.com/lifeisforu/NodeGraph/raw/master/Documents/NodeGraphSamples.zip

한국분은 An introduction for WPF NodeGraph( Korean ) 를 참고하세요.

This library is inspired by a BlueprintEditor of UnrealEngine4. Below image shows a snapshot of a sample using this library. It makes two integers as array, and print values in top-left corner of screen during loop.

alternate text is missing from this package README image

A node can be divided as 3 parts, shown in below image; Node itself, FlowPorts, PropertyPorts.

alternate text is missing from this package README image

  • A FlowPort is used for specifying a execution flow between two nodes. The connection can be made for a FlowPort with different direction. For example, an input FlowPort can be connected with an output FlowPort.
  • A PropertyPort is used for specifying data-transfer between two nodes. The connection can be made for a PropertyPort with differenct direction. For example, an input PropertyPort can be connected with an output PropertyPort.

Features

This provide below features:

  • Creating/Destroying FlowChart.
  • Creating/Destroying Node.
  • Custom Node ViewModel and Styling.
  • Creating/Destroying NodeFlowPort.
  • Custom NodeFlowPort ViewModel and Styling.
  • Supporting PropertyEditor for default types( bool, byte, short, int, long, float, double, string, enum, Media.Color, etc. I will add more type editors in the future and have a plan to support custom editor ).
  • Creating/Destroying NodePropertyPort.
  • Custom NodePropertyPort ViewModel and Styling.
  • Creating/Destroying Connector.
  • Custom Connector ViewModel and Styling.
  • Supporting Zoom & Pan.
  • Supporting miscellaneous selection mode.
  • Supporting History( undo/redo ).
  • Serialization/Deserialization for XML.

Install

First, in solution explorer, open context menu and select "Manage Nuget Packages...".

alternate text is missing from this package README image

And, in filter text box, search "nodegraph" and press a "Install" button.

alternate text is missing from this package README image

Then, popup window will be opened. And it shows you that "Lifeisforu.NodeGraph" and "PropertyTools.Wpf" will be installed.

alternate text is missing from this package README image

And then assemblies will be added in "References".

alternate text is missing from this package README image

Controlling

Connection

  • Drag-Drop between ports : Connects.
  • Ctrl + Left on port : Disconnects.

Selection

  • Left : Select node and deselect all.

  • Ctrl + Left : XOR selection.

  • Shift + Left : Additive selection.

  • Alt + Left : Subtractive selection.

  • Ctrl + Left Dragging : XOR selection.

  • Shift + Left Dragging : Additive selection.

  • Alt + Left Dragging: Subtractive selection.

  • Ctrl + "A" : Select all nodes.

Deletion

  • "Delete" : Delete selected nodes.

Zoom & Pan

  • "F" : Focus selected nodes.
  • "A" : Focus all nodes.
  • Right Dragging on flowchart : Panning.

Class Diagram

NodeGraph supports MVVM( Model-View-ViewModel ) pattern.

alternate text is missing from this package README image

All Model classes have their own attribute. I'll explain it later, all attributes could override ViewModel.

If you don't need special ViewModel or View, you can create node with basic appearances and behaviors just by adding attributes.

Conclusion

Elements of NodeGraph are categorized by Model-View-ViewModel. ALL Model instances are created by NodeGraphManager, it also create ViewModel instances. And ViewModels determine their Views.

Model class specify type of ViewModel, and appearances info is determined statically by attributes or dynamically by calling methods of NodeGraphManager.

If you want to see more details, visit https://github.com/lifeisforu/NodeGraph.

Product Compatible and additional computed target framework versions.
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.2 1,102 3/24/2019
0.3.1 586 3/6/2019
0.3.0 572 3/4/2019
0.2.2 592 3/4/2019
0.2.1 558 3/3/2019
0.2.0 583 3/3/2019
0.1.0 617 3/3/2019

First upload