Skip to content

Adopt Uno.Sdk tooling on Uno Platform 7.0 - #880

Open
MartinZikmund wants to merge 23 commits into
CommunityToolkit:mainfrom
MartinZikmund:mzikmund/uno7-sdk
Open

MartinZikmund wants to merge 23 commits into
CommunityToolkit:mainfrom
MartinZikmund:mzikmund/uno7-sdk

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Moves the toolkit to the Uno.Sdk-based tooling on Uno Platform 7.0 (WinUI 3). This recreates #862 on Uno 7 instead of 6.x.

Important

Draft. It depends on the tooling PR CommunityToolkit/Tooling-Windows-Submodule#319 and on Uno 7 dev builds. The submodule pointer references the tooling branch on a fork and will move to the merged commit.

Changes

  • Adopt Uno.Sdk tooling: a squash of Adopt Uno.Sdk tooling (Uno 6.x) for the WinUI 3 gallery #862 (Uno.Sdk gallery head, linuxgtk → linux, new win32 MultiTarget, CI for the Uno.Sdk head).
  • Uno 7 / .NET 10:
    • global.json: .NET SDK 10.0.401, Uno.Sdk 7.0.5, MSBuild.Sdk.Extras 3.0.44.
    • CI: DOTNET_VERSION and net10.0-* TFMs.
    • TabbedCommandBar's MSBuild.Sdk.Extras/3.0.23 pins bumped to 3.0.44.
  • Uno 7 source fixes (one commit each):

Validation

  • With the tooling PR, CommunityToolkit.App.Uno builds for net10.0-desktop with 0 errors.
  • The gallery runs on Uno 7 Desktop (Win32): navigation, search and sample pages work, and the sample code viewer is syntax-highlighted via RichTextBlock.
  • For the local run, Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI was swapped for a local pack of feat: Update to Uno Platform 7.0 unoplatform/Uno.XamlBehaviors#36. The published 3.0.3 is built against Uno 5 and fails to compile in Behaviors/SettingsControls on Uno 7. That swap is not included here.

Remaining before ready

  • Bump Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI (Behaviors, SettingsControls samples) once Uno.XamlBehaviors#36 is published.
  • Move the submodule to the merged tooling commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC

MartinZikmund and others added 6 commits October 27, 2026 06:43
Squashed recreation of CommunityToolkit#862 on current main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Matches the tooling: .NET SDK 10.0.401, Uno.Sdk 7.0.0-dev.51, MSBuild.Sdk.Extras 3.0.44.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
DependencyObject is a class in Uno 7, so 'class, DependencyObject' fails with CS0450.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Uno 7 annotates the parameter as non-nullable. Use the overload without easing instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Bumps tooling to the matching Uno.WinUI 7.0.0-dev.2428, which returns IList<AutomationPeer>
from ListViewBaseAutomationPeer.GetChildrenCore (unoplatform/uno#25141), so the
TokenizingTextBoxAutomationPeer signature shim is no longer needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw
MartinZikmund and others added 6 commits October 27, 2026 07:09
Uno 7 annotates the propertyType of DependencyProperty registration for trimming, so
registering a property of type System.Type flags Type's own annotated members.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw
Uno 7 annotates ApiInformation's type name parameters for trimming, so the unqualified
WinRT names fail with IL2122. XamlRoot and AccessibilitySettings.HighContrast always
exist on WinUI 3, matching what Behaviors' ApiInformationHelper already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw
3.0.3 is built against Uno.WinUI 5, so Behavior types weren't WinUI 3 DependencyObjects on Uno 7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw
Uno 7 implements RichEditBox. On Uno 5 (WinUI 2) RichEditBox is still a stub, so the control
builds there but isn't functional.

Also fixes IsXamlRootAvailable, whose WinAppSDK/UWP branches were swapped, and a nullable
Window.Current dereference on Uno 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw
Builds the Uno.Sdk gallery heads against the local Converters, SettingsControls, Extensions
and Triggers projects instead of the Uno 5 packages, and fixes NU1510 in net10.0 sample projects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1DnHGnhiqjJz6RnRw

@Sergio0694 Sergio0694 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking this, see #880 (comment).

MartinZikmund and others added 10 commits November 3, 2026 16:38
On Uno 5 (WinUI 2) iOS and macOS controls are UIViews, whose Window, Paste and
Description members clash with RichSuggestBox (CS0120, CS0108, CS0114).
RichEditBox is a stub there anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
The job only built the Uno.Sdk head, so the SourceGenerators test step found no
test assembly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Excluding Apple from WinUI 2 left the WinUI 2 iOS job with no TargetFrameworks for
the project, which the solution generator still includes (restore failure).
Resolve the UIView/NSObject member clashes instead: Description and Paste hide
them with new, like SettingsCard.Description, and Window is fully qualified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Everywhere else nothing is hidden and new fails the build (CS0109).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Uno.Sdk 7.0.0-dev.132 brings Uno.WinUI 7.0.0-dev.2556, which includes
unoplatform/uno#25841 (no more [DynamicallyAccessedMembers] on
DependencyProperty.Register).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Uno no longer annotates the propertyType/ownerType parameters of
DependencyProperty.Register (unoplatform/uno#25841), matching WinUI, so the
warnings these silenced are gone at the source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
@MartinZikmund
MartinZikmund marked this pull request as ready for review November 4, 2026 00:17
Copilot AI balanced review requested due to automatic review settings November 4, 2026 00:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The target expansion enables RichSuggestBox on deferred, unvalidated Uno platforms despite its dependency on RichEditBox document APIs, so targets must remain Windows-only or be limited to validated platforms.

1 open issue
What changed in this PR

Migrates the toolkit’s WinUI 3 Uno builds to Uno.Sdk and Uno Platform 7, with updated platform targets, CI jobs, and compatibility fixes.

Changes:

  • Updates SDK and behavior-package references and adds win32 targets while renaming linuxgtk to linux.
  • Adds Uno.Sdk gallery builds on Windows and Linux using .NET 10 target frameworks.
  • Adjusts focus handling, API checks, generic constraints, and animation calls for Uno 7; expands RichSuggestBox’s declared targets.
File Description
global.json Registers Uno.Sdk and updates MSBuild.Sdk.Extras.
components/​Triggers/​src/​MultiTarget.props Adds Win32 and renames the Linux target.
components/​TokenizingTextBox/​src/​TokenizingTextBox.Selection.cs Suppresses the legacy focus API warning.
components/​TokenizingTextBox/​src/​TokenizingTextBox.cs Updates XamlRoot checks and legacy focus handling.
components/​TokenizingTextBox/​src/​MultiTarget.props Updates desktop platform targets.
components/​TabbedCommandBar/​src/​MultiTarget.props Updates desktop platform targets.
components/​TabbedCommandBar/​src/​CommunityToolkit.WinUI.Controls.TabbedCommandBar.csproj Updates MSBuild.Sdk.Extras.
components/​TabbedCommandBar/​samples/​TabbedCommandBar.Samples.csproj Updates the samples’ build SDK.
components/​Sizers/​src/​MultiTarget.props Updates desktop platform targets.
components/​SettingsControls/​src/​SettingsCard/​SettingsCard.cs Suppresses the legacy focus API warning.
components/​SettingsControls/​src/​MultiTarget.props Updates desktop platform targets.
components/​SettingsControls/​src/​Helpers/​ControlHelper.cs Treats XamlRoot as available on WinUI 3.
components/​SettingsControls/​samples/​Dependencies.props Updates the Uno behaviors dependency.
components/​Segmented/​src/​Segmented/​Segmented.cs Suppresses the legacy focus API warning.
components/​Segmented/​src/​MultiTarget.props Updates desktop platform targets.
components/​Segmented/​src/​Helpers/​ControlHelpers.cs Updates WinUI 3 XamlRoot detection.
components/​RichSuggestBox/​src/​RIchSuggestBox.Properties.cs Handles inherited member hiding on Uno 5 Apple targets.
components/​RichSuggestBox/​src/​RichSuggestBox.Helpers.cs Guards window access and corrects XamlRoot detection.
components/​RichSuggestBox/​src/​RichSuggestBox.Events.cs Handles the inherited Paste member on Uno 5 Apple targets.
components/​RichSuggestBox/​src/​MultiTarget.props Expands declared support to Uno platforms.
components/​RangeSelector/​src/​MultiTarget.props Updates desktop platform targets.
components/​Primitives/​src/​MultiTarget.props Updates desktop platform targets.
components/​MetadataControl/​src/​MultiTarget.props Updates desktop platform targets.
components/​LayoutTransformControl/​src/​MultiTarget.props Updates desktop platform targets.
components/​Helpers/​src/​ThemeListener.cs Reads high-contrast settings directly on WinUI 3.
components/​Helpers/​src/​MultiTarget.props Updates desktop platform targets.
components/​HeaderedControls/​src/​MultiTarget.props Updates desktop platform targets.
components/​Extensions/​src/​Tree/​DependencyObjectExtensions.cs Limits interface-style constraints to Uno 5.
components/​Extensions/​src/​MultiTarget.props Updates desktop platform targets.
components/​DeveloperTools/​src/​MultiTarget.props Updates desktop platform targets.
components/​DeveloperTools/​src/​FocusTracker/​FocusTracker.cs Updates XamlRoot checks and suppresses legacy API warnings.
components/​Converters/​src/​MultiTarget.props Updates desktop platform targets.
components/​ColorPicker/​src/​MultiTarget.props Updates desktop platform targets.
components/​Collections/​src/​MultiTarget.props Updates desktop platform targets.
components/​Behaviors/​src/​MultiTarget.props Updates desktop platform targets.
components/​Behaviors/​src/​Headers/​HeaderBehaviorBase.cs Suppresses the legacy focus API warning.
components/​Behaviors/​src/​Dependencies.props Updates the Uno behaviors dependency.
components/​Animations/​src/​MultiTarget.props Updates desktop platform targets.
components/​Animations/​src/​Expressions/​CompositionExtensions.cs Uses the no-easing overload when easing is null.
.github/​workflows/​build.yml Updates the build matrix and adds Uno.Sdk gallery builds.

Review effort: Balanced

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNtyvCafb6Ej7cqotkAC
@MartinZikmund

Copy link
Copy Markdown
Contributor Author

🤖 Addressed PR comments up to this point

  • @Sergio0694 (changes requested): the IL2087/IL2111 suppressions are gone (0ba6a5a). The fix landed in Uno instead: fix(trimming): Drop DynamicallyAccessedMembers from DependencyProperty.Register unoplatform/uno#25841 removes [DynamicallyAccessedMembers] from DependencyProperty.Register/RegisterAttached, matching WinUI, and FixMetadataIfNeeded no longer constructs the property type. This PR is on Uno.Sdk 7.0.5, which includes that change. Could you take another look when you get a chance?
  • Copilot (RichSuggestBox targets): replied inline. Uno 7 has RichEditBox, and the PR description is updated.

@Sergio0694 Sergio0694 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Will defer to @Arlodotexe for final review for tooling changes too.

<!-- WinUI 3 / Uno -->
<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3'">
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI" Version="3.0.3" />
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI" Version="4.0.0-dev.10" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we depend on a dev build here? Is there no new stable release of this?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants