Skip to content

Enable MarkdownTextBlock on Uno Platform 7 - #822

Draft
MartinZikmund wants to merge 21 commits into
CommunityToolkit:mainfrom
MartinZikmund:mzikmund/mtb-uno7
Draft

MartinZikmund wants to merge 21 commits into
CommunityToolkit:mainfrom
MartinZikmund:mzikmund/mtb-uno7

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Enables MarkdownTextBlock on Uno Platform 7.0 (WinUI 3 flavor): wasm;win32;linux;macos;ios;android in addition to the existing uwp;wasdk. Uno 7 now ports WinUI's RichTextBlock, which the control is built on.

Changes

  • chore: tooling submodule now points at the Uno 7 tooling branch (MartinZikmund/Tooling-Windows-Submodule mzikmund/uno7-sdk, 14c2f75); root global.json adopts .NET SDK 10.0.401, Uno.Sdk 7.0.5, MSBuild.Sdk.Extras 3.0.44. The .gitmodules URL still points at upstream.
  • feat: MultiTarget.props enables the Uno targets; the csproj Using groups now also apply to Uno builds (Windows.UI.* for WinUI 2, Microsoft.UI.* for WinUI 3).
  • fix: inline code and task-list checkbox offsets use RenderTransform on Uno, since UIElement.Transform3D is a stub there (inline code rendered raised).
  • fix: TextPointer.GetPositionAtOffset is annotated nullable in Uno, so the next locals in Extensions.cs are now TextPointer? (a CS8600 error under warnings-as-errors). Compatible with UWP/WinAppSDK.

No #if was needed: DefaultSVGRenderer (SvgImageSource) and ImageProvider compile as-is on Uno 7.

Depends on the tooling PR CommunityToolkit/Tooling-Windows-Submodule#317 (the submodule pin is 843a88a, the tooling PR branch head). Until it merges, the submodule SHA only exists on the fork.

Validation

  • dotnet build -f net10.0 of the src project: Build succeeded.
  • dotnet pack -p:PackageVersion=0.1.0-local.uno7: CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock, has lib/net10.0 and depends on Uno.WinUI 7.0.0-dev.1656 (WinAppSDK TFMs packed as well).
  • Generated the single-component Uno.Sdk head and ran the net10.0-desktop (Win32/Skia) gallery at 240 DPI. Custom Theme, Full Example (headings, links, italic/bold, block quotes, code, switches) render correctly, including inline code with padding/border and mouse-wheel scrolling.

Caveat: building the head locally needed Uno 7 builds of CommunityToolkit.WinUI.{Converters,Extensions,Helpers,Triggers,Controls.SettingsControls} and Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI (unoplatform/Uno.XamlBehaviors#36); released packages still pull Uno 5.x. The tooling head references them, so CI needs those published first. Not tested: SVG images, wasm/mobile heads, Live Editor tab.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC

MartinZikmund and others added 19 commits October 9, 2026 11:54
Points the tooling submodule at the Uno 7 branch and updates global.json
(.NET SDK 10.0.401, Uno.Sdk 7.0.0-dev.51, MSBuild.Sdk.Extras 3.0.44).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Uno annotates TextPointer.GetPositionAtOffset as nullable, which fails the build with warnings as errors.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
…is a stub

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E8bkzyS24p8CYDWLUPsaPC
Resolves global.json and tooling: global.json follows the Uno 7 tooling branch
(SDK 10.0.402, MSBuild.Sdk.Extras 3.0.44, Uno.Sdk 7.0.0-dev.89), tooling moves to
its head (4e83b8a), which already contains main's tooling commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
The Uno 7 tooling renamed linuxgtk to linux and added the win32 desktop target;
Filter-Supported-Components rejects the old name, failing every build job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Ports the CommunityToolkit/Windows workflow changes for the Uno 7 tooling: the
win32/linux matrix, the Uno.Sdk head on the WinUI 3 wasm job and wasm-linux
becoming uno-linux, which builds that head for browserwasm and desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
Uno 5 generates a partial declaration for every DependencyObject (CS0260).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
On Uno 5 Android, Android.Widget.TableRow is also in scope (CS0104).

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
1.33.1 installs Microsoft.Android.Sdk 36.1.2, under which the .NET 10.0.403 SDK
adds the host RID to the Android head's RuntimeIdentifiers and restore looks
for Microsoft.NETCore.App.Runtime.Mono.win-x64 (NU1102). Matches the Windows
and tooling repos.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
The ApiInformation probe names Windows.UI.Xaml.UIElement, which isn't trim-safe
on Uno 7 (IL2122) and returns false on WinUI 3, so every WinUI 3 target fell
back to the obsolete FocusManager.GetFocusedElement() (CS0618). XamlRoot always
exists on WinUI 3, matching ApiInformationHelper in CommunityToolkit/Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
uno-check leaves Microsoft.Android.Sdk 36.1.2 selected, where the .NET 10.0.403
SDK adds the host RID to the Uno 7 Android head and restore fails on
Microsoft.NETCore.App.Runtime.Mono.win-x64 (NU1102). 36.1.118 doesn't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
ImplicitUsings pulls Android.App and Android.Widget into the Android builds,
whose Application, Orientation and TableRow clash with the XAML and Markdig
types (CS0104). Replaces the per-file TableRow alias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
On Uno 5 Android the sample pages are ViewGroups, whose Debug(int) method hides
System.Diagnostics.Debug (CS0119).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNu1EDpoRrpP3hnDukwz
uno-check already installs it, so install was a no-op; update moves the manifest
past 36.1.2.

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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TXMNtyvCafb6Ej7cqotkAC

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.

1 participant