docs: Update ReadMe.md based on latest WCT v7 & v8 details
This commit is contained in:
Родитель
4bd567a28d
Коммит
d3725c24fd
126
ReadMe.md
126
ReadMe.md
|
@ -1,11 +1,17 @@
|
|||
# Uno Platform port of Windows Community Toolkit
|
||||
# Uno Platform port of Windows Community Toolkit version 7.x
|
||||
|
||||
This port allows for [Uno Platform based](https://github.com/unoplatform/uno) apps to use [Windows Community Toolkit](https://github.com/Microsoft/WindowsCommunityToolkit) for WinUI 3
|
||||
on Windows, iOS, macOS, Android, WebAssembly and Linux.
|
||||
This port allows for [Uno Platform based](https://github.com/unoplatform/uno) apps to use [Windows Community Toolkit version 7.x](https://github.com/Microsoft/WindowsCommunityToolkit) for WinUI 3
|
||||
on Windows, iOS, macOS, Android, WebAssembly, and Linux.
|
||||
|
||||
See below on this page for information about UWP.
|
||||
> [!IMPORTANT]
|
||||
> Note that this [Uno Platform fork](https://github.com/unoplatform/Uno.WindowsCommunityToolkit) of the Windows Community Toolkit is for **[version 7.x](xref:Uno.Development.CommunityToolkit.v7) only**.
|
||||
> If you update to version 8.x, Uno Platform support is now available out of the box. You can remove the Uno Windows Community Toolkit references and all `Condition` statements around the packages.
|
||||
> For more details on how to use Windows Community Toolkit, complete details are available [here](https://aka.platform.uno/install-uno-community-toolkit).
|
||||
|
||||
The following packages are available:
|
||||
|
||||
## [WinUI / WinAppSDK]
|
||||
|
||||
- Uno.CommunityToolkit.Common [![NuGet](https://img.shields.io/nuget/v/CommunityToolkit.Common.svg)](https://www.nuget.org/packages/CommunityToolkit.Common)
|
||||
- Uno.CommunityToolkit.WinUI [![NuGet](https://img.shields.io/nuget/v/Uno.CommunityToolkit.WinUI.svg)](https://www.nuget.org/packages/Uno.CommunityToolkit.WinUI)
|
||||
- Uno.CommunityToolkit.WinUI.Connectivity [![NuGet](https://img.shields.io/nuget/v/Uno.CommunityToolkit.WinUI.Connectivity.svg)](https://www.nuget.org/packages/Uno.CommunityToolkit.WinUI.Connectivity)
|
||||
|
@ -23,105 +29,12 @@ The following packages are available:
|
|||
- Uno.CommunityToolkit.WinUI.UI.Controls.Primitives [![NuGet](https://img.shields.io/nuget/v/Uno.CommunityToolkit.WinUI.UI.Controls.Primitives.svg)](https://www.nuget.org/packages/Uno.CommunityToolkit.WinUI.UI.Controls.Primitives)
|
||||
- Uno.CommunityToolkit.WinUI.UI.Media [![NuGet](https://img.shields.io/nuget/v/Uno.CommunityToolkit.WinUI.UI.Media.svg)](https://www.nuget.org/packages/Uno.CommunityToolkit.WinUI.UI.Media)
|
||||
|
||||
## Using the Uno Platform Windows Community Toolkit packages
|
||||
These package IDs are for Uno Platform (non-Windows) projects. For WinUI 3 projects, you should use the equivalent packages published by Microsoft (`CommunityToolkit.WinUI`, `CommunityToolkit.WinUI.UI.Controls` etc).
|
||||
|
||||
These packages are providing support for the Uno Platform supported targets (iOS, Android, macOS, WebAssembly and Skia GTK/WPF/Tizen).
|
||||
|
||||
On Windows projects (the WinUI 3 Desktop head), please install the official [Windows Community Toolkit packages](https://github.com/Microsoft/WindowsCommunityToolkit) for WinUI 3.
|
||||
|
||||
If you are building a library, use the following to conditionally include the toolkit builds:
|
||||
|
||||
```xml
|
||||
<ItemGroup Condition="$(TargetFramework.Contains('windows10'))">
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Controls" Version="7.1.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="!$(TargetFramework.Contains('windows10'))">
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.Controls" Version="7.1.200" />
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
For example, using the default Uno template, you only need to add the following lines (as needed) to the class library `<AppName>.csproj`. No changes are needed in each target separately (`<AppName>.Wasm.csproj`, `<AppName>.Windows.csproj`, etc.)
|
||||
```xml
|
||||
<ItemGroup Condition="$(TargetFramework.Contains('windows10'))">
|
||||
<PackageReference Include="CommunityToolkit.Common" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.Connectivity" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.DeveloperTools" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Animations" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Behaviors" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Core" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Input" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Layout" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Markdown" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Media" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Primitives" />
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI.Media" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="!$(TargetFramework.Contains('windows10'))">
|
||||
<PackageReference Include="Uno.CommunityToolkit.Common" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.Connectivity" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.DeveloperTools" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Animations" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Behaviors" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Core" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.DataGrid" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Input" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Layout" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Markdown" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Media" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Primitives" />
|
||||
<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Media" />
|
||||
</ItemGroup>
|
||||
```
|
||||
|
||||
Also, don't forget to add the corresponding package versions in `Directory.Packages.props`:
|
||||
```xml
|
||||
<PackageVersion Include="Uno.CommunityToolkit.Common" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.Connectivity" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.DeveloperTools" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Animations" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Behaviors" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Core" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Input" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Layout" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Media" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.200" />
|
||||
<PackageVersion Include="Uno.CommunityToolkit.WinUI.UI.Media" Version="7.1.200" />
|
||||
|
||||
<PackageVersion Include="CommunityToolkit.Common" Version="8.2.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.Connectivity" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.DeveloperTools" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Animations" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Behaviors" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Core" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.DataGrid" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Input" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Layout" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Media" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.2" />
|
||||
<PackageVersion Include="CommunityToolkit.WinUI.UI.Media" Version="7.1.2" />
|
||||
```
|
||||
|
||||
## Support for UWP
|
||||
### [UWP]
|
||||
|
||||
As the original Community Toolkit does, this fork also provides binaries for UWP, and the branch [`unorel/7.1`](https://github.com/unoplatform/Uno.WindowsCommunityToolkit/tree/unorel/7.1) is used to provide this support.
|
||||
|
||||
The following packages are available from this branch:
|
||||
- Uno.Microsoft.Toolkit [![NuGet](https://img.shields.io/nuget/v/Uno.Microsoft.Toolkit.svg)](https://www.nuget.org/packages/Uno.Microsoft.Toolkit)
|
||||
- Uno.Microsoft.Toolkit.Uwp [![NuGet](https://img.shields.io/nuget/v/Uno.Microsoft.Toolkit.Uwp.svg)](https://www.nuget.org/packages/Uno.Microsoft.Toolkit.Uwp)
|
||||
- Uno.Microsoft.Toolkit.Uwp.Connectivity [![NuGet](https://img.shields.io/nuget/v/Uno.Microsoft.Toolkit.Uwp.Connectivity.svg)](https://www.nuget.org/packages/Uno.Microsoft.Toolkit.Uwp.Connectivity)
|
||||
|
@ -139,19 +52,10 @@ The following packages are available from this branch:
|
|||
- Uno.Microsoft.Toolkit.Uwp.UI.Controls.Primitives [![NuGet](https://img.shields.io/nuget/v/Uno.Microsoft.Toolkit.Uwp.UI.Controls.Primitives.svg)](https://www.nuget.org/packages/Uno.Microsoft.Toolkit.Uwp.UI.Controls.Primitives)
|
||||
- Uno.Microsoft.Toolkit.Uwp.UI.Media [![NuGet](https://img.shields.io/nuget/v/Uno.Microsoft.Toolkit.Uwp.UI.Media.svg)](https://www.nuget.org/packages/Uno.Microsoft.Toolkit.Uwp.UI.Media)
|
||||
|
||||
## Using the Uno Platform Windows Community Toolkit packages for UWP
|
||||
These package IDs are for Uno (non-Windows) projects. For UWP project, you should use the equivalent packages published by Microsoft (`Microsoft.Toolkit`, `Microsoft.Toolkit.Parsers` etc).
|
||||
|
||||
These packages are providing support for the Uno Platform supported targets (iOS, Android, macOS, WebAssembly and Skia GTK/WPF/Tizen).
|
||||
## Using the Uno Platform Windows Community Toolkit packages
|
||||
|
||||
On Windows projects (the UWP head), please install the official [Windows Community Toolkit packages](https://github.com/Microsoft/WindowsCommunityToolkit).
|
||||
For how to use Windows Community Toolkit, complete details are available [here](https://aka.platform.uno/install-uno-community-toolkit).
|
||||
|
||||
If you are building a library, use the following to conditionally include the toolkit builds:
|
||||
|
||||
```xml
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'uap10.0.17763'">
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.Controls" Version="7.1.10" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.17763'">
|
||||
<PackageReference Include="Uno.Microsoft.Toolkit.Uwp.Controls" Version="7.1.10" />
|
||||
</ItemGroup>
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче