Skip to content

RefreshContainer - show refresh indicator when refresh is triggered programmatically - #22020

Merged
MrJul merged 2 commits into
mainfrom
fix/refresh_container_indicator
Aug 19, 2026
Merged

RefreshContainer - show refresh indicator when refresh is triggered programmatically#22020
MrJul merged 2 commits into
mainfrom
fix/refresh_container_indicator

Conversation

@emmauss

@emmauss emmauss commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What does the pull request do?

Fixes a regression from #18617 . Previously, when RefreshContainer is refreshing, the refresh visualizer is set to its full offset and animated. Currently, this visualizer is set to an offset computed from the current interaction ratio of the refresh container. For refreshes started with gestures, the interaction ratio is equal to or close to 1, so the visualizer is visible, but not from refreshes started programmatically, which will have 0 as the value.

This fix sets InteractionRatio to 1 when refresh is requested, fully showing the refresh indicator. The value is always set to 0 when refresh ends.

What is the current behavior?

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #21912

@emmauss emmauss added bug regression backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Aug 19, 2026
@emmauss
emmauss requested a review from MrJul August 19, 2026 15:43
Comment thread src/Avalonia.Controls/PullToRefresh/RefreshVisualizer.cs

@MrJul MrJul 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.

LGTM!

@MrJul
MrJul enabled auto-merge August 19, 2026 16:26
@MrJul
MrJul added this pull request to the merge queue Aug 19, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0068536-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Merged via the queue into main with commit aed3e84 Aug 19, 2026
10 checks passed
@MrJul
MrJul deleted the fix/refresh_container_indicator branch August 19, 2026 17:29
MrJul pushed a commit to MrJul/Avalonia that referenced this pull request Sep 2, 2026
…rogrammatically (AvaloniaUI#22020)

* refresh container - show refresh indicator when refresh is triggered programmatically

* add test
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RefreshContainer.RequestRefresh() no longer shows the refresh indicator in 12.1.x

3 participants