You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fe1284b
Browse filesBrowse the repository at this point in the historyBrowse files
Use shared mobile target defaults and WINUI3 aliases, clarify Uno 5 API support and target-framework guidance, and document the test reference baseline with additional Uno.UI coverage.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c08f9b4b-106c-4922-b1e8-ee02d89ee263
Copy file name to clipboardExpand all lines: components/DependencyPropertyGenerator/CommunityToolkit.DependencyPropertyGenerator.Tests/Helpers/XamlFrameworkTest.cs
Copy file name to clipboardExpand all lines: components/DependencyPropertyGenerator/CommunityToolkit.DependencyPropertyGenerator.Tests/Test_DependencyPropertyGenerator.Uno.cs
| Uno Platform (WinUI) |`CommunityToolkit.Labs.WinUI.DependencyPropertyGenerator` (see target frameworks below) |`Microsoft.UI.Xaml`|
33
+
| Uno Platform 5.x (UWP API / Uno.UI) |`CommunityToolkit.Labs.Uwp.DependencyPropertyGenerator` (see target frameworks below) |`Windows.UI.Xaml`|
34
+
| Uno Platform 5.x, 6.x, or 7.x (WinUI API / Uno.WinUI) |`CommunityToolkit.Labs.WinUI.DependencyPropertyGenerator` (see target frameworks below) |`Microsoft.UI.Xaml`|
34
35
35
36
Both packages expose the attribute in the `CommunityToolkit.WinUI` namespace. Install the package in the project that declares the generated properties, not just in an application that references that project.
36
37
@@ -445,9 +446,11 @@ Do not combine embedded types with a reference to the package's runtime attribut
445
446
446
447
### Uno Platform
447
448
448
-
The WinUI package includes attribute assemblies for `net9.0-android35.0`, `net9.0-ios18.0`, and `net9.0-maccatalyst18.0`, alongside its Windows targets. These mobile targets use Uno dependencies rather than Windows App SDK. Reference the package normally on compatible Android, iOS, and Mac Catalyst targets; embedded mode is not required.
449
+
Both packages include attribute assemblies for Android, iOS, and Mac Catalyst, alongside their Windows targets. Mobile TFMs and platform versions follow the Toolkit's shared `MultiTarget` configuration; check the package's supported frameworks for the exact TFMs in a particular release. These mobile targets use Uno dependencies rather than Windows App SDK. Reference the package normally on compatible mobile targets; embedded mode is not required.
449
450
450
-
The example uses the minimum supported C# version. Keep a newer language version if your project already uses one.
451
+
Select the package by XAML API, not just the Uno version. Uno 5 supports both the UWP API (`Uno.UI`) and the WinUI API (`Uno.WinUI`); Uno 6 and 7 use the WinUI API. An existing Uno 5 UWP-API project can keep using `Windows.UI.Xaml` with the UWP package without migrating to the WinUI API.
452
+
453
+
For a WinUI-API project, use the WinUI package. The example uses the minimum supported C# version; keep a newer language version if your project already uses one.
451
454
452
455
```xml
453
456
<ItemGroup>
@@ -461,11 +464,20 @@ The example uses the minimum supported C# version. Keep a newer language version
461
464
</PropertyGroup>
462
465
```
463
466
464
-
Other Uno targets, such as desktop and WebAssembly, do not yet have attribute assemblies in this package. Use the embedded-mode setup above on those targets: set `PrivateAssets="all"` and `ExcludeAssets="compile;runtime"` on the package reference and enable `EnableGeneratedDependencyPropertyAttributeEmbeddedMode`. Enable `EnableGeneratedDependencyPropertyEmbeddedMode` too if you use `GeneratedDependencyProperty.UnsetValue`. That setup can also be applied to every target of a multi-target project; keep the package's analyzer and build assets enabled, and do not combine embedded types with a reference to the attribute assembly.
467
+
For an Uno 5 UWP-API project, use this package reference instead, and omit the explicit `false` setting above. The UWP package defaults `DependencyPropertyGeneratorUseWindowsUIXaml` to `true`:
Other Uno targets, such as desktop and WebAssembly, do not yet have attribute assemblies in these packages. Use the embedded-mode setup above on those targets: set `PrivateAssets="all"` and `ExcludeAssets="compile;runtime"` on the appropriate package reference and enable `EnableGeneratedDependencyPropertyAttributeEmbeddedMode`. Enable `EnableGeneratedDependencyPropertyEmbeddedMode` too if you use `GeneratedDependencyProperty.UnsetValue`. That setup can also be applied to every TFM listed in a consuming project's `<TargetFrameworks>` property; this is independent of the Toolkit repository's `MultiTarget` build system. Keep the package's analyzer and build assets enabled, and do not combine embedded types with a reference to the attribute assembly.
465
477
466
-
Use `Microsoft.UI.Xaml` for Uno's WinUI API, regardless of whether its types are declared in `Uno.UI` or `Uno.WinUI`. The generator resolves the referenced framework symbols; no Uno version, assembly-file naming convention, or application-specific polyfill is required.
478
+
Use `Windows.UI.Xaml` for Uno's UWP API and `Microsoft.UI.Xaml` for its WinUI API. The WinUI API namespace is the same regardless of whether its types are declared in an assembly named `Uno.UI` or `Uno.WinUI`; assembly names do not necessarily match the NuGet package name. The generator resolves the referenced framework symbols; no Uno version detection, assembly-file naming convention, or application-specific polyfill is required.
467
479
468
-
The same declarations work with Uno 6.x's interface-based `DependencyObject` and Uno 7.x's class-based layout. Uno's own generator supplies the framework implementation when a class directly implements the interface. If another imported namespace also provides a `GeneratedDependencyPropertyAttribute`, qualify the Toolkit attribute as `[CommunityToolkit.WinUI.GeneratedDependencyProperty]`.
480
+
The same declarations work with Uno 5.x and 6.x's interface-based `DependencyObject` and Uno 7.x's class-based layout. Uno's own generator supplies the framework implementation when a class directly implements the interface. If another imported namespace also provides a `GeneratedDependencyPropertyAttribute`, qualify the Toolkit attribute as `[CommunityToolkit.WinUI.GeneratedDependencyProperty]`.
0 commit comments