feat: Add Scroll Anchoring sample#926
Open
MartinZikmund wants to merge 2 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new Scroll Anchoring sample under UI/ScrollAnchoring to demonstrate Uno Platform 6.6 ScrollViewer anchoring behavior (anchor candidates + CurrentAnchor + VerticalAnchorRatio) for chat/log-style scenarios, and links the sample from the repo’s sample index.
Changes:
- Introduces a new single-project Uno app targeting
net10.0-desktopandnet10.0-browserwasm(Uno.Sdkpinned viaglobal.json). - Implements the sample UI + code-behind showing anchored insert/remove behavior and live status readout.
- Adds documentation entry in
doc/samples.mdand a sample README/screenshot assets.
Reviewed changes
Copilot reviewed 39 out of 43 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| UI/ScrollAnchoring/src/ScrollAnchoring/Strings/en/Resources.resw | Adds app string resources (ApplicationName). |
| UI/ScrollAnchoring/src/ScrollAnchoring/ScrollAnchoring.csproj | Defines the Uno single-project sample (TFMs, app metadata, features). |
| UI/ScrollAnchoring/src/ScrollAnchoring/ReadMe.md | Adds template “Getting Started” README inside the project. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Properties/PublishProfiles/win-x86.pubxml | Adds Windows publish profile (x86). |
| UI/ScrollAnchoring/src/ScrollAnchoring/Properties/PublishProfiles/win-x64.pubxml | Adds Windows publish profile (x64). |
| UI/ScrollAnchoring/src/ScrollAnchoring/Properties/PublishProfiles/win-arm64.pubxml | Adds Windows publish profile (arm64). |
| UI/ScrollAnchoring/src/ScrollAnchoring/Properties/launchSettings.json | Adds launch profiles for WASM/Desktop runs. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/wwwroot/web.config | Adds IIS web.config for precompressed assets + MIME mappings. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/wwwroot/staticwebapp.config.json | Adds Azure Static Web Apps routing/cache config. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/WasmScripts/AppManifest.js | Adds WASM app manifest JS for display name. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/WasmCSS/Fonts.css | Adds default WASM font-face configuration. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/Program.cs | Adds WASM host bootstrap. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/manifest.webmanifest | Adds PWA manifest. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/WebAssembly/LinkerConfig.xml | Adds WASM linker configuration. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Platforms/Desktop/Program.cs | Adds desktop host bootstrap. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Package.appxmanifest | Adds appxmanifest (template). |
| UI/ScrollAnchoring/src/ScrollAnchoring/MainPage.xaml.cs | Implements anchor-candidate registration and status updates. |
| UI/ScrollAnchoring/src/ScrollAnchoring/MainPage.xaml | Defines the UI (controls + ScrollViewer anchoring setup). |
| UI/ScrollAnchoring/src/ScrollAnchoring/GlobalUsings.cs | Adds global usings for the sample project. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Assets/Splash/splash_screen.svg | Adds splash screen asset. |
| UI/ScrollAnchoring/src/ScrollAnchoring/Assets/SharedAssets.md | Adds shared assets guidance doc (template). |
| UI/ScrollAnchoring/src/ScrollAnchoring/Assets/Icons/icon.svg | Adds icon asset (template). |
| UI/ScrollAnchoring/src/ScrollAnchoring/Assets/Icons/icon_foreground.svg | Adds foreground icon asset. |
| UI/ScrollAnchoring/src/ScrollAnchoring/App.xaml.cs | Adds app bootstrap (window creation + logging init). |
| UI/ScrollAnchoring/src/ScrollAnchoring/App.xaml | Adds app resources (XamlControlsResources). |
| UI/ScrollAnchoring/src/ScrollAnchoring/app.manifest | Adds Windows app manifest (DPI awareness). |
| UI/ScrollAnchoring/src/ScrollAnchoring.sln | Adds solution file for the sample. |
| UI/ScrollAnchoring/src/global.json | Pins Uno.Sdk version (6.6.14). |
| UI/ScrollAnchoring/src/Directory.Packages.props | Enables central package management (empty item group). |
| UI/ScrollAnchoring/src/Directory.Build.targets | Adds directory build targets file (empty template). |
| UI/ScrollAnchoring/src/Directory.Build.props | Adds directory build props (nullable/implicit usings/NoWarn). |
| UI/ScrollAnchoring/src/.vsconfig | Adds Visual Studio component configuration. |
| UI/ScrollAnchoring/src/.vscode/tasks.json | Adds VS Code tasks for build/publish (wasm/desktop). |
| UI/ScrollAnchoring/src/.vscode/settings.json | Adds VS Code workspace settings. |
| UI/ScrollAnchoring/src/.vscode/launch.json | Adds VS Code debug launch configurations (wasm/desktop). |
| UI/ScrollAnchoring/src/.vscode/extensions.json | Adds recommended VS Code extensions. |
| UI/ScrollAnchoring/src/.run/ScrollAnchoring.run.xml | Adds Rider run configurations. |
| UI/ScrollAnchoring/src/.run/Readme.md | Documents Rider .run folder purpose. |
| UI/ScrollAnchoring/src/.gitignore | Adds per-sample gitignore (template). |
| UI/ScrollAnchoring/src/.editorconfig | Adds per-sample editorconfig (template). |
| UI/ScrollAnchoring/README.md | Adds top-level sample README with feature explanation + screenshot reference. |
| doc/samples.md | Adds the Scroll Anchoring entry to the samples index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+7
| using Microsoft.UI; | ||
| using Microsoft.UI.Xaml; | ||
| using Microsoft.UI.Xaml.Controls; | ||
| using Microsoft.UI.Xaml.Media; | ||
| using Windows.UI; | ||
|
|
||
| namespace ScrollAnchoring; |
Comment on lines
+1
to
+5
| <Page x:Class="ScrollAnchoring.MainPage" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:local="using:ScrollAnchoring" | ||
| Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> |
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 a Scroll Anchoring sample under
UI/ScrollAnchoringdemonstratingScrollViewerscroll anchoring — new on the Skia targets in Uno Platform 6.6 (unoplatform/uno#23053).Contents
net10.0-desktop+net10.0-browserwasm),Uno.Sdk 6.6.14, Fluent theme.MainPage.xaml: a chat/log-styleScrollViewerwithVerticalAnchorRatio,RegisterAnchorCandidate/CurrentAnchor, and insert/remove-above controls that keep the anchored item visually fixed.README.md+ screenshot underdoc/assets; entry added todoc/samples.md.Screenshot
Built and verified on Windows Skia Desktop (Release).
🤖 Generated with Claude Code