WeDraft.Toolkit.FirstDraft 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package WeDraft.Toolkit.FirstDraft --version 1.0.2                
NuGet\Install-Package WeDraft.Toolkit.FirstDraft -Version 1.0.2                
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.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WeDraft.Toolkit.FirstDraft --version 1.0.2                
#r "nuget: WeDraft.Toolkit.FirstDraft, 1.0.2"                
#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.0.2

// Install WeDraft.Toolkit.FirstDraft as a Cake Tool
#tool nuget:?package=WeDraft.Toolkit.FirstDraft&version=1.0.2                

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

快速使用(Quick Start)

  1. 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>
    
  2. 使用自定义控件时命名空间引入

                 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>
    
  3. 样式资源使用

    1. 图标资源

      <fdcontrols:IconButton Margin="5" IconData="{Binding home_line, Source={StaticResource IconSet}}"/>
      
    2. 样式资源

      <fdcontrols:IconButton Style="{StaticResource VerticalTextIconButton}" IconData="{Binding user_fill, Source={StaticResource IconSet}}" Content="用户"/>
      

详细示例(Demo)

Product 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 net45 is compatible.  net451 was computed.  net452 is compatible.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  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.5

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • .NETFramework 4.6

    • 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 174 10/1/2023
1.0.3 223 8/27/2023
1.0.2 170 4/9/2023
1.0.1 448 9/25/2022
1.0.1-beta 265 8/14/2022
1.0.1-alpha 145 8/7/2022

Improve IcomRadioButton and IconToggleButton custom controls