Uno.Dsp.Tasks 1.2.9

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Uno.Dsp.Tasks --version 1.2.9
NuGet\Install-Package Uno.Dsp.Tasks -Version 1.2.9
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="Uno.Dsp.Tasks" Version="1.2.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Uno.Dsp.Tasks --version 1.2.9
#r "nuget: Uno.Dsp.Tasks, 1.2.9"
#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 Uno.Dsp.Tasks as a Cake Addin
#addin nuget:?package=Uno.Dsp.Tasks&version=1.2.9

// Install Uno.Dsp.Tasks as a Cake Tool
#tool nuget:?package=Uno.Dsp.Tasks&version=1.2.9

Uno DSP Tooling - MSBuild Tasks

This is the package that contains the MSBuild tasks to automate the generation of the color overrides file in projects using Uno.

This is used to generate Color Overrides file for project using Uno.Themes like documented on the official documentation.

How to get your DSP file

DSP Files are used to define the color palette of a theme and can be generated using the Material V3 Theme Builder web site. Simply export using the "Material Tokens (DSP)" format and download the generated zip file.

Configuration

  1. You need to add reference to the Uno.Dsp.Tasks package in the project where you want the color overrides file to be generated.

    [-- MyProject.Shared\MyProject.Shared.csproj --]
    <ItemGroup>
        [-- You'll need to replace the version for the proper one --]
        <PackageReference Include="Uno.Dsp.Tasks" Version="[version]" />
    </ItemGroup>
    
  2. Place your DSP zip file close to where you want the color overrides file to be generated. This is usually in the Styles folder on the shared project.

    ex: MyProject.Shared\Styles\MyTheme.zip

  3. You need to add the following PropertyGroupto your project file:

    [-- MyProject.Shared\MyProject.Shared.csproj --]
    <PropertyGroup>
       <UnoDspImportColors Include="*.zip" Generator="xaml" />
    </PropertyGroup>
    
  4. Compile and you should get a new file named MyTheme.xaml in the same folder as your DSP file.

  5. Reference this file in your App.xaml file, following the Uno Themes documentation:

    [-- App.xaml --]
    <Application.Resources>
       <MaterialColors xmlns="using:Uno.Material"
                       OverrideSource="ms-appx:///Styles/MyTheme.xaml" />
    </Application.Resources>
    

Another tool - CLI

Another tool exists, called Uno.Dsp.Cli to generate the output file from the command line. It is less integrated than this MSBuild task, but it can be used to generate the color overrides file from a DSP file that is not in your project or if you need more flexibility on the moment when it is generated.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Uno.Dsp.Tasks:

Repository Stars
beto-rodriguez/LiveCharts2
Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere Maui, Uno Platform, Blazor-wasm, WPF, WinForms, Xamarin, Avalonia, WinUI, UWP.
lindexi/lindexi_gd
博客用到的代码
Version Downloads Last updated
1.3.0-dev.13 26 5/2/2024
1.3.0-dev.5 2,419 2/15/2024
1.3.0-dev.2 7,629 11/15/2023
1.2.9 6,863 2/15/2024
1.2.8 9,534 11/17/2023
1.2.7 11,115 11/1/2023
1.2.0-dev.34 2,580 9/29/2023
1.2.0-dev.32 348 9/26/2023
1.2.0-dev.30 96 9/26/2023
1.2.0-dev.28 57 9/26/2023
1.2.0-dev.20 2,408 9/13/2023
1.2.0-dev.18 1,159 8/30/2023
1.2.0-dev.12 985 8/15/2023
1.2.0-dev.8 1,850 7/21/2023
1.2.0-dev.6 86 7/21/2023
1.2.0-dev.3 94 7/21/2023
1.1.0 26,689 5/30/2023
1.1.0-dev.14 390 5/16/2023
1.1.0-dev.12 101 5/12/2023
1.1.0-dev.10 84 5/12/2023
1.1.0-dev.8 180 4/3/2023
1.1.0-dev.4 175 3/20/2023
1.1.0-dev.2 103 3/17/2023
1.0.1 14,235 3/17/2023
1.0.0 336 3/17/2023
0.1.0-dev.56 216 3/17/2023
0.1.0-dev.55 131 3/16/2023
0.1.0-dev.52 89 3/16/2023
0.1.0-dev.50 86 3/15/2023