CanvasZoomPanDragLib 2.0.0
See the version list below for details.
dotnet add package CanvasZoomPanDragLib --version 2.0.0
NuGet\Install-Package CanvasZoomPanDragLib -Version 2.0.0
<PackageReference Include="CanvasZoomPanDragLib" Version="2.0.0" />
paket add CanvasZoomPanDragLib --version 2.0.0
#r "nuget: CanvasZoomPanDragLib, 2.0.0"
// Install CanvasZoomPanDragLib as a Cake Addin #addin nuget:?package=CanvasZoomPanDragLib&version=2.0.0 // Install CanvasZoomPanDragLib as a Cake Tool #tool nuget:?package=CanvasZoomPanDragLib&version=2.0.0
In Xaml: <cvLib:BorderZoomPanDrag Grid.Row="1" BorderThickness="1" BorderBrush="Black" ClipToBounds="True"> <Canvas Background="White" Width="350" Height="350" x:Name="cv" > </Canvas> </cvLib:BorderZoomPanDrag>
In Code-behind:
Init canvas manager:
CanvasManager canvasManager = new CanvasManager(cv, new Point3D(), new Point3D(10000, 10000, 0));
Init drawing (Drawing/SelectableDrawing/DraggableDrawing):
Selectable sel = new Selectable(new List<Point3D> { new Point3D(0, 0, 0) }, canvasManager);
class Selectable : SelectableDrawingBase { public Selectable(IList<Point3D> pDecart, CanvasManager canvasManager) : base(pDecart, canvasManager) { }
protected override List<Shape> CreateShapesOnCanvas() { var shapes = new List<Shape>(); var el = new Ellipse(); var pCanvas = BasePointsCanvas[0]; Canvas.SetLeft(el, pCanvas.X - 10 / 2); Canvas.SetTop(el, pCanvas.Y - 10 / 2); el.Height = 10; el.Width = 10; el.Fill = COLOR_DEFAULT; shapes.Add(el); return shapes; }
}
Draw:
canvasManager.Add(sel);
Demo: https://github.com/thesung26/CanvasZoomPanDrag/tree/main/DemoDotnetFramework
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Release for testing