AutomationWpf.UI
1.6.0
dotnet add package AutomationWpf.UI --version 1.6.0
NuGet\Install-Package AutomationWpf.UI -Version 1.6.0
<PackageReference Include="AutomationWpf.UI" Version="1.6.0" />
<PackageVersion Include="AutomationWpf.UI" Version="1.6.0" />
<PackageReference Include="AutomationWpf.UI" />
paket add AutomationWpf.UI --version 1.6.0
#r "nuget: AutomationWpf.UI, 1.6.0"
#:package AutomationWpf.UI@1.6.0
#addin nuget:?package=AutomationWpf.UI&version=1.6.0
#tool nuget:?package=AutomationWpf.UI&version=1.6.0
声明
UI库基于HandyControl创建,修改了部分控件样式,增加了一些常用控件
用法
Step 1: 添加 AutomationWpf.UI 引用,或在 nuget 上搜索 AutomationWpf.UI;
Install-Package AutomationWpf.UI
Step 2: 在 App.xaml 中添加如下代码:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/AutomationWpf.UI;component/Themes/SkinDark.xaml" />
<ResourceDictionary Source="pack://application:,,,/AutomationWpf.UI;component/Themes/Theme.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Step 3: 添加命名空间:
xmlns:hc="https://handyorg.github.io/handycontrol"
控件使用
详细用法见HandyControl
PropertyGrid
<hc:PropertyGrid SelectedObject="{Binding SelectedObject}" />
原HandyControl中的PropertyGrid控件已移除 基于PropertyTools创建,修改及新增了部分样式
Nest
[Nest]
public NestClass Property { get; set; } = new();
标记为[Nest]的属性带有扩展按钮,点击可弹出窗口编辑Property的子属性
PopupBox
<hc:PopupBox ToggleContent="{Binding Header}">
</hc:PopupBox>
弹出窗口编辑器,点击可编辑内容
BrushPickerBox
<hc:BrushPickerBox SelectedBrush="{Binding SelectedBrush}" />
画刷颜色选择器,点击可弹出Popup选择颜色,基于[BrushPickerBox]创建
ZoomImageBox
<hc:ZoomImageBox Source="图片路径"/>
图片显示控件,可鼠标拖动及缩放
ZoomImageBox
<hc:ZoomImageBox Source="图片路径"/>
图片显示控件,可鼠标拖动及缩放
DragDrop
hc:DragDrop.IsDragSource="True"
hc:DragDrop.IsDropTarget="True"
[ListBox]、[ListView]、[TreeView]、[DataGrid]等集合控件的附加属性,可实现鼠标拖放排序插入功能
ValueConverters
命名空间
xmlns:converters="http://schemas.superdev.ch/valueconverters/2016/xaml"
带有大多数的值转换器,也可以通过转换器组合实现复杂的数值转换
<converts:ValueConverterGroup x:Key="NullToVisible">
<converts:StringIsNotNullOrEmptyConverter />
<converts:BoolToVisibilityConverter />
</converts:ValueConverterGroup>
该转换器为将string为null时的数据转换为Visibility.Collapsed
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
-
net8.0-windows7.0
- JetBrains.Annotations (>= 2025.2.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AutomationWpf.UI:
| Package | Downloads |
|---|---|
|
AutomationCore.Wpf
wpf core |
GitHub repositories
This package is not used by any popular GitHub repositories.
无