Skip to content

Maklith/NodifyM.Avalonia

Repository files navigation

NodifyM.Avalonia

NuGet NuGet License

A collection of controls for node based editors designed for MVVM.

About

This project is a refactoring of Nodify on the Avalonia platform and is not a 1:1 replica of Nodify, but they have many similarities. image image

Features

  • Designed from the start to work with MVVM
  • Built-in dark and light themes
  • Selectingzoomingpanning
  • Select, move, auto align, auto panning when close to edge and connect nodes

What are the differences compared to Nodify

  • Supports
    • auto align Node
    • display text on Connection
    • Select multiple nodes
  • Nonsupport
    • Minimap
  • Will be supported in the future

Usage

NodifyEditor

  • Press and Hold -> Move the all show items
  • Mouse wheel -> Zoom all show items
  • Hold Ctrl and Press Move -> Box select Nodes

Node

  • Press Move and Hold -> Move the Node
  • Press Move and Hold Shift -> Move the Node(without automatically align)
  • Press the Node -> Select the Node
  • Hold Ctrl and Click -> Select or unselect Node
  • Hold Ctrl and Press Move on the selected Node -> Move all selected Nodes

Connection

  • Press and Hold the Connector and move to another Connector -> Create a new connection
  • Hold Alt and Click Connection -> Remove Connection
  • DoubleClick Connection -> Split the connection in the double-click position

PendingConnection

  • Press and Hold the Connector -> Show connection preview

Connector

  • Hold Alt and Click Connector -> Remove all the Connections on the Connector

Notice

  1. ViewModelBase is for reference only, you don't need to use it, there are binding methods in Example's AXAML code.

Some known problems

  1. Do not use Mode=OneWayToSource when you have multiple Nodify bound to the same ViewModel, this is a bug from Avalonia

Example

You can git clone the project and run NodifyM.Avalonia.Example

Changelog

1.1.7

  • Prevent auto-panning when not dragging a node

1.1.6

  • Implement dragging the corner of a single node to zoom

1.1.5

  • Fixed an incorrect zoom center compensation calculation

1.1.4

  • Add binding support for NodifyEditor.SelectedItems
  • Change Property from DataTemplate to IDataTemplate interface.

1.1.3

  • Fixed NuGet contains a reference to Avalonia.Diagnostics

1.1.2

  • Refactor NodifyEditor to improve transform handling (#13)

1.1.1

  • Fix Zoom property only binds one-way
  • Add ZoomCenter property

1.1.0

  • Support box selection and multiple selection
  • Fixed memory leaks

....

About

A collection of controls for node based editors designed for MVVM.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages