DirectUI 1.1.5

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

// Install DirectUI as a Cake Tool
#tool nuget:?package=DirectUI&version=1.1.5                

DirectUI for Winform

简介

  • DirectUI for Winform 是一个 winform 平台的界面库。

开发环境

  • .net framework 4.0

功能

  • 虚拟控件的无句柄渲染,支持重绘,方便扩展。
  • 图元支持,封装渲染方法,简化渲染操作。
  • 支持 win32 控件上无句柄渲染。
  • 消息分发,虚拟控件事件支持。
  • 动画接口,部分控件支持动画,可方便实现整个窗口渲染动画。
  • 实现部分虚拟控件。

暂不支持的功能

  • Tab 焦点切换。
  • 键盘快捷键支持。
  • 虚拟输入框控件。
  • 设计模式支持。

演示

  • 代码内包含一个示例。
  • 以下是一些常用的代码片段。
// 虚拟控件使用
private void Init()
{
    UIButton button = new UIButton();
    button.Size = new Size(70, 30);
    button.Location = new Point(5, 15);
    button.Text = “测试按钮”;
    button.Click += (sender, e) => MessageBox.Show("按钮单击");
    this.UIControls.Add(button);
}
// 虚拟控件重绘
protected override void RenderSelf(PaintEventArgs e)
{
    Graphics g = e.Graphics;
    Rectangle rect = RectangleEx.Subtract(this.ClientRectangle, this.Padding);
    this.Sprite.BackColor = this.BackColor;
    this.Sprite.Text = this.Text;
    this.Sprite.TextRenderingHint = this.TextRenderingHint;
    this.Sprite.TextAlign = this.TextAlign;
    this.Sprite.BorderVisibleStyle = BorderVisibleStyle.None;
    this.Sprite.State = this.State;
    this.Sprite.BeginRender(g);
    this.Sprite.RenderText(rect);
    this.Sprite.EndRender();
}
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 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has 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.

Version Downloads Last updated
2.0.1 540 10/12/2021
2.0.0 334 10/12/2021
1.1.6 775 5/22/2019
1.1.5 952 10/9/2018