Laminar.Avalonia.SelectAndMove
2.3.10
See the version list below for details.
dotnet add package Laminar.Avalonia.SelectAndMove --version 2.3.10
NuGet\Install-Package Laminar.Avalonia.SelectAndMove -Version 2.3.10
<PackageReference Include="Laminar.Avalonia.SelectAndMove" Version="2.3.10" />
<PackageVersion Include="Laminar.Avalonia.SelectAndMove" Version="2.3.10" />
<PackageReference Include="Laminar.Avalonia.SelectAndMove" />
paket add Laminar.Avalonia.SelectAndMove --version 2.3.10
#r "nuget: Laminar.Avalonia.SelectAndMove, 2.3.10"
#:package Laminar.Avalonia.SelectAndMove@2.3.10
#addin nuget:?package=Laminar.Avalonia.SelectAndMove&version=2.3.10
#tool nuget:?package=Laminar.Avalonia.SelectAndMove&version=2.3.10
Laminar.Avalonia.SelectAndMove
SelectAndMove is a lightweight, modular Avalonia control for selecting and moving controls.
Provided Examples
Customisation of SelectAndMove behavior
There are two examples provided in SelectAndMove, the first is a range of controls added directly via the xaml and the Items collection. This example has no code behind or data context, and exposes several controls that are bound directly to the various properties of SelectAndMove
See source code for this example
MVVM Bindings
The second example is a more practical use, where the items are set via the ItemsSource property, which targets a list of item models on the view model, and uses a data template for those items. Selecting, adding, and deleting items all get redirected via the view model.
See source code for this example
Implementation Details
SelectAndMove is an ItemsControl with custom pan, zoom, select, move, and marquee select functionality. The template for SelectAndMove depends on Panel#PART_TransformRoot, which is the visual that is transformed when the ViewZoom, ViewTranslateX, and ViewTranslateY properties are changed.
Selection and marquee selection are gestures that work within a custom selection system that be applied to any control. These scopes are an independent system from the SelectAndMove class; any controls in the logical tree can define themselves as SelectionScopes and any control can be selected.
Move is also a gesture, but it specifically sets the Canvas.Left and Canvas.Top properties of the selected elements.
BackgroundGridLines.cs is a self-contained control whose visual depends on its RenderTransform with respect to a specified visual ancestor (by default its TemplatedParent, or its logical parent if its TemplatedParent doesn't exist). In the context of SelectAndMove, it provides gridlines that automatically adapt to the current zoom level and that the move gesture can snap to.
Remarks
A SelectingItemsControl may be more appropriate for a future version, but the base functionality of that class would need changing a lot to work within this system.
Thanks to the PanAndZoom for name and code inspiration. If all you need is the Pan and Zoom functionality, PanAndZoom may be easier to use.
Resources
License
SelectAndMove is licensed under the MIT license
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 (>= 12.0.2)
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 |
|---|---|---|
| 3.0.34-rc | 149 | 6/30/2026 |
| 3.0.33-rc | 119 | 6/28/2026 |
| 3.0.31-rc | 129 | 6/26/2026 |
| 3.0.30-rc | 120 | 6/26/2026 |
| 3.0.11-alpha | 203 | 5/14/2026 |
| 3.0.10-alpha | 108 | 5/14/2026 |
| 3.0.9-alpha | 128 | 5/14/2026 |
| 3.0.7-alpha | 110 | 5/13/2026 |
| 2.3.10 | 152 | 5/11/2026 |
| 2.3.8 | 122 | 5/10/2026 |
| 2.3.7 | 125 | 5/10/2026 |
| 2.3.3 | 122 | 5/10/2026 |
| 2.3.2 | 130 | 5/9/2026 |
| 2.0.0 | 116 | 5/8/2026 |
| 1.1.0 | 231 | 10/3/2024 |
| 1.0.0 | 375 | 3/19/2023 |
- SelectAndMove is now an ItemsControl rather than a Canvas, and render transforms are applied to the ItemsPanelRoot
- Added ViewTranslateX and ViewTranslateY properties to SelectAndMove
- Selection is now much more general, with user-defined selection scopes. This means that multiple SelectAndMoves can be active at once with different selections