Skip to content

feat: Add Scroll Anchoring sample#926

Open
MartinZikmund wants to merge 2 commits into
masterfrom
dev/mazi/scroll-anchoring
Open

feat: Add Scroll Anchoring sample#926
MartinZikmund wants to merge 2 commits into
masterfrom
dev/mazi/scroll-anchoring

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

What

Adds a Scroll Anchoring sample under UI/ScrollAnchoring demonstrating ScrollViewer scroll anchoring — new on the Skia targets in Uno Platform 6.6 (unoplatform/uno#23053).

Contents

  • Single-project Uno app (net10.0-desktop + net10.0-browserwasm), Uno.Sdk 6.6.14, Fluent theme.
  • MainPage.xaml: a chat/log-style ScrollViewer with VerticalAnchorRatio, RegisterAnchorCandidate/CurrentAnchor, and insert/remove-above controls that keep the anchored item visually fixed.
  • README.md + screenshot under doc/assets; entry added to doc/samples.md.

Screenshot

Scroll Anchoring

Built and verified on Windows Skia Desktop (Release).

🤖 Generated with Claude Code

MartinZikmund and others added 2 commits July 1, 2026 14:04
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 1, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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-desktop and net10.0-browserwasm (Uno.Sdk pinned via global.json).
  • Implements the sample UI + code-behind showing anchored insert/remove behavior and live status readout.
  • Adds documentation entry in doc/samples.md and 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}">
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.

2 participants