WeDraft.Toolkit.FirstDraft
1.1.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
dotnet add package WeDraft.Toolkit.FirstDraft --version 1.1.0
NuGet\Install-Package WeDraft.Toolkit.FirstDraft -Version 1.1.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="WeDraft.Toolkit.FirstDraft" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WeDraft.Toolkit.FirstDraft --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WeDraft.Toolkit.FirstDraft, 1.1.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 WeDraft.Toolkit.FirstDraft as a Cake Addin #addin nuget:?package=WeDraft.Toolkit.FirstDraft&version=1.1.0 // Install WeDraft.Toolkit.FirstDraft as a Cake Tool #tool nuget:?package=WeDraft.Toolkit.FirstDraft&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Toolkit-WeDraft
构建属于我们自己的WPF控件样式库
Build our own WPF Control Style Library
概要(Summary)
First Draft是面向 Windows Presentation Foundation (WPF)的一套自定义样式库。由 Meiliyong 自主设计开发完成,最初基于.NET Core 3.1开发,如需其他框架版本请下载源码重新编译,源码地址:https://github.com/mefdeamon/Toolkit-WeDraft。
包含样式和控件如下:
- 新样式控件
- 按钮(Button)
- 切换按钮(ToggleButton)
- 单选按钮(RadioButton)
- 复选框(CheckBox)
- 文本框(TextBox)
- 下拉选项框(ComboBox)
- 滑动条(Slider)
- 密码框(PasswordBox)
- 自定义控件
- 图标按钮(IconButton)
- 图标切换按钮(IconToggleButton)
- 图标单选按钮(IconRadioButton)
- 图标文本框(IconTextBox)
- Fd窗口(FdWindow)
快速使用(Quick Start)
App.xaml中引入资源
<ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/FirstDraft;component/Themes/Ui.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
示例(WPF应用程序名FirstDraft.ApplyDemo):
<Application x:Class="FirstDraft.ApplyDemo.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FirstDraft.ApplyDemo" xmlns:data="clr-namespace:FirstDraft.ApplyDemo.Data" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/FirstDraft;component/Themes/Ui.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application>
使用自定义控件时命名空间引入
xmlns:fdcontrols="clr-namespace:FirstDraft.Controls;assembly=FirstDraft"
示例
<UserControl x:Class="FirstDraft.ApplyDemo.Views.ApplyIconButtonView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:FirstDraft.ApplyDemo.Views" xmlns:fdcontrols="clr-namespace:FirstDraft.Controls;assembly=FirstDraft" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> <WrapPanel Margin="5"> <fdcontrols:IconButton Margin="5" IconData="{Binding home_line, Source={StaticResource IconSet}}"/> <fdcontrols:IconButton Margin="5" IconData="{Binding home_fill, Source={StaticResource IconSet}}" /> <fdcontrols:IconButton Margin="5" IconData="{Binding record_on, Source={StaticResource IconSet}}" Content="录制"/> <fdcontrols:IconButton Margin="5" IconData="{Binding settings_line, Source={StaticResource IconSet}}" Content="设置" /> </WrapPanel> </UserControl>
样式资源使用
图标资源
<fdcontrols:IconButton Margin="5" IconData="{Binding home_line, Source={StaticResource IconSet}}"/>
样式资源
<fdcontrols:IconButton Style="{StaticResource VerticalTextIconButton}" IconData="{Binding user_fill, Source={StaticResource IconSet}}" Content="用户"/>
详细示例(Demo)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows7.0 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net472 is compatible. net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
net6.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 |
---|---|---|
1.1.0 | 179 | 10/1/2023 |
1.0.3 | 230 | 8/27/2023 |
1.0.2 | 172 | 4/9/2023 |
1.0.1 | 451 | 9/25/2022 |
1.0.1-beta | 267 | 8/14/2022 |
1.0.1-alpha | 147 | 8/7/2022 |
Improve IcomRadioButton and IconToggleButton custom controls