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
<PackageReference Include="MxPlot.UI.Avalonia" Version="0.4.0" />
<PackageVersion Include="MxPlot.UI.Avalonia" Version="0.4.0" />
<PackageReference Include="MxPlot.UI.Avalonia" />
paket add MxPlot.UI.Avalonia --version 0.4.0
#r "nuget: MxPlot.UI.Avalonia, 0.4.0"
#:package MxPlot.UI.Avalonia@0.4.0
#addin nuget:?package=MxPlot.UI.Avalonia&version=0.4.0
#tool nuget:?package=MxPlot.UI.Avalonia&version=0.4.0
MxPlot.UI.Avalonia
Cross-platform UI layer for the MxPlot Ecosystem — built on Avalonia UI.
💡 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();
4. Link two plotters (shared data, synchronized refresh)
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
ProfilePlotterwindow - 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 | Versions 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. |
-
net10.0
- Avalonia (>= 11.3.18)
- Avalonia.Fonts.Inter (>= 11.3.18)
- Avalonia.Themes.Fluent (>= 11.3.18)
- CommunityToolkit.Mvvm (>= 8.2.1)
- MxPlot.Core (>= 0.4.0)
-
net8.0
- Avalonia (>= 11.3.18)
- Avalonia.Fonts.Inter (>= 11.3.18)
- Avalonia.Themes.Fluent (>= 11.3.18)
- CommunityToolkit.Mvvm (>= 8.2.1)
- MxPlot.Core (>= 0.4.0)
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.