WeDraft.Toolkit.FirstDraft 1.0.1-beta

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.
dotnet add package WeDraft.Toolkit.FirstDraft --version 1.0.1-beta                
NuGet\Install-Package WeDraft.Toolkit.FirstDraft -Version 1.0.1-beta                
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-beta" />                
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.1-beta                
#r "nuget: WeDraft.Toolkit.FirstDraft, 1.0.1-beta"                
#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.1-beta&prerelease

// Install WeDraft.Toolkit.FirstDraft as a Cake Tool
#tool nuget:?package=WeDraft.Toolkit.FirstDraft&version=1.0.1-beta&prerelease                

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.  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. 
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 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