Laminar.Avalonia.SelectAndMove 2.3.10

There is a newer prerelease version of this package available.
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
                    
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="Laminar.Avalonia.SelectAndMove" Version="2.3.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Laminar.Avalonia.SelectAndMove" Version="2.3.10" />
                    
Directory.Packages.props
<PackageReference Include="Laminar.Avalonia.SelectAndMove" />
                    
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 Laminar.Avalonia.SelectAndMove --version 2.3.10
                    
#r "nuget: Laminar.Avalonia.SelectAndMove, 2.3.10"
                    
#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 Laminar.Avalonia.SelectAndMove@2.3.10
                    
#: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=Laminar.Avalonia.SelectAndMove&version=2.3.10
                    
Install as a Cake Addin
#tool nuget:?package=Laminar.Avalonia.SelectAndMove&version=2.3.10
                    
Install as a Cake Tool

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 Example Screenshot 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. MVVM Example Screenshot 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

GitHub Repository

NuGet Package

License

SelectAndMove is licensed under the MIT license

Product 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. 
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
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