diff --git a/WinUIGallery/Controls/SamplePage.xaml b/WinUIGallery/Controls/SamplePage.xaml new file mode 100644 index 000000000..04faf23e6 --- /dev/null +++ b/WinUIGallery/Controls/SamplePage.xaml @@ -0,0 +1,9 @@ + + + diff --git a/WinUIGallery/Controls/SamplePage.xaml.cs b/WinUIGallery/Controls/SamplePage.xaml.cs new file mode 100644 index 000000000..987c09739 --- /dev/null +++ b/WinUIGallery/Controls/SamplePage.xaml.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media.Animation; + + +namespace WinUIGallery.Controls; + +public partial class SamplePage : Page +{ + public SamplePage() + { + InitializeComponent(); + Loaded += SamplePage_Loaded; + } + + private void SamplePage_Loaded(object sender, RoutedEventArgs e) + { + if (Content is Panel panel) + { + if (panel.ChildrenTransitions == null) + { + panel.ChildrenTransitions = new TransitionCollection(); + } + + // Add RepositionThemeTransition only once + bool hasReposition = false; + foreach (var t in panel.ChildrenTransitions) + { + if (t is RepositionThemeTransition) + { + hasReposition = true; + break; + } + } + + if (!hasReposition) + { + panel.ChildrenTransitions.Add(new RepositionThemeTransition()); + } + } + } +} diff --git a/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml b/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml index 822bba263..803e23b3c 100644 --- a/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml +++ b/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml @@ -31,6 +31,10 @@ + + + + Accessibility is about building experiences that make your Windows application usable by people of diff --git a/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml b/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml index 9b9e0a09f..2fe7ceaf4 100644 --- a/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml +++ b/WinUIGallery/Samples/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml @@ -32,6 +32,10 @@ + + + + Accessibility is about building experiences that make your Windows application usable by people of diff --git a/WinUIGallery/Samples/ControlPages/AcrylicPage.xaml b/WinUIGallery/Samples/ControlPages/AcrylicPage.xaml index 24a70453f..cb1c15463 100644 --- a/WinUIGallery/Samples/ControlPages/AcrylicPage.xaml +++ b/WinUIGallery/Samples/ControlPages/AcrylicPage.xaml @@ -36,6 +36,10 @@ + + + + Acrylic Brush might fall back to SolidColorbrush in certain scenarios. diff --git a/WinUIGallery/Samples/ControlPages/AnimatedIconPage.xaml b/WinUIGallery/Samples/ControlPages/AnimatedIconPage.xaml index 66b3e7858..3a75d7de4 100644 --- a/WinUIGallery/Samples/ControlPages/AnimatedIconPage.xaml +++ b/WinUIGallery/Samples/ControlPages/AnimatedIconPage.xaml @@ -9,6 +9,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> + + + + + + + + diff --git a/WinUIGallery/Samples/ControlPages/AppBarToggleButtonPage.xaml b/WinUIGallery/Samples/ControlPages/AppBarToggleButtonPage.xaml index aeec46bdf..1a8cc768e 100644 --- a/WinUIGallery/Samples/ControlPages/AppBarToggleButtonPage.xaml +++ b/WinUIGallery/Samples/ControlPages/AppBarToggleButtonPage.xaml @@ -18,6 +18,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> + + + + diff --git a/WinUIGallery/Samples/ControlPages/AppNotificationPage.xaml b/WinUIGallery/Samples/ControlPages/AppNotificationPage.xaml index 64c89a8d9..09441af49 100644 --- a/WinUIGallery/Samples/ControlPages/AppNotificationPage.xaml +++ b/WinUIGallery/Samples/ControlPages/AppNotificationPage.xaml @@ -9,6 +9,10 @@ mc:Ignorable="d"> + + + + + + + + + + + + + + + + diff --git a/WinUIGallery/Samples/ControlPages/BreadcrumbBarPage.xaml b/WinUIGallery/Samples/ControlPages/BreadcrumbBarPage.xaml index b5e6123b8..7940714c4 100644 --- a/WinUIGallery/Samples/ControlPages/BreadcrumbBarPage.xaml +++ b/WinUIGallery/Samples/ControlPages/BreadcrumbBarPage.xaml @@ -19,6 +19,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> + + + + diff --git a/WinUIGallery/Samples/ControlPages/ButtonPage.xaml b/WinUIGallery/Samples/ControlPages/ButtonPage.xaml index 2d500054d..d36618205 100644 --- a/WinUIGallery/Samples/ControlPages/ButtonPage.xaml +++ b/WinUIGallery/Samples/ControlPages/ButtonPage.xaml @@ -18,6 +18,10 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> + + + +