FanXing.Componentlibrary 0.1.0-preview.1

This is a prerelease version of FanXing.Componentlibrary.
dotnet add package FanXing.Componentlibrary --version 0.1.0-preview.1
                    
NuGet\Install-Package FanXing.Componentlibrary -Version 0.1.0-preview.1
                    
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="FanXing.Componentlibrary" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FanXing.Componentlibrary" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="FanXing.Componentlibrary" />
                    
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 FanXing.Componentlibrary --version 0.1.0-preview.1
                    
#r "nuget: FanXing.Componentlibrary, 0.1.0-preview.1"
                    
#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 FanXing.Componentlibrary@0.1.0-preview.1
                    
#: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=FanXing.Componentlibrary&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FanXing.Componentlibrary&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

FanXing.Componentlibrary

FanXing.Componentlibrary 是一个参考 Vue Element 与 RuoYi 风格的 WPF 组件库,适合后台管理系统、配置中心、工作台、运营管理等桌面应用场景。

功能介绍

  • 提供统一的按钮、输入框、标签、提醒、徽标、卡片、页头、数据表格等组件
  • 提供 Variant / Appearance / Size 三套核心样式参数,便于统一视觉风格
  • 默认支持 net6.0-windows 与 net8.0-windows
  • 支持 NuGet 发布,也支持 DLL 直接引用
  • 内置示例调试程序,可在 VS 2022 中直接查看组件效果

当前已提供的核心控件

  • FxButton
  • FxInput
  • FxInputNumber
  • FxSwitch
  • FxLink
  • FxTag
  • FxAlert
  • FxBadge
  • FxAvatar
  • FxCard
  • FxDivider
  • FxPageHeader
  • FxDataGrid

在其他项目中使用

方式一:项目引用

将组件库项目直接添加到你的解决方案,然后在业务项目中添加项目引用。

<ItemGroup>
  <ProjectReference Include="..\src\FanXing.Componentlibrary\FanXing.Componentlibrary.csproj" />
</ItemGroup>

方式二:NuGet 引用

先打包本地 NuGet 包:

dotnet pack .\src\FanXing.Componentlibrary\FanXing.Componentlibrary.csproj -c Release -o .\artifacts\nuget

然后在目标项目中安装:

dotnet add package FanXing.Componentlibrary --version 0.1.0-preview.1 --source .\artifacts\nuget

方式三:DLL 直接引用

编译后可直接引用以下 DLL 文件:

  • src\FanXing.Componentlibrary\bin\Release\net6.0-windows\FanXing.Componentlibrary.dll
  • src\FanXing.Componentlibrary\bin\Release\net8.0-windows\FanXing.Componentlibrary.dll

如果在 Visual Studio 中操作,可通过“添加引用 → 浏览”选择上述 DLL。

XAML 命名空间

组件库已经在程序集里注册好命名空间,默认不需要手动合并 Generic.xaml,直接在页面中声明即可:

xmlns:fx="https://schemas.fanxing-componentlibrary/wpf"

调用示例

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fx="https://schemas.fanxing-componentlibrary/wpf">

    <StackPanel Margin="24">
        <fx:FxButton Variant="Primary"
                     Appearance="Solid"
                     Content="保存" />

        <fx:FxInput Margin="0,12,0,0"
                    Placeholder="请输入关键字"
                    PrefixText="SKU"
                    IsClearable="True" />

        <fx:FxAlert Margin="0,12,0,0"
                    Title="提示信息"
                    Variant="Info">
            这里可以显示表单提示、流程反馈或操作说明。
        </fx:FxAlert>
    </StackPanel>
</Window>

更多说明

仓库内提供了更完整的接入说明文件:

  • docs/组件库介绍与接入说明.md
Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • 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
0.1.0-preview.1 93 3/25/2026