D2Phap.DXControl
4.0.0
dotnet add package D2Phap.DXControl --version 4.0.0
NuGet\Install-Package D2Phap.DXControl -Version 4.0.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="D2Phap.DXControl" Version="4.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add D2Phap.DXControl --version 4.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: D2Phap.DXControl, 4.0.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 D2Phap.DXControl as a Cake Addin #addin nuget:?package=D2Phap.DXControl&version=4.0.0 // Install D2Phap.DXControl as a Cake Tool #tool nuget:?package=D2Phap.DXControl&version=4.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
D2Phap.DXControl
- A WinForms control that supports drawing with Direct2D thanks to WicNet.
- This control has been used in ImageGlass software since version 9.0.
Resource links
- Nuget package: https://www.nuget.org/packages/D2Phap.DXControl
- Project url: https://github.com/d2phap/DXControl
- About: https://imageglass.org/about
Features
- High performance drawing using Direct2D.
- Names and types are exactly the same as the native concepts of Direct2D (interfaces, enums, structures, constants, methods, arguments, guids, etc...). So you can read the official documentation, use existing C/C++ samples, and start coding with .NET right away.
- All native COM interfaces are generated as .NET (COM) interfaces, this makes .NET programming easier, but they are not strictly needed.
- Option to use Software or Hardware render target
- Supports animation drawing with Direct2D.
Requirements:
- .NET 6.0, 7.0, 8.0
Installation
Run the command
Install-Package D2Phap.DXControl
Example
<img src="https://github.com/user-attachments/assets/837414d9-b342-487b-99c9-056b8a24205d" width="500" />
Draws a rectangle, then moves it to the right side.
using D2Phap.DXControl;
// create a WinForms custom control that extends from DXCanvas
public class DemoCanvas : DXCanvas
{
private RectangleF animatableRectangle = new(100, 100, 400, 200);
public DemoCanvas()
{
EnableAnimation = true;
UseHardwareAcceleration = true;
}
protected override void OnRender(DXGraphics g)
{
// draw a yellow rectangle with green border
g.FillRectangle(rectText, Color.FromArgb(100, Yellow));
g.DrawRectangle(rectText, Color.Green);
}
// Update frame logics for animation
protected override void OnFrame(FrameEventArgs e)
{
// animate the rectangle to the right
animatableRectangle.left++;
}
}
See Demo project for full details.
License
Support this project
Thanks for your gratitude and finance help!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net7.0-windows7.0 is compatible. net8.0-windows was computed. net8.0-windows7.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0-windows7.0
- DirectNStandard (>= 1.17.0)
- WicNet (>= 1.8.3)
-
net7.0-windows7.0
- DirectNStandard (>= 1.17.0)
- WicNet (>= 1.8.3)
-
net8.0-windows7.0
- DirectNStandard (>= 1.17.0)
- WicNet (>= 1.8.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on D2Phap.DXControl:
Repository | Stars |
---|---|
d2phap/ImageGlass
🏞 A lightweight, versatile image viewer
|
Version | Downloads | Last updated | |
---|---|---|---|
4.0.0 | 124 | 11/9/2024 | |
3.3.0 | 405 | 5/18/2024 | |
3.2.0 | 155 | 4/27/2024 | |
3.1.0 | 363 | 1/21/2024 | |
3.0.2 | 207 | 12/28/2023 | |
3.0.1 | 274 | 11/16/2023 | |
3.0.0 | 153 | 11/8/2023 | |
2.7.0 | 180 | 10/6/2023 | |
2.6.0 | 226 | 7/8/2023 | |
2.5.0 | 323 | 2/25/2023 | |
2.4.1 | 374 | 1/28/2023 | |
2.4.0 | 351 | 1/28/2023 | |
2.3.1 | 419 | 12/15/2022 | |
2.3.0 | 367 | 12/14/2022 | |
2.2.0 | 519 | 10/20/2022 | |
2.1.0 | 498 | 9/24/2022 | |
2.0.0 | 520 | 8/20/2022 | |
1.1.0 | 533 | 8/5/2022 | |
1.0.6 | 548 | 7/31/2022 | |
1.0.5 | 464 | 7/31/2022 | |
1.0.4 | 472 | 7/31/2022 | |
1.0.3 | 506 | 7/30/2022 | |
1.0.2 | 564 | 7/30/2022 | |
1.0.1 | 567 | 7/30/2022 | |
1.0.0 | 578 | 7/30/2022 |
See release notes here: https://github.com/d2phap/DXControl/releases