Add RepositionThemeTransition to sample pages for smoother layout updates#2047
Merged
marcelwgn merged 14 commits intomicrosoft:mainfrom Dec 17, 2025
Merged
Conversation
|
/azp run |
|
The PR description lacks the rationale behind why RepositionThemeTransition is added, which could confuse maintainers unfamiliar with it. Feel free to add more details along with the Before vs After Screenshot to give a visual sense of the improvement you're introducing. |
Saharsh979
reviewed
Sep 18, 2025
WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml
Outdated
Show resolved
Hide resolved
WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml
Outdated
Show resolved
Hide resolved
- Added `SamplePage` as a base class for app pages - Applies `RepositionThemeTransition` to the root Panel of derived pages - Ensures transitions are applied only once to avoid duplicates
Contributor
Author
Done! |
Contributor
AndrewKeepCoding
left a comment
There was a problem hiding this comment.
If we are reducing code for this implementation, we can create a style for these StackPanels.
<Style x:Key="StackPanelWithRepositionThemeTransitionStyle" TargetType="StackPanel">
<Setter Property="ChildrenTransitions">
<Setter.Value>
<TransitionCollection>
<RepositionThemeTransition />
</TransitionCollection>
</Setter.Value>
</Setter>
<Setter Property="Spacing" Value="12"/>
</Style>
Contributor
Author
|
@marcelwgn |
marcelwgn
approved these changes
Dec 17, 2025
|
/azp run |
Saharsh979
approved these changes
Dec 17, 2025
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.
Description
This PR Updates
ItemPageto addRepositionThemeTransitionto content pages after navigation, main changes are:contentFrame.Navigatedto detect when the new page is loaded.RepositionThemeTransitionto the root Panel.Motivation and Context
Improves visual consistency.
How Has This Been Tested?
Manually verified across affected sample pages to ensure transitions apply correctly without breaking layout.
Screenshots (if appropriate):
Before


After
Types of changes