WeDraft.Toolkit.FirstDraft
1.0.1-alpha
This is a prerelease version of WeDraft.Toolkit.FirstDraft.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package WeDraft.Toolkit.FirstDraft --version 1.0.1-alpha
NuGet\Install-Package WeDraft.Toolkit.FirstDraft -Version 1.0.1-alpha
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.0.1-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WeDraft.Toolkit.FirstDraft" Version="1.0.1-alpha" />
<PackageReference Include="WeDraft.Toolkit.FirstDraft" />
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 WeDraft.Toolkit.FirstDraft --version 1.0.1-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WeDraft.Toolkit.FirstDraft, 1.0.1-alpha"
#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 WeDraft.Toolkit.FirstDraft@1.0.1-alpha
#: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=WeDraft.Toolkit.FirstDraft&version=1.0.1-alpha&prerelease
#tool nuget:?package=WeDraft.Toolkit.FirstDraft&version=1.0.1-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Toolkit-WeDraft
Build our own WPF Control Style Library
构建属于我们自己的WPF控件样式库
概要(Summary)
**First Draft **是面向 Windows Presentation Foundation (WPF)的一套自定义样式库。由 Meiliyong 自主设计开发完成,最初基于.NET Core 3.1开发,如需其他框架版本请下载源码重新编译,源码地址:https://github.com/mefdeamon/Toolkit-WeDraft。
快速使用(Quick Start)
App.xaml中引入资源
<ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/FirstDraft;component/Themes/Ui.xaml"/> </ResourceDictionary.MergedDictionaries> <data:ServiceLocator x:Key="Locator"/> </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)
示例的应用程序可以直接下载FirstDraft release。
开发过程视频:Bilibili视频。
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. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- 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 | 261 | 10/1/2023 |
1.0.3 | 336 | 8/27/2023 |
1.0.2 | 248 | 4/9/2023 |
1.0.1 | 542 | 9/25/2022 |
1.0.1-beta | 345 | 8/14/2022 |
1.0.1-alpha | 226 | 8/7/2022 |
traget framework is net core 3.1