MxPlot.UI.Avalonia 0.4.0

dotnet add package MxPlot.UI.Avalonia --version 0.4.0
                    
NuGet\Install-Package MxPlot.UI.Avalonia -Version 0.4.0
                    
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="MxPlot.UI.Avalonia" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MxPlot.UI.Avalonia" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="MxPlot.UI.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MxPlot.UI.Avalonia --version 0.4.0
                    
#r "nuget: MxPlot.UI.Avalonia, 0.4.0"
                    
#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.
#:package MxPlot.UI.Avalonia@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MxPlot.UI.Avalonia&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=MxPlot.UI.Avalonia&version=0.4.0
                    
Install as a Cake Tool

MxPlot.UI.Avalonia

Cross-platform UI layer for the MxPlot Ecosystem — built on Avalonia UI.

NuGet Downloads License Avalonia

💡 Recommendation Most users should install the MxPlot metapackage, which bundles this UI layer together with the core engine and I/O extensions.


📦 About this Package

MxPlot.UI.Avalonia provides a fully featured, cross-platform visualization layer on top of MxPlot.Core. It runs on Windows, macOS, and Linux via Avalonia UI and requires no WinForms or WPF dependency.

Key Components

Component Description
MatrixPlotter Standalone window: LUT selector, value-range bar, overlay manager, axis trackers, ortho views
MxView Low-level Avalonia surface control — pan, zoom, bitmap rendering via SkiaSharp
MxPlotHostApplication Minimal Avalonia Application for hosting MxPlot inside non-Avalonia apps (WinForms, console, etc.)
Overlay system Interactive shapes drawn over the bitmap — created via right-click context menu or programmatically
ProfilePlotter Live line-profile plot window, auto-updated on geometry change
OverlayPropertyDialog Per-object pen/geometry editor
OrthogonalPanel Side-by-side orthogonal slice views for 3-D / multi-frame data

🚀 Quick Start

1. Install

dotnet add package MxPlot

Or reference MxPlot.UI.Avalonia directly if you only need the UI layer.

2. Show a matrix in one line

using MxPlot.Core;
using MxPlot.UI.Avalonia.Views;

// Create a 512×512 float matrix and fill with your data
var data = new MatrixData<float>(512, 512);
// ... populate data.GetInternalArray(0) here ...

// Open a standalone viewer window
MatrixPlotter.Create(data, title: "My Data").Show();

3. Open from a file (with a format extension)

using MxPlot.Core;
using MxPlot.Extensions.Tiff;        // MxPlot.Extensions.Tiff NuGet
using MxPlot.UI.Avalonia.Views;

var format = new OmeTiffFormat();
var data = MatrixData.Load("image.ome.tif", format);
MatrixPlotter.Create(data, title: "image.ome.tif").Show();
var parent = MatrixPlotter.Create(originalData, title: "Original");
var child  = parent.CreateLinked(filteredData, title: "Filtered");
parent.Show();
child.Show();
// Calling parent.Refresh() or child.Refresh() updates both windows.

🎨 Overlay System

Built-in (right-click context menu)

MatrixPlotter provides built-in overlay tools accessible from the right-click context menu on the image surface — no code required:

  • Line — draws a line; right-click → Plot Profile opens a live ProfilePlotter window
  • Rectangle / Oval / Targeting — region shapes; right-click → Show Statistics displays Min/Max/Mean
  • Text — free text annotation
  • All shapes support drag-move, handle-resize, snap modes, and a pen/color editor via double-click

Programmatic creation

using MxPlot.UI.Avalonia.Overlays.Shapes;

// Add a line overlay
var line = new LineObject(new Point(10, 10), new Point(200, 150));
plotter.MainView.OverlayManager.Add(line);

// Add a rectangular ROI
var roi = new RectObject(new Point(50, 50), 100, 80);
plotter.MainView.OverlayManager.Add(roi);

🔗 Using MxPlot.UI.Avalonia from WinForms or WPF

Embedding Avalonia UI controls inside a WinForms or WPF host requires additional setup. Please refer to the integration guide in the repository:

👉 Non-Avalonia Integration Guide (documentation in progress)


🖥️ Requirements

Minimum
.NET 8.0 or 10.0
Avalonia 11.x
Platform Windows / macOS / Linux

📚 Documentation & Source

👉 GitHub Repository: u1bx0/MxPlot

📊 Version History

For the complete changelog, please visit the Releases Page on GitHub.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on MxPlot.UI.Avalonia:

Package Downloads
MxPlot

MxPlot: Multi-Axis Matrix Visualization Library for .NET. This project is currently under active development.

MxPlot.UI.Avalonia.Video

MxPlot: Multi-Axis Matrix Visualization Library for .NET. This project is currently under active development.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 39 9/12/2026
0.3.1 131 8/30/2026
0.2.0 143 8/6/2026
0.1.2 146 5/29/2026
0.1.1 129 5/1/2026
0.1.0 135 4/29/2026
0.1.0-beta 135 4/24/2026