DongFeng.UI 1.0.0

dotnet add package DongFeng.UI --version 1.0.0
                    
NuGet\Install-Package DongFeng.UI -Version 1.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="DongFeng.UI" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DongFeng.UI" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DongFeng.UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DongFeng.UI --version 1.0.0
                    
#r "nuget: DongFeng.UI, 1.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.
#:package DongFeng.UI@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DongFeng.UI&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DongFeng.UI&version=1.0.0
                    
Install as a Cake Tool

DongFeng.UI

DongFeng.UI 是一个现代化、轻量级且功能丰富的 WPF UI 控件库。

GitHub .NET

✨ 特性 (Features)

  • 🎨 现代化设计:提供了一套清新、现代的 UI 风格,即插即用。

  • 🧩 丰富的控件:包含从基础按钮到高级图表、日期选择等多种常用控件。

  • 🌙 主题支持:内置亮色 (Light) 和暗色 (Dark) 主题支持,可轻松切换。

  • 🛠️ 易于使用:自动应用基础控件样式,减少重复代码。

  • 🔧 高可定制:基于标准 WPF 控件开发,易于集成和定制。

  • <img width="1500" height="1000" alt="image" src="https://github.com/user-attachments/assets/1298c582-7c91-4ab3-b7ca-9cd31932b0c5" /> <img width="1500" height="1000" alt="image" src="https://github.com/user-attachments/assets/d76ff03d-2386-4959-b1d7-5be59b692962" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/453d3283-5089-4149-a9ac-24c02f39508d" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/8caa3097-98d8-414b-b961-95a368b8fc33" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/98c3a5ee-dabf-4397-a853-1519863679a4" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/072ce782-93b7-495d-887e-d83ed9ff48fb" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/5b5cdc1a-af7b-4753-9b87-26984e4cbda2" />

<img width="649" height="241" alt="image" src="https://github.com/user-attachments/assets/e54d23f2-72c6-4476-a7d8-7020615f1e33" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/bff9a5d0-ed05-44c6-a20f-b63774d88735" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/f71d85c9-018f-4187-b8a4-f8773462955c" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/259035e6-ae45-4139-bf35-fb3d02961459" /> <img width="2560" height="1380" alt="image" src="https://github.com/user-attachments/assets/676f7c91-8cea-4d5c-8acd-eb7b645b2545" />

📦 包含的控件 (Controls)

DongFeng.UI 提供了大量增强型控件:

基础与布局

  • DFWindow: 现代化的无边框窗口,支持自定义标题栏。
  • Layout: DFUniformGrid, Divider, Spacer
  • Navigation: BreadcrumbBar, Pagination, StepBar, TabControl (Styled), Drawer (抽屉)

数据输入 (Data Entry)

  • Input: TagInput, NumericUpDown, ColorPicker, PasswordBox (Styled)
  • Selection: ToggleSwitch, CheckBox, RadioButton, ComboBox, Slider, RangeSlider, Rating
  • Date & Time: DateTimePicker, DatePicker, Calendar

数据展示 (Data Display)

  • Visuals: Avatar, Badge, Carousel (轮播图), CircleProgressBar
  • Information: DescriptionList, Statistic, Timeline, TreeView, DataGrid (Styled)
  • State: Empty (空状态), Skeleton (骨架屏), Loading

反馈与提示 (Feedback)

  • Messages: DFMessageBox, Message (全局消息), Popover, ToolTip

🚀 快速开始 (Quick Start)

1. 环境要求

  • .NET 10.0-windows 或更高版本

2. 安装

目前你可以通过引用项目或 DLL 的方式使用。 (将来发布到 NuGet 后,这里可以使用 Install-Package DongFeng.UI)

3. 引入资源

在你的 App.xaml 中引入资源字典:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            
            <ResourceDictionary Source="pack://application:,,,/DongFeng.UI;component/Themes/Generic.xaml"/>
            
            
            
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Application.Resources>

4. 使用控件

由于 Generic.xaml 会自动应用样式到标准控件(如 Button, TextBox 等),你可以直接使用标准控件获得新样式:

<Button Content="Click Me" Width="100" Height="30"/>

或者使用 DongFeng.UI 的特有控件:

<Window x:Class="YourApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:df="clr-namespace:DongFeng.UI.Controls;assembly=DongFeng.UI"
        Title="My App" Height="450" Width="800">
    
    <StackPanel Margin="20" Spacing="10">
        
        <df:ToggleSwitch IsChecked="True" />
        <df:Rating Value="4" />
        <df:Avatar ImageSource="/Assets/avatar.png" Name="User" />
    </StackPanel>
</Window>

🤝 贡献 (Contribution)

欢迎提交 Issue 或 Pull Request!

📄 许可证 (License)

MIT License

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
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
1.0.0 185 12/5/2025