DrawableViewer 2023.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DrawableViewer --version 2023.2.0                
NuGet\Install-Package DrawableViewer -Version 2023.2.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="DrawableViewer" Version="2023.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DrawableViewer --version 2023.2.0                
#r "nuget: DrawableViewer, 2023.2.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.
// Install DrawableViewer as a Cake Addin
#addin nuget:?package=DrawableViewer&version=2023.2.0

// Install DrawableViewer as a Cake Tool
#tool nuget:?package=DrawableViewer&version=2023.2.0                

Drawable object viewer

GstarCAD Extension Library

This is an unofficial extension library enhanced for GstarCAD .NET SDK.

You can get GstarCAD SDK on the official website https://www.gstarcad.com/download/, or on the Nuget Gallery.

Windows Forms Sample

Windows forms sample can be written:

using (var circle = new Circle(Point3d.Origin, Vector3d.ZAxis, 100))
using (var form = new Form { Size = new Size(300, 350) })
{
    var viewer = new DrawableViewer() { Dock = DockStyle.Fill };
    viewer.Add(circle);
    viewer.ZoomExtents();
    viewer.CanMouseOperation = false;
    form.Controls.Add(viewer);
    form.ShowDialog();
}

WPF MVVM Sample

The xaml file can be written:

<Window x:Class="DrawableViewer.Test.WpfViewer"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:dv="http://shaprer.gstarcad.extensions/xaml"
      Height="450" Width="800">
  <Grid>
    <WindowsFormsHost Grid.Row="0" Grid.Column="0" Margin="10"
        dv:DrawableViewerBehavior.DrawableObject="{Binding Drawable}"
        dv:DrawableViewerBehavior.AutoZoomingWhenDrawableChanged="True"
        dv:DrawableViewerBehavior.CanMouseOperation="False">
      <dv:DrawableViewer />
    </WindowsFormsHost>
  </Grid>
</Window>

Build the project

> build.bat

If 'msbuild' is not recognized, please set compilation environment firstly.

Deployment

This library is published as a nuget package in nuget.org.

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 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
2024.2.0 114 8/30/2024
2024.1.0 129 8/19/2024
2023.2.0 98 8/30/2024
2023.1.0 129 8/19/2024