feat: Add Element-Level Theming showcase sample - #925
Open
MartinZikmund wants to merge 2 commits into
Open
Conversation
Element-Level Theming showcase (PR unoplatform/uno#22803). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Element-Level Theming showcase sample (UI/ElementLevelTheme) demonstrating per-subtree RequestedTheme behavior (Light/Dark/Default islands, nested islands, and runtime switching) for Uno Platform Skia targets, and links it from the samples documentation.
Changes:
- Introduces a new single-project Uno app sample (Desktop + WebAssembly plus platform stubs) showcasing element-level theming with a rich
MainPage.xamlUI. - Adds supporting project scaffolding (solution files, build props/targets, launch/run configs, publish profiles, assets).
- Adds documentation entry in
doc/samples.mdand a sample-levelREADME.mdwith screenshot reference.
Reviewed changes
Copilot reviewed 52 out of 56 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| UI/ElementLevelTheme/src/global.json | Pins Uno.Sdk version for sample |
| UI/ElementLevelTheme/src/ElementLevelTheme/Strings/en/Resources.resw | Adds default RESW resources |
| UI/ElementLevelTheme/src/ElementLevelTheme/ReadMe.md | Template getting-started readme |
| UI/ElementLevelTheme/src/ElementLevelTheme/Properties/PublishProfiles/win-x86.pubxml | Windows x86 publish profile |
| UI/ElementLevelTheme/src/ElementLevelTheme/Properties/PublishProfiles/win-x64.pubxml | Windows x64 publish profile |
| UI/ElementLevelTheme/src/ElementLevelTheme/Properties/PublishProfiles/win-arm64.pubxml | Windows arm64 publish profile |
| UI/ElementLevelTheme/src/ElementLevelTheme/Properties/launchSettings.json | Launch profiles for Desktop/WASM/WinAppSDK |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/wwwroot/web.config | IIS hosting config for WASM |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/wwwroot/staticwebapp.config.json | Azure Static Web Apps routing/cache config |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/WasmScripts/AppManifest.js | WASM app manifest script |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/WasmCSS/Fonts.css | WASM font-face definitions |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/Program.cs | WASM entry point |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/manifest.webmanifest | PWA webmanifest |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/WebAssembly/LinkerConfig.xml | WASM linker configuration |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/iOS/PrivacyInfo.xcprivacy | iOS privacy manifest (needs fix) |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/iOS/Media.xcassets/LaunchImages.launchimage/Contents.json | iOS launch image set metadata |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/iOS/Main.iOS.cs | iOS entry point |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/iOS/Info.plist | iOS plist scaffold |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/iOS/Entitlements.plist | iOS entitlements scaffold |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Desktop/Program.cs | Desktop entry point |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/Resources/values/Styles.xml | Android styles/splash theme |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/Resources/values/Strings.xml | Android string resources |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/Resources/AboutResources.txt | Android resource guidance text |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/MainActivity.Android.cs | Android activity scaffold |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/Main.Android.cs | Android application scaffold |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/environment.conf | Android runtime environment config |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/Assets/AboutAssets.txt | Android asset guidance text |
| UI/ElementLevelTheme/src/ElementLevelTheme/Platforms/Android/AndroidManifest.xml | Android manifest scaffold |
| UI/ElementLevelTheme/src/ElementLevelTheme/Package.appxmanifest | Windows package manifest scaffold |
| UI/ElementLevelTheme/src/ElementLevelTheme/MainPage.xaml.cs | Page logic for theme switching |
| UI/ElementLevelTheme/src/ElementLevelTheme/MainPage.xaml | Element-level theming UI showcase |
| UI/ElementLevelTheme/src/ElementLevelTheme/GlobalUsings.cs | Global using directives for sample |
| UI/ElementLevelTheme/src/ElementLevelTheme/ElementLevelTheme.csproj | Uno single-project sample project file |
| UI/ElementLevelTheme/src/ElementLevelTheme/Assets/Splash/splash_screen.svg | Splash screen asset |
| UI/ElementLevelTheme/src/ElementLevelTheme/Assets/SharedAssets.md | Shared assets documentation |
| UI/ElementLevelTheme/src/ElementLevelTheme/Assets/Icons/icon.svg | App icon base asset |
| UI/ElementLevelTheme/src/ElementLevelTheme/Assets/Icons/icon_foreground.svg | App icon foreground asset |
| UI/ElementLevelTheme/src/ElementLevelTheme/App.xaml.cs | App bootstrap + logging initialization |
| UI/ElementLevelTheme/src/ElementLevelTheme/App.xaml | App resources (XamlControlsResources) |
| UI/ElementLevelTheme/src/ElementLevelTheme/app.manifest | Windows compatibility/dpi manifest |
| UI/ElementLevelTheme/src/ElementLevelTheme.slnx | Solution definition for the sample |
| UI/ElementLevelTheme/src/Directory.Packages.props | Central package mgmt scaffold |
| UI/ElementLevelTheme/src/Directory.Build.targets | Directory targets scaffold |
| UI/ElementLevelTheme/src/Directory.Build.props | Directory build settings (nullable, warnings) |
| UI/ElementLevelTheme/src/.vsconfig | VS workload/component recommendations |
| UI/ElementLevelTheme/src/.vscode/tasks.json | VS Code build/publish tasks |
| UI/ElementLevelTheme/src/.vscode/settings.json | VS Code workspace settings |
| UI/ElementLevelTheme/src/.vscode/launch.json | VS Code debug configurations |
| UI/ElementLevelTheme/src/.vscode/extensions.json | VS Code extension recommendations |
| UI/ElementLevelTheme/src/.run/Readme.md | Rider run config folder docs |
| UI/ElementLevelTheme/src/.run/ElementLevelTheme.run.xml | Rider launch settings profiles |
| UI/ElementLevelTheme/src/.gitignore | Sample-local gitignore |
| UI/ElementLevelTheme/src/.editorconfig | Sample-local editorconfig |
| UI/ElementLevelTheme/README.md | Sample documentation + screenshot |
| doc/samples.md | Adds sample entry to catalog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+6
| <!-- see https://aka.platform/uno/apple-privacy-manifest for more information --> | ||
|
|
||
| <!-- .NET Runtime/BCL --> |
Comment on lines
+40
to
+41
| </dict> | ||
| </plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an Element-Level Theming sample under
UI/ElementLevelThemedemonstrating per-subtreeRequestedTheme— new on the Skia targets in Uno Platform 6.6 (unoplatform/uno#22803).Contents
net10.0-desktop+net10.0-browserwasm),Uno.Sdk 6.6.14, Fluent theme.MainPage.xaml: Light / Dark / Default islands side by side, a page-level theme switcher, and nested "matryoshka" theme islands.README.md+ screenshot underdoc/assets.doc/samples.md.Screenshot
Built and verified running on Windows Skia Desktop (Release).
🤖 Generated with Claude Code