-
Notifications
You must be signed in to change notification settings - Fork 706
Add RepositionThemeTransition to sample pages for smoother layout updates
#2047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add RepositionThemeTransition to sample pages for smoother layout updates
#2047
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. |
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
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>|
@marcelwgn |
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