From 5f4ff16b4bad507c09bd180091ebbb2df3872279 Mon Sep 17 00:00:00 2001 From: Andrew KeepCoding Date: Fri, 13 Dec 2024 15:59:39 +0900 Subject: [PATCH] Switch to file-scoped namespaces --- UITests/AxeHelper.cs | 61 +- UITests/SampleTestTemplate.cs | 30 +- UITests/SessionManager.cs | 302 +- UITests/TestBase.cs | 69 +- UITests/Tests/AxeScanAllTests.cs | 219 +- UITests/Tests/Button.cs | 97 +- UITests/Tests/CheckBox.cs | 145 +- UITests/Tests/ComboBox.cs | 167 +- UITests/Tests/DatePicker.cs | 150 +- UITests/Tests/MediaPlayerElement.cs | 53 +- UITests/Tests/PersonPicture.cs | 29 +- UITests/Tests/ProgressBar.cs | 117 +- UITests/Tests/RadioButton.cs | 181 +- UITests/Tests/SearchResults.cs | 51 +- UITests/Tests/Slider.cs | 155 +- UITests/Tests/TextBlock.cs | 117 +- UITests/Tests/TextBox.cs | 217 +- UITests/Tests/ToggleButton.cs | 121 +- UITests/Tests/ToggleSwitch.cs | 115 +- WinUIGallery/AllControlsPage.xaml.cs | 31 +- WinUIGallery/AnimatedVisuals/LottieLogo1.cs | 9243 ++++++++--------- WinUIGallery/App.xaml.cs | 433 +- WinUIGallery/Behaviors/ImageScrollBehavior.cs | 133 +- WinUIGallery/CollectionsInterop.cs | 437 +- WinUIGallery/Common/ActivityFeedLayout.cs | 423 +- .../BooleanToInvertedVisibilityConverter.cs | 19 +- .../Common/BooleanToValueConverter.cs | 21 +- WinUIGallery/Common/Category.cs | 27 +- .../Common/ColorSlideTransitionHelper.cs | 225 +- WinUIGallery/Common/DefaultElementAnimator.cs | 197 +- WinUIGallery/Common/DeviceFamilyTrigger.cs | 27 +- .../Common/DoubleToThicknessConverter.cs | 27 +- .../EmptyStringToVisibilityConverter.cs | 41 +- WinUIGallery/Common/FileLoader.cs | 39 +- WinUIGallery/Common/LanguageList.cs | 217 +- .../Common/MenuItemTemplateSelector.cs | 35 +- .../Common/NullToVisibilityConverter.cs | 27 +- .../NullableBooleanToBooleanConverter.cs | 29 +- WinUIGallery/Common/ObservableDictionary.cs | 207 +- WinUIGallery/Common/OrientedSize.cs | 211 +- WinUIGallery/Common/RelayCommand.cs | 125 +- WinUIGallery/Common/SuspensionManager.cs | 395 +- WinUIGallery/Common/VariedImageSizeLayout.cs | 247 +- WinUIGallery/Common/Win32.cs | 107 +- WinUIGallery/Common/WrapPanel.cs | 959 +- .../ConnectedAnimationPages/CardPage.xaml.cs | 101 +- .../CollectionPage.xaml.cs | 99 +- .../DetailedInfoPage.xaml.cs | 69 +- .../AccessibilityColorContrastPage.xaml.cs | 127 +- .../AccessibilityKeyboardPage.xaml.cs | 35 +- .../AccessibilityScreenReaderPage.xaml.cs | 11 +- WinUIGallery/ControlPages/AcrylicPage.xaml.cs | 85 +- .../ControlPages/AnimatedIconPage.xaml.cs | 55 +- .../AnimatedVisualPlayerPage.xaml.cs | 97 +- .../AnnotatedScrollBarPage.xaml.cs | 269 +- .../ControlPages/AppBarButtonPage.xaml.cs | 65 +- .../ControlPages/AppBarSeparatorPage.xaml.cs | 15 +- .../AppBarToggleButtonPage.xaml.cs | 49 +- .../ControlPages/AutoSuggestBoxPage.xaml.cs | 441 +- WinUIGallery/ControlPages/BorderPage.xaml.cs | 93 +- .../ControlPages/BreadcrumbBarPage.xaml.cs | 69 +- WinUIGallery/ControlPages/ButtonPage.xaml.cs | 39 +- .../CalendarDatePickerPage.xaml.cs | 13 +- .../ControlPages/CalendarViewPage.xaml.cs | 67 +- WinUIGallery/ControlPages/CanvasPage.xaml.cs | 13 +- .../CaptureElementPreviewPage.xaml.cs | 181 +- .../ControlPages/CheckBoxPage.xaml.cs | 159 +- .../ControlPages/ClipboardPage.xaml.cs | 71 +- .../ControlPages/ColorPickerPage.xaml.cs | 31 +- .../ControlPages/ComboBoxPage.xaml.cs | 175 +- .../ControlPages/CommandBarFlyoutPage.xaml.cs | 71 +- .../ControlPages/CommandBarPage.xaml.cs | 229 +- .../ControlPages/CompactSizingPage.xaml.cs | 55 +- .../ConnectedAnimationPage.xaml.cs | 159 +- .../ControlPages/ContentDialogContent.xaml.cs | 11 +- .../ControlPages/ContentDialogExample.xaml.cs | 13 +- .../ControlPages/ContentDialogPage.xaml.cs | 63 +- .../CreateMultipleWindowsPage.xaml.cs | 33 +- .../ControlPages/DatePickerPage.xaml.cs | 31 +- .../DesignGuidance/ColorPage.xaml.cs | 61 +- .../DesignGuidance/GeometryPage.xaml.cs | 69 +- .../DesignGuidance/IconographyPage.xaml.cs | 195 +- .../DesignGuidance/SpacingPage.xaml.cs | 11 +- .../DesignGuidance/TypographyPage.xaml.cs | 51 +- .../ControlPages/DropDownButtonPage.xaml.cs | 13 +- .../ControlPages/EasingFunctionPage.xaml.cs | 133 +- .../ControlPages/ExpanderPage.xaml.cs | 43 +- .../ControlPages/FilePickerPage.xaml.cs | 429 +- .../ControlPages/FlipViewPage.xaml.cs | 23 +- WinUIGallery/ControlPages/FlyoutPage.xaml.cs | 23 +- WinUIGallery/ControlPages/GridPage.xaml.cs | 13 +- .../ControlPages/GridViewPage.xaml.cs | 235 +- .../ControlPages/HyperlinkButtonPage.xaml.cs | 21 +- .../ControlPages/IconElementPage.xaml.cs | 21 +- WinUIGallery/ControlPages/ImagePage.xaml.cs | 27 +- .../ImplicitTransitionPage.xaml.cs | 223 +- .../ControlPages/InfoBadgePage.xaml.cs | 131 +- WinUIGallery/ControlPages/InfoBarPage.xaml.cs | 135 +- .../ControlPages/InputValidationPage.xaml.cs | 572 +- .../ControlPages/ItemsRepeaterPage.xaml.cs | 985 +- .../ControlPages/ItemsViewPage.xaml.cs | 359 +- WinUIGallery/ControlPages/LinePage.xaml.cs | 11 +- WinUIGallery/ControlPages/ListBoxPage.xaml.cs | 79 +- .../ControlPages/ListViewPage.xaml.cs | 621 +- .../ControlPages/MapControlPage.xaml.cs | 71 +- .../MediaPlayerElementPage.xaml.cs | 37 +- WinUIGallery/ControlPages/MenuBarPage.xaml.cs | 41 +- .../ControlPages/MenuFlyoutPage.xaml.cs | 51 +- .../ControlPages/NavigationViewPage.xaml.cs | 491 +- .../ControlPages/NumberBoxPage.xaml.cs | 63 +- .../ControlPages/PageTransitionPage.xaml.cs | 119 +- .../ControlPages/ParallaxViewPage.xaml.cs | 23 +- .../ControlPages/PasswordBoxPage.xaml.cs | 55 +- .../ControlPages/PersonPicturePage.xaml.cs | 13 +- .../ControlPages/PipsPagerPage.xaml.cs | 123 +- WinUIGallery/ControlPages/PivotPage.xaml.cs | 13 +- .../ControlPages/ProgressBarPage.xaml.cs | 31 +- .../ControlPages/ProgressRingPage.xaml.cs | 65 +- .../ControlPages/PullToRefreshPage.xaml.cs | 311 +- .../RadialGradientBrushPage.xaml.cs | 103 +- .../ControlPages/RadioButtonPage.xaml.cs | 19 +- .../ControlPages/RadioButtonsPage.xaml.cs | 71 +- .../ControlPages/RatingControlPage.xaml.cs | 21 +- .../ControlPages/RelativePanelPage.xaml.cs | 13 +- .../ControlPages/RepeatButtonPage.xaml.cs | 23 +- .../ControlPages/RichEditBoxPage.xaml.cs | 301 +- .../ControlPages/RichTextBlockPage.xaml.cs | 73 +- .../ControlPages/ScratchPadPage.xaml.cs | 847 +- .../ControlPages/ScrollViewPage.xaml.cs | 425 +- .../ControlPages/ScrollViewerPage.xaml.cs | 109 +- .../ControlPages/SelectorBarPage.xaml.cs | 141 +- .../ControlPages/SemanticZoomPage.xaml.cs | 43 +- WinUIGallery/ControlPages/ShapePage.xaml.cs | 11 +- WinUIGallery/ControlPages/SliderPage.xaml.cs | 31 +- WinUIGallery/ControlPages/SoundPage.xaml.cs | 73 +- .../ControlPages/SplitButtonPage.xaml.cs | 79 +- .../ControlPages/SplitViewPage.xaml.cs | 85 +- .../ControlPages/StackPanelPage.xaml.cs | 45 +- .../StandardUICommandPage.xaml.cs | 137 +- .../ControlPages/SwipeControlPage.xaml.cs | 153 +- .../ControlPages/SystemBackdropsPage.xaml.cs | 57 +- WinUIGallery/ControlPages/TabViewPage.xaml.cs | 395 +- .../ControlPages/TeachingTipPage.xaml.cs | 35 +- .../ControlPages/TextBlockPage.xaml.cs | 13 +- WinUIGallery/ControlPages/TextBoxPage.xaml.cs | 13 +- .../ControlPages/ThemeTransitionPage.xaml.cs | 127 +- .../ControlPages/TimePickerPage.xaml.cs | 13 +- .../ControlPages/TitleBarPage.xaml.cs | 343 +- .../ControlPages/ToggleButtonPage.xaml.cs | 31 +- .../ToggleSplitButtonPage.xaml.cs | 75 +- .../ControlPages/ToggleSwitchPage.xaml.cs | 13 +- WinUIGallery/ControlPages/ToolTipPage.xaml.cs | 15 +- .../ControlPages/TreeViewPage.xaml.cs | 331 +- .../VariableSizedWrapGridPage.xaml.cs | 39 +- WinUIGallery/ControlPages/ViewboxPage.xaml.cs | 77 +- .../ControlPages/WebView2Page.xaml.cs | 13 +- .../ControlPages/XamlCompInteropPage.xaml.cs | 241 +- .../ControlPages/XamlUICommandPage.xaml.cs | 21 +- WinUIGallery/Controls/ControlExample.xaml.cs | 369 +- .../Controls/CopyButton/CopyButton.cs | 35 +- .../DesignGuidance/ColorPageExample.xaml.cs | 63 +- .../ColorSections/BackgroundSection.xaml.cs | 11 +- .../ColorSections/FillSection.xaml.cs | 11 +- .../ColorSections/HighContrastSection.xaml.cs | 11 +- .../ColorSections/SignalSection.xaml.cs | 11 +- .../ColorSections/StrokeSection.xaml.cs | 11 +- .../ColorSections/TextSection.xaml.cs | 11 +- .../Controls/DesignGuidance/ColorTile.xaml.cs | 113 +- .../DesignGuidance/TypographyControl.xaml.cs | 121 +- WinUIGallery/Controls/HeaderTile.xaml.cs | 67 +- .../Controls/HomePageHeaderImage.xaml.cs | 189 +- .../Controls/InlineColorPicker.xaml.cs | 127 +- WinUIGallery/Controls/PageHeader.xaml.cs | 139 +- .../Controls/SampleCodePresenter.xaml.cs | 429 +- .../Controls/SampleThemeListener.xaml.cs | 11 +- WinUIGallery/Controls/TileGallery.xaml.cs | 89 +- .../DataModel/ControlInfoDataSource.cs | 307 +- WinUIGallery/DataModel/IconsDataSource.cs | 73 +- .../ColorCode.internal/ExtensionMethods.cs | 39 +- .../RichTextBlockFormatter.cs | 221 +- WinUIGallery/Helper/NativeHelper.cs | 41 +- WinUIGallery/Helper/NavigationHelper.cs | 587 +- .../Helper/NavigationOrientationHelper.cs | 81 +- .../ProtocolActivationClipboardHelper.cs | 101 +- WinUIGallery/Helper/ThemeHelper.cs | 109 +- WinUIGallery/Helper/TitleBarHelper.cs | 75 +- WinUIGallery/Helper/UIHelper.cs | 79 +- WinUIGallery/Helper/Win32WindowHelper.cs | 133 +- WinUIGallery/Helper/WindowHelper.cs | 115 +- WinUIGallery/HomePage.xaml.cs | 111 +- WinUIGallery/IdleSynchronizer.cs | 717 +- WinUIGallery/ItemPage.xaml.cs | 207 +- WinUIGallery/ItemTemplates.xaml.cs | 11 +- WinUIGallery/ItemsPageBase.cs | 107 +- .../Navigation/NavigationRootPage.xaml.cs | 871 +- ...SampleBuiltInSystemBackdropsWindow.xaml.cs | 195 +- .../SampleCompactSizingPage.xaml.cs | 41 +- WinUIGallery/SamplePages/SamplePage1.xaml.cs | 41 +- WinUIGallery/SamplePages/SamplePage2.xaml.cs | 53 +- WinUIGallery/SamplePages/SamplePage3.xaml.cs | 13 +- WinUIGallery/SamplePages/SamplePage4.xaml.cs | 13 +- WinUIGallery/SamplePages/SamplePage5.xaml.cs | 11 +- WinUIGallery/SamplePages/SamplePage6.xaml.cs | 11 +- WinUIGallery/SamplePages/SamplePage7.xaml.cs | 11 +- .../SamplePages/SampleSettingsPage.xaml.cs | 13 +- .../SampleStandardSizingPage.xaml.cs | 39 +- .../SampleSystemBackdropsWindow.xaml.cs | 413 +- WinUIGallery/SearchResultsPage.xaml.cs | 341 +- WinUIGallery/SectionPage.xaml.cs | 51 +- WinUIGallery/SettingsPage.xaml.cs | 231 +- .../TabViewPages/MyTabContentControl.xaml.cs | 11 +- .../TabViewWindowingSamplePage.xaml.cs | 207 +- WinUIGalleryUnitTests/UnitTestApp.xaml.cs | 37 +- .../UnitTestAppWindow.xaml.cs | 37 +- WinUIGalleryUnitTests/UnitTests.cs | 279 +- 215 files changed, 18824 insertions(+), 19045 deletions(-) diff --git a/UITests/AxeHelper.cs b/UITests/AxeHelper.cs index b091b7c9a..2525f327e 100644 --- a/UITests/AxeHelper.cs +++ b/UITests/AxeHelper.cs @@ -20,43 +20,42 @@ using System.Diagnostics; using System.Linq; -namespace UITests +namespace UITests; + +public class AxeHelper { - public class AxeHelper + public static IScanner AccessibilityScanner; + + internal static void InitializeAxe() { - public static IScanner AccessibilityScanner; + var processes = Process.GetProcessesByName("WinUIGallery"); + Assert.IsTrue(processes.Length > 0); - internal static void InitializeAxe() - { - var processes = Process.GetProcessesByName("WinUIGallery"); - Assert.IsTrue(processes.Length > 0); + var config = Config.Builder.ForProcessId(processes[0].Id).Build(); - var config = Config.Builder.ForProcessId(processes[0].Id).Build(); + AccessibilityScanner = ScannerFactory.CreateScanner(config); + } - AccessibilityScanner = ScannerFactory.CreateScanner(config); - } + public static void AssertNoAccessibilityErrors() + { + // Bug 1474: Disabling Rules NameReasonableLength and BoundingRectangleNotNull temporarily + var testResult = AccessibilityScanner.Scan(null).WindowScanOutputs.SelectMany(output => output.Errors) + .Where(rule => rule.Rule.ID != RuleId.NameIsInformative) + .Where(rule => rule.Rule.ID != RuleId.NameExcludesControlType) + .Where(rule => rule.Rule.ID != RuleId.NameExcludesLocalizedControlType) + .Where(rule => rule.Rule.ID != RuleId.SiblingUniqueAndFocusable) + .Where(rule => rule.Rule.ID != RuleId.NameReasonableLength) + .Where(rule => rule.Rule.ID != RuleId.BoundingRectangleNotNull) + .Where(rule => rule.Rule.ID != RuleId.BoundingRectangleNotNullListViewXAML) + .Where(rule => rule.Rule.ID != RuleId.BoundingRectangleNotNullTextBlockXAML) + .Where(rule => rule.Rule.ID != RuleId.NameNotNull) + .Where(rule => rule.Rule.ID != RuleId.ChromiumComponentsShouldUseWebScanner); - public static void AssertNoAccessibilityErrors() + if (testResult.Any()) { - // Bug 1474: Disabling Rules NameReasonableLength and BoundingRectangleNotNull temporarily - var testResult = AccessibilityScanner.Scan(null).WindowScanOutputs.SelectMany(output => output.Errors) - .Where(rule => rule.Rule.ID != RuleId.NameIsInformative) - .Where(rule => rule.Rule.ID != RuleId.NameExcludesControlType) - .Where(rule => rule.Rule.ID != RuleId.NameExcludesLocalizedControlType) - .Where(rule => rule.Rule.ID != RuleId.SiblingUniqueAndFocusable) - .Where(rule => rule.Rule.ID != RuleId.NameReasonableLength) - .Where(rule => rule.Rule.ID != RuleId.BoundingRectangleNotNull) - .Where(rule => rule.Rule.ID != RuleId.BoundingRectangleNotNullListViewXAML) - .Where(rule => rule.Rule.ID != RuleId.BoundingRectangleNotNullTextBlockXAML) - .Where(rule => rule.Rule.ID != RuleId.NameNotNull) - .Where(rule => rule.Rule.ID != RuleId.ChromiumComponentsShouldUseWebScanner); - - if (testResult.Any()) - { - var mappedResult = testResult.Select(result => - "Element " + result.Element.Properties["ControlType"] + " violated rule '" + result.Rule.Description + "'."); - Assert.Fail("Failed with the following accessibility errors \r\n" + string.Join("\r\n", mappedResult)); - } + var mappedResult = testResult.Select(result => + "Element " + result.Element.Properties["ControlType"] + " violated rule '" + result.Rule.Description + "'."); + Assert.Fail("Failed with the following accessibility errors \r\n" + string.Join("\r\n", mappedResult)); } } -} \ No newline at end of file +} diff --git a/UITests/SampleTestTemplate.cs b/UITests/SampleTestTemplate.cs index 7ed64f859..2e63ee21a 100644 --- a/UITests/SampleTestTemplate.cs +++ b/UITests/SampleTestTemplate.cs @@ -18,24 +18,22 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenQA.Selenium.Appium.Windows; -namespace UITests +namespace UITests; + +[TestClass] +public class SampleTestTemplate : TestBase { - [TestClass] - public class SampleTestTemplate : TestBase - { - private static WindowsElement element1 = null; - private static WindowsElement element2 = null; + private static WindowsElement element1 = null; + private static WindowsElement element2 = null; - public static void ClassInitialize(TestContext context) - { - OpenControlPage("MyControlPage"); - Thread.Sleep(1000); - element1 = Session.FindElementByAccessibilityId("Element Locator"); - Assert.IsNotNull(element1); - element2 = Session.FindElementByAccessibilityId("Element Locator"); - Assert.IsNotNull(element2); - } + public static void ClassInitialize(TestContext context) + { + OpenControlPage("MyControlPage"); + Thread.Sleep(1000); + element1 = Session.FindElementByAccessibilityId("Element Locator"); + Assert.IsNotNull(element1); + element2 = Session.FindElementByAccessibilityId("Element Locator"); + Assert.IsNotNull(element2); } } - diff --git a/UITests/SessionManager.cs b/UITests/SessionManager.cs index 58396b0ef..6e5aceefe 100644 --- a/UITests/SessionManager.cs +++ b/UITests/SessionManager.cs @@ -27,211 +27,211 @@ using System.Threading; using System.Xml.Linq; -namespace UITests +namespace UITests; + +[TestClass] +public class SessionManager { - [TestClass] - public class SessionManager + private const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723"; + private static readonly string[] WinUIGalleryAppIDs = new string[]{ + // WinUI 3 Gallery apps built in the lab + "Microsoft.WinUI3ControlsGallery.Debug_grv3cx5qrw0gp!App", + "Microsoft.WinUI3ControlsGallery_grv3cx5qrw0gp!App", + // WinUI 3 Gallery apps built locally + "Microsoft.WinUI3ControlsGallery.Debug_8wekyb3d8bbwe!App", + "Microsoft.WinUI3ControlsGallery_8wekyb3d8bbwe!App" + }; + + private static uint appIdIndex = 0; + + private static WindowsDriver _session; + public static WindowsDriver Session { - private const string WindowsApplicationDriverUrl = "http://127.0.0.1:4723"; - private static readonly string[] WinUIGalleryAppIDs = new string[]{ - // WinUI 3 Gallery apps built in the lab - "Microsoft.WinUI3ControlsGallery.Debug_grv3cx5qrw0gp!App", - "Microsoft.WinUI3ControlsGallery_grv3cx5qrw0gp!App", - // WinUI 3 Gallery apps built locally - "Microsoft.WinUI3ControlsGallery.Debug_8wekyb3d8bbwe!App", - "Microsoft.WinUI3ControlsGallery_8wekyb3d8bbwe!App" - }; - - private static uint appIdIndex = 0; - - private static WindowsDriver _session; - public static WindowsDriver Session + get { - get + if (_session is null) { - if (_session is null) - { - Setup(null); - } - return _session; + Setup(null); } + return _session; } + } - public static TestContext TestContext { get; set; } + public static TestContext TestContext { get; set; } - private static string screenshotDirectory; + private static string screenshotDirectory; - [AssemblyInitialize] - public static void Setup(TestContext context) - { - TestContext = context; + [AssemblyInitialize] + public static void Setup(TestContext context) + { + TestContext = context; - string outputDirectory; + string outputDirectory; - if (context.Properties.Contains("ArtifactStagingDirectory")) - { - outputDirectory = context.Properties["ArtifactStagingDirectory"].ToString(); - } - else - { - outputDirectory = context.TestRunResultsDirectory; - } + if (context.Properties.Contains("ArtifactStagingDirectory")) + { + outputDirectory = context.Properties["ArtifactStagingDirectory"].ToString(); + } + else + { + outputDirectory = context.TestRunResultsDirectory; + } - screenshotDirectory = Path.Combine(outputDirectory, "Screenshots"); + screenshotDirectory = Path.Combine(outputDirectory, "Screenshots"); + if (_session is null) + { + int timeoutCount = 50; + + TryInitializeSession(); if (_session is null) { - int timeoutCount = 50; + // WinAppDriver is probably not running, so lets start it! + string winAppDriverX64Path = Path.Join(Environment.GetEnvironmentVariable("ProgramFiles"), "Windows Application Driver", "WinAppDriver.exe"); + string winAppDriverX86Path = Path.Join(Environment.GetEnvironmentVariable("ProgramFiles(x86)"), "Windows Application Driver", "WinAppDriver.exe"); - TryInitializeSession(); - if (_session is null) + if (File.Exists(winAppDriverX64Path)) { - // WinAppDriver is probably not running, so lets start it! - string winAppDriverX64Path = Path.Join(Environment.GetEnvironmentVariable("ProgramFiles"), "Windows Application Driver", "WinAppDriver.exe"); - string winAppDriverX86Path = Path.Join(Environment.GetEnvironmentVariable("ProgramFiles(x86)"), "Windows Application Driver", "WinAppDriver.exe"); - - if (File.Exists(winAppDriverX64Path)) - { - Process.Start(winAppDriverX64Path); - } - else if (File.Exists(winAppDriverX86Path)) - { - Process.Start(winAppDriverX86Path); - } - else - { - throw new Exception("Unable to start WinAppDriver since no suitable location was found."); - } - - Thread.Sleep(10000); - TryInitializeSession(); + Process.Start(winAppDriverX64Path); } - - while (_session is null && timeoutCount < 1000 * 4) + else if (File.Exists(winAppDriverX86Path)) { - TryInitializeSession(); - Thread.Sleep(timeoutCount); - timeoutCount *= 2; + Process.Start(winAppDriverX86Path); } - - Thread.Sleep(3000); - Assert.IsNotNull(_session); - Assert.IsNotNull(_session.SessionId); - AxeHelper.InitializeAxe(); - - // Dismiss the disclaimer window that may pop up on the very first application launch - // If the disclaimer is not found, this throws an exception, so lets catch that - try + else { - _session.FindElementByName("Disclaimer").FindElementByName("Accept").Click(); + throw new Exception("Unable to start WinAppDriver since no suitable location was found."); } - catch (OpenQA.Selenium.WebDriverException) { } - // Wait if something is still animating in the visual tree - _session.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); - _session.Manage().Window.Maximize(); + Thread.Sleep(10000); + TryInitializeSession(); } - } - [AssemblyCleanup()] - public static void TestRunTearDown() - { - TearDown(); - } + while (_session is null && timeoutCount < 1000 * 4) + { + TryInitializeSession(); + Thread.Sleep(timeoutCount); + timeoutCount *= 2; + } - public static void TearDown() - { - if (_session is not null) + Thread.Sleep(3000); + Assert.IsNotNull(_session); + Assert.IsNotNull(_session.SessionId); + AxeHelper.InitializeAxe(); + + // Dismiss the disclaimer window that may pop up on the very first application launch + // If the disclaimer is not found, this throws an exception, so lets catch that + try { - _session.CloseApp(); - _session.Quit(); - _session = null; + _session.FindElementByName("Disclaimer").FindElementByName("Accept").Click(); } + catch (OpenQA.Selenium.WebDriverException) { } + + // Wait if something is still animating in the visual tree + _session.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); + _session.Manage().Window.Maximize(); } + } - public static void TakeScreenshot(string fileName) + [AssemblyCleanup()] + public static void TestRunTearDown() + { + TearDown(); + } + + public static void TearDown() + { + if (_session is not null) { - Directory.CreateDirectory(screenshotDirectory); - _session.GetScreenshot().SaveAsFile(Path.Join(screenshotDirectory, $"{fileName}.png")); + _session.CloseApp(); + _session.Quit(); + _session = null; } + } - public static void DumpTree() - { - Logger.LogMessage("================="); - Logger.LogMessage("Begin visual tree"); - Logger.LogMessage("================="); + public static void TakeScreenshot(string fileName) + { + Directory.CreateDirectory(screenshotDirectory); + _session.GetScreenshot().SaveAsFile(Path.Join(screenshotDirectory, $"{fileName}.png")); + } - foreach (WindowsElement element in _session.FindElementsByXPath("/*")) - { - DumpTreeHelper(element, 0); - } + public static void DumpTree() + { + Logger.LogMessage("================="); + Logger.LogMessage("Begin visual tree"); + Logger.LogMessage("================="); - Logger.LogMessage("==============="); - Logger.LogMessage("End visual tree"); - Logger.LogMessage("==============="); + foreach (WindowsElement element in _session.FindElementsByXPath("/*")) + { + DumpTreeHelper(element, 0); } - private static void DumpTreeHelper(WindowsElement root, int depth) + Logger.LogMessage("==============="); + Logger.LogMessage("End visual tree"); + Logger.LogMessage("==============="); + } + + private static void DumpTreeHelper(WindowsElement root, int depth) + { + string indent = string.Empty; + + for (int i = 0; i < depth; i++) { - string indent = string.Empty; + indent += "|"; - for (int i = 0; i < depth; i++) + if (i == depth - 1) { - indent += "|"; - - if (i == depth - 1) - { - indent += "-"; - } - else - { - indent += " "; - } + indent += "-"; } - - if (root.Displayed && !string.IsNullOrEmpty(root.TagName)) + else { - string message; + indent += " "; + } + } - if (string.IsNullOrEmpty(root.Text)) - { - message = $"{indent}{root.TagName}"; - } - else - { - message = $"{indent}{root.TagName} [{root.Text}]"; - } + if (root.Displayed && !string.IsNullOrEmpty(root.TagName)) + { + string message; - Logger.LogMessage(message.Replace("{", "{{").Replace("}","}}")); + if (string.IsNullOrEmpty(root.Text)) + { + message = $"{indent}{root.TagName}"; } - - foreach (WindowsElement child in root.FindElementsByXPath("*/*")) + else { - DumpTreeHelper(child, root.Displayed ? depth + 1 : depth); + message = $"{indent}{root.TagName} [{root.Text}]"; } + + Logger.LogMessage(message.Replace("{", "{{").Replace("}","}}")); } - private static void TryInitializeSession() + foreach (WindowsElement child in root.FindElementsByXPath("*/*")) { - AppiumOptions appiumOptions = new AppiumOptions(); - appiumOptions.AddAdditionalCapability("app", WinUIGalleryAppIDs[appIdIndex]); - appiumOptions.AddAdditionalCapability("deviceName", "WindowsPC"); - try + DumpTreeHelper(child, root.Displayed ? depth + 1 : depth); + } + } + + private static void TryInitializeSession() + { + AppiumOptions appiumOptions = new AppiumOptions(); + appiumOptions.AddAdditionalCapability("app", WinUIGalleryAppIDs[appIdIndex]); + appiumOptions.AddAdditionalCapability("deviceName", "WindowsPC"); + try + { + _session = new WindowsDriver(new Uri(WindowsApplicationDriverUrl), appiumOptions); + } + catch (OpenQA.Selenium.WebDriverException exc) + { + // Use next app ID since the current one was failing + if (exc.Message.Contains("Package was not found")) { - _session = new WindowsDriver(new Uri(WindowsApplicationDriverUrl), appiumOptions); + appIdIndex++; } - catch (OpenQA.Selenium.WebDriverException exc) + else { - // Use next app ID since the current one was failing - if (exc.Message.Contains("Package was not found")) - { - appIdIndex++; - } - else - { - Console.WriteLine("Failed to update start driver, got exception:" + exc.Message); - } + Console.WriteLine("Failed to update start driver, got exception:" + exc.Message); } } } } + diff --git a/UITests/TestBase.cs b/UITests/TestBase.cs index f889208d9..e86cefda8 100644 --- a/UITests/TestBase.cs +++ b/UITests/TestBase.cs @@ -20,54 +20,53 @@ using System.Linq; using System.Threading; -namespace UITests +namespace UITests; + +public class TestBase { - public class TestBase - { - public static WindowsDriver Session => SessionManager.Session; + public static WindowsDriver Session => SessionManager.Session; - public static void OpenControlPage(string name) - { - var search = Session.FindElementByName("Search"); - search.Clear(); + public static void OpenControlPage(string name) + { + var search = Session.FindElementByName("Search"); + search.Clear(); - search.SendKeys(name); - GetElementByName(name).Click(); + search.SendKeys(name); + GetElementByName(name).Click(); - Assert.IsNotNull(WaitForPageHeader(name), "Failed to find matching page header for page: " + name); - } + Assert.IsNotNull(WaitForPageHeader(name), "Failed to find matching page header for page: " + name); + } - public static WindowsElement GetElementByName(string name) + public static WindowsElement GetElementByName(string name) + { + for (int i = 0; i < 100; i++) { - for (int i = 0; i < 100; i++) + Thread.Sleep(50); + var element = Session.FindElementByName(name); + if (element != null) { - Thread.Sleep(50); - var element = Session.FindElementByName(name); - if (element != null) - { - return element; - } + return element; } - return null; } - private static WindowsElement WaitForPageHeader(string name) + return null; + } + private static WindowsElement WaitForPageHeader(string name) + { + for (int i = 0; i < 100; i++) { - for (int i = 0; i < 100; i++) + var header = Session.FindElementByAccessibilityId("PageHeader"); + if (header != null && header.Text == name) { - var header = Session.FindElementByAccessibilityId("PageHeader"); - if (header != null && header.Text == name) - { - return header; - } - Thread.Sleep(50); + return header; } - return null; + Thread.Sleep(50); } + return null; + } - public static void TypeText(string text) - { - var actions = new Actions(Session); - actions.SendKeys(text).Perform(); - } + public static void TypeText(string text) + { + var actions = new Actions(Session); + actions.SendKeys(text).Perform(); } } diff --git a/UITests/Tests/AxeScanAllTests.cs b/UITests/Tests/AxeScanAllTests.cs index 61bd0f376..9f0c695e3 100644 --- a/UITests/Tests/AxeScanAllTests.cs +++ b/UITests/Tests/AxeScanAllTests.cs @@ -15,145 +15,144 @@ using System.Threading; using static System.Net.WebRequestMethods; -namespace UITests.Tests -{ - [TestClass] - public class AxeScanAll : TestBase - { - public static readonly string jsonUri = "ControlInfoData.json"; - public static new WindowsDriver Session => SessionManager.Session; - - public static string[] ExclusionList = - { - "WebView2", // 46668961: Web contents from WebView2 are throwing null BoundingRectangle errors. - "Icons", // https://github.com/CommunityToolkit/Windows/issues/240 External toolkit SettingsExpander does not pass Axe testing - // https://github.com/microsoft/axe-windows/issues/662 - // AxeWindowsAutomationException: Failed to get the root element(s) of the specified process error for following pages: - "PersonPicture", - "MapControl", - "TabView" - }; - - public class ControlInfoData - { - public List Groups { get; set; } - } +namespace UITests.Tests; + +[TestClass] +public class AxeScanAll : TestBase +{ + public static readonly string jsonUri = "ControlInfoData.json"; + public static new WindowsDriver Session => SessionManager.Session; + + public static string[] ExclusionList = + { + "WebView2", // 46668961: Web contents from WebView2 are throwing null BoundingRectangle errors. + "Icons", // https://github.com/CommunityToolkit/Windows/issues/240 External toolkit SettingsExpander does not pass Axe testing + // https://github.com/microsoft/axe-windows/issues/662 + // AxeWindowsAutomationException: Failed to get the root element(s) of the specified process error for following pages: + "PersonPicture", + "MapControl", + "TabView" + }; + + public class ControlInfoData + { + public List Groups { get; set; } + } - public class Group - { - [JsonProperty("UniqueId")] - public string UniqueId { get; set; } - - [JsonProperty("Items")] - public List Items { get; set; } - } + public class Group + { + [JsonProperty("UniqueId")] + public string UniqueId { get; set; } + + [JsonProperty("Items")] + public List Items { get; set; } + } - public class Item - { - [JsonProperty("UniqueId")] - public string UniqueId { get; set; } - } + public class Item + { + [JsonProperty("UniqueId")] + public string UniqueId { get; set; } + } - private static IEnumerable TestData() + private static IEnumerable TestData() + { + var testCases = new List(); + + string jsonContent = System.IO.File.ReadAllText(jsonUri); + var controlInfoData = JsonConvert.DeserializeObject(jsonContent); + + foreach (var group in controlInfoData.Groups) { - var testCases = new List(); + var sectionName = group.UniqueId; - string jsonContent = System.IO.File.ReadAllText(jsonUri); - var controlInfoData = JsonConvert.DeserializeObject(jsonContent); + // Select all row names within the current table + var items = group.Items; - foreach (var group in controlInfoData.Groups) + foreach (var item in items) { - var sectionName = group.UniqueId; - - // Select all row names within the current table - var items = group.Items; + var pageName = item.UniqueId; - foreach (var item in items) + // Skip pages in the exclusion list. + if (ExclusionList.Contains(pageName)) { - var pageName = item.UniqueId; - - // Skip pages in the exclusion list. - if (ExclusionList.Contains(pageName)) - { - continue; - } - testCases.Add(new object[] { sectionName, pageName }); + continue; } + testCases.Add(new object[] { sectionName, pageName }); } - - return testCases; } - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - } + return testCases; + } + + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + } - [TestMethod] - [DynamicData(nameof(TestData), DynamicDataSourceType.Method, DynamicDataDisplayName = nameof(GetCustomDynamicDataDisplayName))] - [TestProperty("Description", "Scan pages in the WinUIGallery for accessibility issues.")] - public void ValidatePageAccessibilityWithAxe(string sectionName, string pageName) + [TestMethod] + [DynamicData(nameof(TestData), DynamicDataSourceType.Method, DynamicDataDisplayName = nameof(GetCustomDynamicDataDisplayName))] + [TestProperty("Description", "Scan pages in the WinUIGallery for accessibility issues.")] + public void ValidatePageAccessibilityWithAxe(string sectionName, string pageName) + { + try { - try - { - Logger.LogMessage($"Opening page \"{pageName}\"."); + Logger.LogMessage($"Opening page \"{pageName}\"."); - // Click into page and check for accessibility issues. - var page = Session.FindElementByAccessibilityId(pageName); - page.Click(); + // Click into page and check for accessibility issues. + var page = Session.FindElementByAccessibilityId(pageName); + page.Click(); - AxeHelper.AssertNoAccessibilityErrors(); - } - catch (OpenQA.Selenium.WebDriverException exc) + AxeHelper.AssertNoAccessibilityErrors(); + } + catch (OpenQA.Selenium.WebDriverException exc) + { + if (exc.Message.Contains("element could not be located")) { - if (exc.Message.Contains("element could not be located")) + try { - try - { - Logger.LogMessage($"Page not found. Opening section \"{sectionName}\" first."); - - // If element is not found, expand tree view as it is nested. - var section = Session.FindElementByAccessibilityId(sectionName); - section.Click(); + Logger.LogMessage($"Page not found. Opening section \"{sectionName}\" first."); - // wait for tree to expand - Thread.Sleep(1000); + // If element is not found, expand tree view as it is nested. + var section = Session.FindElementByAccessibilityId(sectionName); + section.Click(); - // Click into page and check for accessibility issues. - var page = Session.FindElementByAccessibilityId(pageName); - page.Click(); + // wait for tree to expand + Thread.Sleep(1000); - AxeHelper.AssertNoAccessibilityErrors(); - } - catch (OpenQA.Selenium.WebDriverException exc2) - { - Logger.LogMessage($"Section \"{sectionName}\" not found either."); - Logger.LogMessage(exc2.Message); + // Click into page and check for accessibility issues. + var page = Session.FindElementByAccessibilityId(pageName); + page.Click(); - SessionManager.DumpTree(); - SessionManager.TakeScreenshot($"{sectionName}.{pageName}"); - - throw; - } - } - else if (exc.Message.Contains("Currently selected window has been closed")) - { - Logger.LogMessage("Window closed. Reinitializing session."); - SessionManager.TakeScreenshot($"{sectionName}.{pageName}"); - SessionManager.Setup(null); + AxeHelper.AssertNoAccessibilityErrors(); } - else + catch (OpenQA.Selenium.WebDriverException exc2) { - Logger.LogMessage(exc.Message); + Logger.LogMessage($"Section \"{sectionName}\" not found either."); + Logger.LogMessage(exc2.Message); + + SessionManager.DumpTree(); SessionManager.TakeScreenshot($"{sectionName}.{pageName}"); + + throw; } - } + else if (exc.Message.Contains("Currently selected window has been closed")) + { + Logger.LogMessage("Window closed. Reinitializing session."); + SessionManager.TakeScreenshot($"{sectionName}.{pageName}"); + SessionManager.Setup(null); + } + else + { + Logger.LogMessage(exc.Message); + SessionManager.TakeScreenshot($"{sectionName}.{pageName}"); + } + } + } - public static string GetCustomDynamicDataDisplayName(MethodInfo methodInfo, object[] data) - { - return string.Format("Validate{0}PageAccessibility", data[1]); - } + public static string GetCustomDynamicDataDisplayName(MethodInfo methodInfo, object[] data) + { + return string.Format("Validate{0}PageAccessibility", data[1]); } } diff --git a/UITests/Tests/Button.cs b/UITests/Tests/Button.cs index 3e396aaa5..59dc6ea81 100644 --- a/UITests/Tests/Button.cs +++ b/UITests/Tests/Button.cs @@ -17,67 +17,66 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenQA.Selenium.Appium.Windows; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class Button : TestBase { - [TestClass] - public class Button : TestBase - { - private static WindowsElement buttonElement = null; + private static WindowsElement buttonElement = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("Button"); + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("Button"); buttonElement = Session.FindElementByAccessibilityId("Button1"); - Assert.IsNotNull(buttonElement); - } + Assert.IsNotNull(buttonElement); + } [TestMethod] - public void Button_Click() - { + public void Button_Click() + { - var buttonEventOutput = Session.FindElementByAccessibilityId("Control1Output"); - Assert.AreEqual(string.Empty, buttonEventOutput.Text); + var buttonEventOutput = Session.FindElementByAccessibilityId("Control1Output"); + Assert.AreEqual(string.Empty, buttonEventOutput.Text); - buttonElement.Click(); + buttonElement.Click(); - Assert.AreEqual("You clicked: Button1", buttonEventOutput.Text); - } + Assert.AreEqual("You clicked: Button1", buttonEventOutput.Text); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(buttonElement.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(buttonElement.Displayed); + } - [TestMethod] - public void Enabled() - { - var disableButtonCheckbox = Session.FindElementByAccessibilityId("DisableButton1"); - Assert.IsTrue(buttonElement.Enabled); - disableButtonCheckbox.Click(); - Assert.IsFalse(buttonElement.Enabled); - disableButtonCheckbox.Click(); - Assert.IsTrue(buttonElement.Enabled); - } + [TestMethod] + public void Enabled() + { + var disableButtonCheckbox = Session.FindElementByAccessibilityId("DisableButton1"); + Assert.IsTrue(buttonElement.Enabled); + disableButtonCheckbox.Click(); + Assert.IsFalse(buttonElement.Enabled); + disableButtonCheckbox.Click(); + Assert.IsTrue(buttonElement.Enabled); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Button", buttonElement.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Button", buttonElement.TagName); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(buttonElement.Size.Width > 0); - Assert.IsTrue(buttonElement.Size.Height > 0); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(buttonElement.Size.Width > 0); + Assert.IsTrue(buttonElement.Size.Height > 0); + } - [TestMethod] - public void Text() - { - Assert.AreEqual("Standard XAML", buttonElement.Text); - } + [TestMethod] + public void Text() + { + Assert.AreEqual("Standard XAML", buttonElement.Text); } } \ No newline at end of file diff --git a/UITests/Tests/CheckBox.cs b/UITests/Tests/CheckBox.cs index 5bbb8ed35..37ff6f114 100644 --- a/UITests/Tests/CheckBox.cs +++ b/UITests/Tests/CheckBox.cs @@ -17,91 +17,90 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenQA.Selenium.Appium.Windows; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class CheckBox : TestBase { - [TestClass] - public class CheckBox : TestBase - { - private static WindowsElement checkBoxElement1 = null; - private static WindowsElement checkBoxElement2 = null; + private static WindowsElement checkBoxElement1 = null; + private static WindowsElement checkBoxElement2 = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("CheckBox"); - checkBoxElement1 = Session.FindElementByName("Two-state"); - checkBoxElement2 = Session.FindElementByName("Three-state"); - Assert.IsNotNull(checkBoxElement2); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("CheckBox"); + checkBoxElement1 = Session.FindElementByName("Two-state"); + checkBoxElement2 = Session.FindElementByName("Three-state"); + Assert.IsNotNull(checkBoxElement2); + } - [TestMethod] - public void Click() - { - var checkBoxEventOutput = Session.FindElementByAccessibilityId("Control2Output"); - Assert.AreEqual(string.Empty, checkBoxEventOutput.Text); + [TestMethod] + public void Click() + { + var checkBoxEventOutput = Session.FindElementByAccessibilityId("Control2Output"); + Assert.AreEqual(string.Empty, checkBoxEventOutput.Text); - checkBoxElement2.Click(); - Assert.AreEqual("CheckBox is checked.", checkBoxEventOutput.Text); + checkBoxElement2.Click(); + Assert.AreEqual("CheckBox is checked.", checkBoxEventOutput.Text); - checkBoxElement2.Click(); - Assert.AreEqual("CheckBox state is indeterminate.", checkBoxEventOutput.Text); + checkBoxElement2.Click(); + Assert.AreEqual("CheckBox state is indeterminate.", checkBoxEventOutput.Text); - checkBoxElement2.Click(); - Assert.AreEqual("CheckBox is unchecked.", checkBoxEventOutput.Text); - } + checkBoxElement2.Click(); + Assert.AreEqual("CheckBox is unchecked.", checkBoxEventOutput.Text); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(checkBoxElement1.Displayed); - Assert.IsTrue(checkBoxElement2.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(checkBoxElement1.Displayed); + Assert.IsTrue(checkBoxElement2.Displayed); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(checkBoxElement1.Enabled); - Assert.IsTrue(checkBoxElement2.Enabled); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(checkBoxElement1.Enabled); + Assert.IsTrue(checkBoxElement2.Enabled); + } - [TestMethod] - public void Location() - { - Assert.IsTrue(checkBoxElement2.Location.X >= checkBoxElement1.Location.X); - Assert.IsTrue(checkBoxElement2.Location.Y >= checkBoxElement1.Location.Y); - } + [TestMethod] + public void Location() + { + Assert.IsTrue(checkBoxElement2.Location.X >= checkBoxElement1.Location.X); + Assert.IsTrue(checkBoxElement2.Location.Y >= checkBoxElement1.Location.Y); + } - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(checkBoxElement2.LocationOnScreenOnceScrolledIntoView.X >= checkBoxElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(checkBoxElement2.LocationOnScreenOnceScrolledIntoView.Y >= checkBoxElement1.LocationOnScreenOnceScrolledIntoView.Y); - } + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(checkBoxElement2.LocationOnScreenOnceScrolledIntoView.X >= checkBoxElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(checkBoxElement2.LocationOnScreenOnceScrolledIntoView.Y >= checkBoxElement1.LocationOnScreenOnceScrolledIntoView.Y); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.CheckBox", checkBoxElement1.TagName); - Assert.AreEqual("ControlType.CheckBox", checkBoxElement2.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.CheckBox", checkBoxElement1.TagName); + Assert.AreEqual("ControlType.CheckBox", checkBoxElement2.TagName); + } - [TestMethod] - public void Selected() - { - var originalState = checkBoxElement1.Selected; - checkBoxElement1.Click(); - Assert.AreNotEqual(originalState, checkBoxElement1.Selected); - checkBoxElement1.Click(); - Assert.AreEqual(originalState, checkBoxElement1.Selected); - } + [TestMethod] + public void Selected() + { + var originalState = checkBoxElement1.Selected; + checkBoxElement1.Click(); + Assert.AreNotEqual(originalState, checkBoxElement1.Selected); + checkBoxElement1.Click(); + Assert.AreEqual(originalState, checkBoxElement1.Selected); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(checkBoxElement1.Size.Width > 0); - Assert.IsTrue(checkBoxElement1.Size.Height > 0); - Assert.IsTrue(checkBoxElement1.Size.Width <= checkBoxElement2.Size.Width); - Assert.AreEqual(checkBoxElement1.Size.Height, checkBoxElement2.Size.Height); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(checkBoxElement1.Size.Width > 0); + Assert.IsTrue(checkBoxElement1.Size.Height > 0); + Assert.IsTrue(checkBoxElement1.Size.Width <= checkBoxElement2.Size.Width); + Assert.AreEqual(checkBoxElement1.Size.Height, checkBoxElement2.Size.Height); } } diff --git a/UITests/Tests/ComboBox.cs b/UITests/Tests/ComboBox.cs index 0fd20761f..8949572be 100644 --- a/UITests/Tests/ComboBox.cs +++ b/UITests/Tests/ComboBox.cs @@ -18,101 +18,100 @@ using OpenQA.Selenium; using OpenQA.Selenium.Appium.Windows; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class ComboBox : TestBase { - [TestClass] - public class ComboBox : TestBase - { - private static WindowsElement comboBoxElement1 = null; - private static WindowsElement comboBoxElement2 = null; + private static WindowsElement comboBoxElement1 = null; + private static WindowsElement comboBoxElement2 = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("ComboBox"); - comboBoxElement1 = Session.FindElementByAccessibilityId("Combo1"); - Assert.IsNotNull(comboBoxElement1); - comboBoxElement2 = Session.FindElementByAccessibilityId("Combo2"); - Assert.IsNotNull(comboBoxElement2); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("ComboBox"); + comboBoxElement1 = Session.FindElementByAccessibilityId("Combo1"); + Assert.IsNotNull(comboBoxElement1); + comboBoxElement2 = Session.FindElementByAccessibilityId("Combo2"); + Assert.IsNotNull(comboBoxElement2); + } - [TestMethod] - public void Click() - { - // Click comboBoxElement1 to show the list and simply dismiss it - var originalSelectedItem = comboBoxElement1.Text; - comboBoxElement1.Click(); - comboBoxElement1.FindElementByAccessibilityId("Light Dismiss").Click(); - Assert.AreEqual(originalSelectedItem, comboBoxElement1.Text); + [TestMethod] + public void Click() + { + // Click comboBoxElement1 to show the list and simply dismiss it + var originalSelectedItem = comboBoxElement1.Text; + comboBoxElement1.Click(); + comboBoxElement1.FindElementByAccessibilityId("Light Dismiss").Click(); + Assert.AreEqual(originalSelectedItem, comboBoxElement1.Text); - // Click comboBoxElement1 to show the list and select an entry - comboBoxElement1.Click(); - comboBoxElement1.FindElementByName("Yellow").Click(); - Assert.AreEqual("Yellow", comboBoxElement1.Text); - } + // Click comboBoxElement1 to show the list and select an entry + comboBoxElement1.Click(); + comboBoxElement1.FindElementByName("Yellow").Click(); + Assert.AreEqual("Yellow", comboBoxElement1.Text); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(comboBoxElement1.Displayed); - Assert.IsTrue(comboBoxElement2.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(comboBoxElement1.Displayed); + Assert.IsTrue(comboBoxElement2.Displayed); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(comboBoxElement1.Enabled); - Assert.IsTrue(comboBoxElement2.Enabled); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(comboBoxElement1.Enabled); + Assert.IsTrue(comboBoxElement2.Enabled); + } - [TestMethod] - public void Location() - { - Assert.IsTrue(comboBoxElement2.Location.X >= comboBoxElement1.Location.X); - Assert.IsTrue(comboBoxElement2.Location.Y >= comboBoxElement1.Location.Y); - } + [TestMethod] + public void Location() + { + Assert.IsTrue(comboBoxElement2.Location.X >= comboBoxElement1.Location.X); + Assert.IsTrue(comboBoxElement2.Location.Y >= comboBoxElement1.Location.Y); + } - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(comboBoxElement2.LocationOnScreenOnceScrolledIntoView.X >= comboBoxElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(comboBoxElement2.LocationOnScreenOnceScrolledIntoView.Y >= comboBoxElement1.LocationOnScreenOnceScrolledIntoView.Y); - } + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(comboBoxElement2.LocationOnScreenOnceScrolledIntoView.X >= comboBoxElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(comboBoxElement2.LocationOnScreenOnceScrolledIntoView.Y >= comboBoxElement1.LocationOnScreenOnceScrolledIntoView.Y); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.ComboBox", comboBoxElement1.TagName); - Assert.AreEqual("ControlType.ComboBox", comboBoxElement2.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.ComboBox", comboBoxElement1.TagName); + Assert.AreEqual("ControlType.ComboBox", comboBoxElement2.TagName); + } - [TestMethod] - public void SendKeys() - { - // Use the cursor key to scroll through the entries in the combo box - comboBoxElement1.SendKeys(Keys.Down + Keys.Up + Keys.Up + Keys.Up); // Ensure top entry is selected - Assert.AreEqual("Blue", comboBoxElement1.Text); - comboBoxElement1.SendKeys(Keys.Down); - Assert.AreEqual("Green", comboBoxElement1.Text); - comboBoxElement1.SendKeys(Keys.Up); - Assert.AreEqual("Blue", comboBoxElement1.Text); - } + [TestMethod] + public void SendKeys() + { + // Use the cursor key to scroll through the entries in the combo box + comboBoxElement1.SendKeys(Keys.Down + Keys.Up + Keys.Up + Keys.Up); // Ensure top entry is selected + Assert.AreEqual("Blue", comboBoxElement1.Text); + comboBoxElement1.SendKeys(Keys.Down); + Assert.AreEqual("Green", comboBoxElement1.Text); + comboBoxElement1.SendKeys(Keys.Up); + Assert.AreEqual("Blue", comboBoxElement1.Text); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(comboBoxElement1.Size.Width > 0); - Assert.IsTrue(comboBoxElement1.Size.Height > 0); - Assert.IsTrue(comboBoxElement2.Size.Width >= comboBoxElement1.Size.Width); - Assert.IsTrue(comboBoxElement2.Size.Height >= comboBoxElement1.Size.Height); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(comboBoxElement1.Size.Width > 0); + Assert.IsTrue(comboBoxElement1.Size.Height > 0); + Assert.IsTrue(comboBoxElement2.Size.Width >= comboBoxElement1.Size.Width); + Assert.IsTrue(comboBoxElement2.Size.Height >= comboBoxElement1.Size.Height); + } - [TestMethod] - public void Text() - { - comboBoxElement1.SendKeys(Keys.Down + Keys.Up + Keys.Up + Keys.Up); // Ensure top entry is selected - Assert.AreEqual("Blue", comboBoxElement1.Text); - Assert.AreEqual("Courier New", comboBoxElement2.Text); - } + [TestMethod] + public void Text() + { + comboBoxElement1.SendKeys(Keys.Down + Keys.Up + Keys.Up + Keys.Up); // Ensure top entry is selected + Assert.AreEqual("Blue", comboBoxElement1.Text); + Assert.AreEqual("Courier New", comboBoxElement2.Text); } } diff --git a/UITests/Tests/DatePicker.cs b/UITests/Tests/DatePicker.cs index 7b78d0ea8..968e602e8 100644 --- a/UITests/Tests/DatePicker.cs +++ b/UITests/Tests/DatePicker.cs @@ -19,91 +19,89 @@ using System.Threading; -namespace UITests.Tests -{ - [TestClass] - public class DatePicker : TestBase - { - private static WindowsElement datePickerElement1 = null; - private static WindowsElement datePickerElement2 = null; +namespace UITests.Tests; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("DatePicker"); - datePickerElement1 = Session.FindElementByName("Pick a date"); - Assert.IsNotNull(datePickerElement1); - datePickerElement2 = Session.FindElementByAccessibilityId("Control2"); - Assert.IsNotNull(datePickerElement2); - } +[TestClass] +public class DatePicker : TestBase +{ + private static WindowsElement datePickerElement1 = null; + private static WindowsElement datePickerElement2 = null; - [TestMethod] - public void Click() - { - // Click datePickerElement1 to show the picker and simply dismiss it - datePickerElement1.Click(); - var datePickerFlyout = Session.FindElementByAccessibilityId("FlyoutButton"); - Assert.IsNotNull(datePickerFlyout); - Assert.IsTrue(datePickerFlyout.Displayed); - Session.FindElementByAccessibilityId("DatePickerFlyoutPresenter").FindElementByAccessibilityId("DismissButton").Click(); - Thread.Sleep(1000); + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("DatePicker"); + datePickerElement1 = Session.FindElementByName("Pick a date"); + Assert.IsNotNull(datePickerElement1); + datePickerElement2 = Session.FindElementByAccessibilityId("Control2"); + Assert.IsNotNull(datePickerElement2); + } - // Click datePickerElement1 to show the picker and set the year to 2000 - datePickerElement1.Click(); - datePickerFlyout = Session.FindElementByAccessibilityId("DatePickerFlyoutPresenter"); - Assert.IsNotNull(datePickerFlyout); - var yearLoopingSelector = datePickerFlyout.FindElementByAccessibilityId("YearLoopingSelector"); - Assert.IsNotNull(yearLoopingSelector); - var currentYear = yearLoopingSelector.Text; - yearLoopingSelector.FindElementByName("2000").Click(); - Thread.Sleep(1000); - Assert.AreNotEqual(currentYear, yearLoopingSelector.Text); - datePickerFlyout.FindElementByAccessibilityId("AcceptButton").Click(); - } + [TestMethod] + public void Click() + { + // Click datePickerElement1 to show the picker and simply dismiss it + datePickerElement1.Click(); + var datePickerFlyout = Session.FindElementByAccessibilityId("FlyoutButton"); + Assert.IsNotNull(datePickerFlyout); + Assert.IsTrue(datePickerFlyout.Displayed); + Session.FindElementByAccessibilityId("DatePickerFlyoutPresenter").FindElementByAccessibilityId("DismissButton").Click(); + Thread.Sleep(1000); - [TestMethod] - public void Displayed() - { - Assert.IsTrue(datePickerElement1.Displayed); - Assert.IsTrue(datePickerElement2.Displayed); - } + // Click datePickerElement1 to show the picker and set the year to 2000 + datePickerElement1.Click(); + datePickerFlyout = Session.FindElementByAccessibilityId("DatePickerFlyoutPresenter"); + Assert.IsNotNull(datePickerFlyout); + var yearLoopingSelector = datePickerFlyout.FindElementByAccessibilityId("YearLoopingSelector"); + Assert.IsNotNull(yearLoopingSelector); + var currentYear = yearLoopingSelector.Text; + yearLoopingSelector.FindElementByName("2000").Click(); + Thread.Sleep(1000); + Assert.AreNotEqual(currentYear, yearLoopingSelector.Text); + datePickerFlyout.FindElementByAccessibilityId("AcceptButton").Click(); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(datePickerElement1.Enabled); - Assert.IsTrue(datePickerElement2.Enabled); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(datePickerElement1.Displayed); + Assert.IsTrue(datePickerElement2.Displayed); + } - [TestMethod] - public void Location() - { - Assert.IsTrue(datePickerElement2.Location.X >= datePickerElement1.Location.X); - Assert.IsTrue(datePickerElement2.Location.Y >= datePickerElement1.Location.Y); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(datePickerElement1.Enabled); + Assert.IsTrue(datePickerElement2.Enabled); + } - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(datePickerElement2.LocationOnScreenOnceScrolledIntoView.X >= datePickerElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(datePickerElement2.LocationOnScreenOnceScrolledIntoView.Y >= datePickerElement1.LocationOnScreenOnceScrolledIntoView.Y); - } + [TestMethod] + public void Location() + { + Assert.IsTrue(datePickerElement2.Location.X >= datePickerElement1.Location.X); + Assert.IsTrue(datePickerElement2.Location.Y >= datePickerElement1.Location.Y); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Group", datePickerElement1.TagName); - Assert.AreEqual("ControlType.Group", datePickerElement2.TagName); - } + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(datePickerElement2.LocationOnScreenOnceScrolledIntoView.X >= datePickerElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(datePickerElement2.LocationOnScreenOnceScrolledIntoView.Y >= datePickerElement1.LocationOnScreenOnceScrolledIntoView.Y); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(datePickerElement1.Size.Width > 0); - Assert.IsTrue(datePickerElement1.Size.Height > 0); - Assert.IsTrue(datePickerElement2.Size.Width >= datePickerElement1.Size.Width); - Assert.IsTrue(datePickerElement2.Size.Height <= datePickerElement1.Size.Height); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Group", datePickerElement1.TagName); + Assert.AreEqual("ControlType.Group", datePickerElement2.TagName); + } + [TestMethod] + public void Size() + { + Assert.IsTrue(datePickerElement1.Size.Width > 0); + Assert.IsTrue(datePickerElement1.Size.Height > 0); + Assert.IsTrue(datePickerElement2.Size.Width >= datePickerElement1.Size.Width); + Assert.IsTrue(datePickerElement2.Size.Height <= datePickerElement1.Size.Height); } } diff --git a/UITests/Tests/MediaPlayerElement.cs b/UITests/Tests/MediaPlayerElement.cs index cac8f7d61..9ac7cd2bb 100644 --- a/UITests/Tests/MediaPlayerElement.cs +++ b/UITests/Tests/MediaPlayerElement.cs @@ -18,36 +18,35 @@ using OpenQA.Selenium.Appium.Windows; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class MediaPlayerElement : TestBase { - [TestClass] - public class MediaPlayerElement : TestBase - { - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - // Doing this manually due to keyboard layout issues surrounding y and z - var search = Session.FindElementByName("Search"); - search.Clear(); - Thread.Sleep(1_000); - search.SendKeys("MediaPla"); - GetElementByName("MediaPlayerElement").Click(); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + // Doing this manually due to keyboard layout issues surrounding y and z + var search = Session.FindElementByName("Search"); + search.Clear(); + Thread.Sleep(1_000); + search.SendKeys("MediaPla"); + GetElementByName("MediaPlayerElement").Click(); + } - [TestMethod] - public void PlayMedia() - { - WindowsElement play = Session.FindElementByAccessibilityId("PlayPauseButton"); - Assert.IsNotNull(play); - Assert.IsNotNull(Session.FindElementByAccessibilityId("svPanel")); + [TestMethod] + public void PlayMedia() + { + WindowsElement play = Session.FindElementByAccessibilityId("PlayPauseButton"); + Assert.IsNotNull(play); + Assert.IsNotNull(Session.FindElementByAccessibilityId("svPanel")); - // Play the video - play.Click(); - Thread.Sleep(1000); - - // Pause the video - play.Click(); - } + // Play the video + play.Click(); + Thread.Sleep(1000); + + // Pause the video + play.Click(); } } diff --git a/UITests/Tests/PersonPicture.cs b/UITests/Tests/PersonPicture.cs index 69564539d..c7781cb2d 100644 --- a/UITests/Tests/PersonPicture.cs +++ b/UITests/Tests/PersonPicture.cs @@ -17,23 +17,22 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class PersonPicture : TestBase { - [TestClass] - public class PersonPicture : TestBase + [ClassInitialize] + public static void ClassInitialize(TestContext context) { - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("PersonPicture"); - } + OpenControlPage("PersonPicture"); + } - [TestMethod] - public void SwitchOptions() - { - GetElementByName("Profile Image").Click(); - GetElementByName("Display Name").Click(); - GetElementByName("Initials").Click(); - } + [TestMethod] + public void SwitchOptions() + { + GetElementByName("Profile Image").Click(); + GetElementByName("Display Name").Click(); + GetElementByName("Initials").Click(); } } diff --git a/UITests/Tests/ProgressBar.cs b/UITests/Tests/ProgressBar.cs index 241f6792a..9f859c071 100644 --- a/UITests/Tests/ProgressBar.cs +++ b/UITests/Tests/ProgressBar.cs @@ -18,73 +18,72 @@ using OpenQA.Selenium.Appium.Windows; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class ProgressBar : TestBase { - [TestClass] - public class ProgressBar : TestBase - { - private static WindowsElement progressBarElement = null; - private static WindowsElement clickAndHoldButton = null; + private static WindowsElement progressBarElement = null; + private static WindowsElement clickAndHoldButton = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("ProgressBar"); - progressBarElement = Session.FindElementByAccessibilityId("ProgressBar2"); - Assert.IsNotNull(progressBarElement); - // Numberbox is a spinner, thus "Increase" is the button we need - clickAndHoldButton = Session.FindElementByName("Increase"); - Assert.IsNotNull(clickAndHoldButton); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("ProgressBar"); + progressBarElement = Session.FindElementByAccessibilityId("ProgressBar2"); + Assert.IsNotNull(progressBarElement); + // Numberbox is a spinner, thus "Increase" is the button we need + clickAndHoldButton = Session.FindElementByName("Increase"); + Assert.IsNotNull(clickAndHoldButton); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(progressBarElement.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(progressBarElement.Displayed); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(progressBarElement.Enabled); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(progressBarElement.Enabled); + } - [TestMethod] - public void Location() - { - Assert.IsTrue(clickAndHoldButton.Location.X >= progressBarElement.Location.X); - Assert.IsTrue(clickAndHoldButton.Location.Y <= progressBarElement.Location.Y); - } + [TestMethod] + public void Location() + { + Assert.IsTrue(clickAndHoldButton.Location.X >= progressBarElement.Location.X); + Assert.IsTrue(clickAndHoldButton.Location.Y <= progressBarElement.Location.Y); + } - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(clickAndHoldButton.LocationOnScreenOnceScrolledIntoView.X >= progressBarElement.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(clickAndHoldButton.LocationOnScreenOnceScrolledIntoView.Y <= progressBarElement.LocationOnScreenOnceScrolledIntoView.Y); - } + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(clickAndHoldButton.LocationOnScreenOnceScrolledIntoView.X >= progressBarElement.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(clickAndHoldButton.LocationOnScreenOnceScrolledIntoView.Y <= progressBarElement.LocationOnScreenOnceScrolledIntoView.Y); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.ProgressBar", progressBarElement.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.ProgressBar", progressBarElement.TagName); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(progressBarElement.Size.Width > 0); - Assert.IsTrue(progressBarElement.Size.Height > 0); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(progressBarElement.Size.Width > 0); + Assert.IsTrue(progressBarElement.Size.Height > 0); + } - [TestMethod] - public void Text() - { - var originalValue = int.Parse(progressBarElement.Text); - Assert.IsTrue(originalValue >= 0); - clickAndHoldButton.Click(); - Assert.AreEqual(originalValue + 1, int.Parse(progressBarElement.Text)); - clickAndHoldButton.Click(); - Assert.AreEqual(originalValue + 2, int.Parse(progressBarElement.Text)); - } + [TestMethod] + public void Text() + { + var originalValue = int.Parse(progressBarElement.Text); + Assert.IsTrue(originalValue >= 0); + clickAndHoldButton.Click(); + Assert.AreEqual(originalValue + 1, int.Parse(progressBarElement.Text)); + clickAndHoldButton.Click(); + Assert.AreEqual(originalValue + 2, int.Parse(progressBarElement.Text)); } } diff --git a/UITests/Tests/RadioButton.cs b/UITests/Tests/RadioButton.cs index 6968f660f..900203312 100644 --- a/UITests/Tests/RadioButton.cs +++ b/UITests/Tests/RadioButton.cs @@ -18,97 +18,96 @@ using OpenQA.Selenium.Appium.Windows; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class RadioButton : TestBase { - [TestClass] - public class RadioButton : TestBase + private static WindowsElement radioButtonElement1 = null; + private static WindowsElement radioButtonElement2 = null; + + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("RadioButton"); + radioButtonElement1 = Session.FindElementByAccessibilityId("Option1RadioButton"); + Assert.IsNotNull(radioButtonElement1); + radioButtonElement2 = Session.FindElementByAccessibilityId("Option2RadioButton"); + Assert.IsNotNull(radioButtonElement2); + } + + [TestMethod] + public void Click() + { + var radioButtonEventOutput = Session.FindElementByAccessibilityId("Control1Output"); + + radioButtonElement1.Click(); + Assert.AreEqual("You selected Option 1", radioButtonEventOutput.Text); + + radioButtonElement2.Click(); + Assert.AreEqual("You selected Option 2", radioButtonEventOutput.Text); + } + + [TestMethod] + public void Displayed() + { + Assert.IsTrue(radioButtonElement1.Displayed); + Assert.IsTrue(radioButtonElement2.Displayed); + } + + [TestMethod] + public void Enabled() + { + Assert.IsTrue(radioButtonElement1.Enabled); + Assert.IsTrue(radioButtonElement2.Enabled); + } + + [TestMethod] + public void Location() + { + Assert.IsTrue(radioButtonElement2.Location.X >= radioButtonElement1.Location.X); + Assert.IsTrue(radioButtonElement2.Location.Y >= radioButtonElement1.Location.Y); + } + + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(radioButtonElement2.LocationOnScreenOnceScrolledIntoView.X >= radioButtonElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(radioButtonElement2.LocationOnScreenOnceScrolledIntoView.Y >= radioButtonElement1.LocationOnScreenOnceScrolledIntoView.Y); + } + + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.RadioButton", radioButtonElement1.TagName); + Assert.AreEqual("ControlType.RadioButton", radioButtonElement2.TagName); + } + + [TestMethod] + public void Selected() + { + radioButtonElement1.Click(); + Assert.IsTrue(radioButtonElement1.Selected); + Assert.IsFalse(radioButtonElement2.Selected); + + radioButtonElement2.Click(); + Assert.IsTrue(radioButtonElement2.Selected); + Assert.IsFalse(radioButtonElement1.Selected); + } + + [TestMethod] + public void Size() + { + Assert.IsTrue(radioButtonElement1.Size.Width > 0); + Assert.IsTrue(radioButtonElement1.Size.Height > 0); + Assert.AreEqual(radioButtonElement1.Size.Width, radioButtonElement2.Size.Width); + Assert.AreEqual(radioButtonElement1.Size.Height, radioButtonElement2.Size.Height); + } + + [TestMethod] + public void Text() { - private static WindowsElement radioButtonElement1 = null; - private static WindowsElement radioButtonElement2 = null; - - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("RadioButton"); - radioButtonElement1 = Session.FindElementByAccessibilityId("Option1RadioButton"); - Assert.IsNotNull(radioButtonElement1); - radioButtonElement2 = Session.FindElementByAccessibilityId("Option2RadioButton"); - Assert.IsNotNull(radioButtonElement2); - } - - [TestMethod] - public void Click() - { - var radioButtonEventOutput = Session.FindElementByAccessibilityId("Control1Output"); - - radioButtonElement1.Click(); - Assert.AreEqual("You selected Option 1", radioButtonEventOutput.Text); - - radioButtonElement2.Click(); - Assert.AreEqual("You selected Option 2", radioButtonEventOutput.Text); - } - - [TestMethod] - public void Displayed() - { - Assert.IsTrue(radioButtonElement1.Displayed); - Assert.IsTrue(radioButtonElement2.Displayed); - } - - [TestMethod] - public void Enabled() - { - Assert.IsTrue(radioButtonElement1.Enabled); - Assert.IsTrue(radioButtonElement2.Enabled); - } - - [TestMethod] - public void Location() - { - Assert.IsTrue(radioButtonElement2.Location.X >= radioButtonElement1.Location.X); - Assert.IsTrue(radioButtonElement2.Location.Y >= radioButtonElement1.Location.Y); - } - - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(radioButtonElement2.LocationOnScreenOnceScrolledIntoView.X >= radioButtonElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(radioButtonElement2.LocationOnScreenOnceScrolledIntoView.Y >= radioButtonElement1.LocationOnScreenOnceScrolledIntoView.Y); - } - - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.RadioButton", radioButtonElement1.TagName); - Assert.AreEqual("ControlType.RadioButton", radioButtonElement2.TagName); - } - - [TestMethod] - public void Selected() - { - radioButtonElement1.Click(); - Assert.IsTrue(radioButtonElement1.Selected); - Assert.IsFalse(radioButtonElement2.Selected); - - radioButtonElement2.Click(); - Assert.IsTrue(radioButtonElement2.Selected); - Assert.IsFalse(radioButtonElement1.Selected); - } - - [TestMethod] - public void Size() - { - Assert.IsTrue(radioButtonElement1.Size.Width > 0); - Assert.IsTrue(radioButtonElement1.Size.Height > 0); - Assert.AreEqual(radioButtonElement1.Size.Width, radioButtonElement2.Size.Width); - Assert.AreEqual(radioButtonElement1.Size.Height, radioButtonElement2.Size.Height); - } - - [TestMethod] - public void Text() - { - Assert.AreEqual("Option 1", radioButtonElement1.Text); - Assert.AreEqual("Option 2", radioButtonElement2.Text); - } + Assert.AreEqual("Option 1", radioButtonElement1.Text); + Assert.AreEqual("Option 2", radioButtonElement2.Text); } -} \ No newline at end of file +} diff --git a/UITests/Tests/SearchResults.cs b/UITests/Tests/SearchResults.cs index a6f325af7..79271ce04 100644 --- a/UITests/Tests/SearchResults.cs +++ b/UITests/Tests/SearchResults.cs @@ -18,38 +18,37 @@ using OpenQA.Selenium; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class SearchResults : TestBase { - [TestClass] - public class SearchResults : TestBase + [ClassInitialize] + public static void ClassInitialize(TestContext context) { - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - } + } - [TestMethod] - [DataRow("a")] // "a" should return results for all groups. - [TestProperty("Description", "Validate the accessibility of the search results page.")] - public void ValidateSearchResultsPageAccessibility(string searchText) - { - var search = Session.FindElementByName("Search"); - search.Clear(); + [TestMethod] + [DataRow("a")] // "a" should return results for all groups. + [TestProperty("Description", "Validate the accessibility of the search results page.")] + public void ValidateSearchResultsPageAccessibility(string searchText) + { + var search = Session.FindElementByName("Search"); + search.Clear(); - search.SendKeys(searchText); - search.SendKeys(Keys.Enter); + search.SendKeys(searchText); + search.SendKeys(Keys.Enter); - Thread.Sleep(100); + Thread.Sleep(100); - var resultsNavView = Session.FindElementByAccessibilityId("resultsNavView"); - var resultItems = resultsNavView.FindElements(By.ClassName("Microsoft.UI.Xaml.Controls.NavigationViewItem")); + var resultsNavView = Session.FindElementByAccessibilityId("resultsNavView"); + var resultItems = resultsNavView.FindElements(By.ClassName("Microsoft.UI.Xaml.Controls.NavigationViewItem")); - foreach (var menuItem in resultItems) - { - Thread.Sleep(1000); - menuItem.Click(); - AxeHelper.AssertNoAccessibilityErrors(); - } + foreach (var menuItem in resultItems) + { + Thread.Sleep(1000); + menuItem.Click(); + AxeHelper.AssertNoAccessibilityErrors(); } } -} \ No newline at end of file +} diff --git a/UITests/Tests/Slider.cs b/UITests/Tests/Slider.cs index d8af2b585..a32ae8287 100644 --- a/UITests/Tests/Slider.cs +++ b/UITests/Tests/Slider.cs @@ -18,96 +18,95 @@ using OpenQA.Selenium; using OpenQA.Selenium.Appium.Windows; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class Slider : TestBase { - [TestClass] - public class Slider : TestBase - { - private static WindowsElement sliderElement1 = null; - private static WindowsElement sliderElement2 = null; + private static WindowsElement sliderElement1 = null; + private static WindowsElement sliderElement2 = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("Slider"); - sliderElement1 = Session.FindElementByAccessibilityId("Slider1"); - Assert.IsNotNull(sliderElement1); - sliderElement2 = Session.FindElementByAccessibilityId("Slider2"); - Assert.IsNotNull(sliderElement2); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("Slider"); + sliderElement1 = Session.FindElementByAccessibilityId("Slider1"); + Assert.IsNotNull(sliderElement1); + sliderElement2 = Session.FindElementByAccessibilityId("Slider2"); + Assert.IsNotNull(sliderElement2); + } - [TestMethod] - public void Click() - { - sliderElement1.Click(); - Assert.IsTrue(int.Parse(sliderElement1.Text) > 45); // The value of the slider when the center is clicked should be greater than 45 and close to 50 + [TestMethod] + public void Click() + { + sliderElement1.Click(); + Assert.IsTrue(int.Parse(sliderElement1.Text) > 45); // The value of the slider when the center is clicked should be greater than 45 and close to 50 - sliderElement2.Click(); - Assert.AreEqual("750", sliderElement2.Text); // The value of the slider when the center is clicked - } + sliderElement2.Click(); + Assert.AreEqual("750", sliderElement2.Text); // The value of the slider when the center is clicked + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(sliderElement1.Displayed); - Assert.IsTrue(sliderElement2.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(sliderElement1.Displayed); + Assert.IsTrue(sliderElement2.Displayed); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(sliderElement1.Enabled); - Assert.IsTrue(sliderElement2.Enabled); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(sliderElement1.Enabled); + Assert.IsTrue(sliderElement2.Enabled); + } - [TestMethod] - public void Location() - { - Assert.IsTrue(sliderElement1.Location.X >= sliderElement1.Location.X); - Assert.IsTrue(sliderElement1.Location.Y >= sliderElement1.Location.Y); - } + [TestMethod] + public void Location() + { + Assert.IsTrue(sliderElement1.Location.X >= sliderElement1.Location.X); + Assert.IsTrue(sliderElement1.Location.Y >= sliderElement1.Location.Y); + } - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(sliderElement2.LocationOnScreenOnceScrolledIntoView.X >= sliderElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(sliderElement2.LocationOnScreenOnceScrolledIntoView.Y >= sliderElement1.LocationOnScreenOnceScrolledIntoView.Y); - } + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(sliderElement2.LocationOnScreenOnceScrolledIntoView.X >= sliderElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(sliderElement2.LocationOnScreenOnceScrolledIntoView.Y >= sliderElement1.LocationOnScreenOnceScrolledIntoView.Y); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Slider", sliderElement1.TagName); - Assert.AreEqual("ControlType.Slider", sliderElement2.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Slider", sliderElement1.TagName); + Assert.AreEqual("ControlType.Slider", sliderElement2.TagName); + } - [TestMethod] - public void SendKeys() - { - var originalValue = sliderElement1.Text; - // Pressing right arrow will move the slider right and the value should increase by 1 - sliderElement1.SendKeys(Keys.Right); - Assert.AreEqual(int.Parse(originalValue) + 1, int.Parse(sliderElement1.Text)); - // Pressing left arrow will move the slider back to the original value - sliderElement1.SendKeys(Keys.Left); - Assert.AreEqual(originalValue, sliderElement1.Text); - } + [TestMethod] + public void SendKeys() + { + var originalValue = sliderElement1.Text; + // Pressing right arrow will move the slider right and the value should increase by 1 + sliderElement1.SendKeys(Keys.Right); + Assert.AreEqual(int.Parse(originalValue) + 1, int.Parse(sliderElement1.Text)); + // Pressing left arrow will move the slider back to the original value + sliderElement1.SendKeys(Keys.Left); + Assert.AreEqual(originalValue, sliderElement1.Text); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(sliderElement1.Size.Width > 0); - Assert.IsTrue(sliderElement1.Size.Height > 0); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(sliderElement1.Size.Width > 0); + Assert.IsTrue(sliderElement1.Size.Height > 0); + } - [TestMethod] - public void Text() - { - sliderElement1.Click(); - Assert.IsTrue(int.Parse(sliderElement1.Text) > 45); // The value of the slider when the center is clicked should be greater than 45 and close to 50 + [TestMethod] + public void Text() + { + sliderElement1.Click(); + Assert.IsTrue(int.Parse(sliderElement1.Text) > 45); // The value of the slider when the center is clicked should be greater than 45 and close to 50 - sliderElement2.Click(); - Assert.AreEqual(750, int.Parse(sliderElement2.Text)); // The value of the slider when the center is clicked should be 750 - } + sliderElement2.Click(); + Assert.AreEqual(750, int.Parse(sliderElement2.Text)); // The value of the slider when the center is clicked should be 750 } } diff --git a/UITests/Tests/TextBlock.cs b/UITests/Tests/TextBlock.cs index f21545db1..abe5252eb 100644 --- a/UITests/Tests/TextBlock.cs +++ b/UITests/Tests/TextBlock.cs @@ -19,73 +19,72 @@ using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class TextBlock : TestBase { - [TestClass] - public class TextBlock : TestBase - { - private static WindowsElement textBlockElement1 = null; - private static WindowsElement textBlockElement2 = null; + private static WindowsElement textBlockElement1 = null; + private static WindowsElement textBlockElement2 = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("TextBlock"); - textBlockElement1 = Session.FindElementByName("I am a TextBlock."); - Assert.IsNotNull(textBlockElement1); - textBlockElement2 = Session.FindElementByName("I am a styled TextBlock."); - Assert.IsNotNull(textBlockElement2); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("TextBlock"); + textBlockElement1 = Session.FindElementByName("I am a TextBlock."); + Assert.IsNotNull(textBlockElement1); + textBlockElement2 = Session.FindElementByName("I am a styled TextBlock."); + Assert.IsNotNull(textBlockElement2); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(textBlockElement1.Displayed); - Assert.IsTrue(textBlockElement2.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(textBlockElement1.Displayed); + Assert.IsTrue(textBlockElement2.Displayed); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(textBlockElement1.Enabled); - Assert.IsTrue(textBlockElement1.Enabled); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(textBlockElement1.Enabled); + Assert.IsTrue(textBlockElement1.Enabled); + } - [TestMethod] - public void Location() - { - Assert.IsTrue(textBlockElement2.Location.X >= textBlockElement1.Location.X); - Assert.IsTrue(textBlockElement2.Location.Y >= textBlockElement1.Location.Y); - } + [TestMethod] + public void Location() + { + Assert.IsTrue(textBlockElement2.Location.X >= textBlockElement1.Location.X); + Assert.IsTrue(textBlockElement2.Location.Y >= textBlockElement1.Location.Y); + } - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(textBlockElement2.LocationOnScreenOnceScrolledIntoView.X >= textBlockElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(textBlockElement2.LocationOnScreenOnceScrolledIntoView.Y >= textBlockElement1.LocationOnScreenOnceScrolledIntoView.Y); - } + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(textBlockElement2.LocationOnScreenOnceScrolledIntoView.X >= textBlockElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(textBlockElement2.LocationOnScreenOnceScrolledIntoView.Y >= textBlockElement1.LocationOnScreenOnceScrolledIntoView.Y); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Text", textBlockElement1.TagName); - Assert.AreEqual("ControlType.Text", textBlockElement2.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Text", textBlockElement1.TagName); + Assert.AreEqual("ControlType.Text", textBlockElement2.TagName); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(textBlockElement1.Size.Width > 0); - Assert.IsTrue(textBlockElement1.Size.Height > 0); - Assert.IsTrue(textBlockElement2.Size.Width >= textBlockElement1.Size.Width); - Assert.IsTrue(textBlockElement2.Size.Height >= textBlockElement1.Size.Height); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(textBlockElement1.Size.Width > 0); + Assert.IsTrue(textBlockElement1.Size.Height > 0); + Assert.IsTrue(textBlockElement2.Size.Width >= textBlockElement1.Size.Width); + Assert.IsTrue(textBlockElement2.Size.Height >= textBlockElement1.Size.Height); + } - [TestMethod] - public void Text() - { - Assert.AreEqual("I am a TextBlock.", textBlockElement1.Text); - Assert.AreEqual("I am a styled TextBlock.", textBlockElement2.Text); - } + [TestMethod] + public void Text() + { + Assert.AreEqual("I am a TextBlock.", textBlockElement1.Text); + Assert.AreEqual("I am a styled TextBlock.", textBlockElement2.Text); } } diff --git a/UITests/Tests/TextBox.cs b/UITests/Tests/TextBox.cs index dae879c38..cfd2b26a2 100644 --- a/UITests/Tests/TextBox.cs +++ b/UITests/Tests/TextBox.cs @@ -20,115 +20,114 @@ using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class TextBox : TestBase { - [TestClass] - public class TextBox : TestBase + private static WindowsElement textBoxElement1 = null; + private static WindowsElement textBoxElement2 = null; + + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("TextBox"); + textBoxElement1 = Session.FindElementByName("simple TextBox"); + textBoxElement2 = Session.FindElementByName("Enter your name:"); + Assert.IsNotNull(textBoxElement1); + Assert.IsNotNull(textBoxElement2); + } + + [TestMethod] + public void Clear() + { + textBoxElement1.Clear(); + Assert.AreEqual(string.Empty, textBoxElement1.Text); + textBoxElement1.SendKeys("fghij"); + Assert.AreEqual("fghij", textBoxElement1.Text); + textBoxElement1.Clear(); + Assert.AreEqual(string.Empty, textBoxElement1.Text); + } + + [TestMethod] + public void Click() + { + // Click textBoxElement1 to set focus and arbitrarily type + textBoxElement1.Clear(); + Assert.AreEqual(string.Empty, textBoxElement1.Text); + textBoxElement1.Click(); + Thread.Sleep(1_000); + TypeText("1234567890"); + Assert.AreEqual("1234567890", textBoxElement1.Text); + + // Click textBoxElement2 to set focus and arbitrarily type + textBoxElement2.Clear(); + Assert.AreEqual(string.Empty, textBoxElement2.Text); + textBoxElement2.Click(); + Thread.Sleep(1_000); + TypeText("1234567890"); + Assert.AreEqual("1234567890", textBoxElement2.Text); + } + + [TestMethod] + public void Displayed() + { + Assert.IsTrue(textBoxElement1.Displayed); + Assert.IsTrue(textBoxElement2.Displayed); + } + + [TestMethod] + public void Enabled() + { + Assert.IsTrue(textBoxElement1.Enabled); + Assert.IsTrue(textBoxElement2.Enabled); + } + + [TestMethod] + public void Location() + { + Assert.IsTrue(textBoxElement2.Location.X >= textBoxElement1.Location.X); + Assert.IsTrue(textBoxElement2.Location.Y >= textBoxElement1.Location.Y); + } + + [TestMethod] + public void LocationInView() + { + Assert.IsTrue(textBoxElement2.LocationOnScreenOnceScrolledIntoView.X >= textBoxElement1.LocationOnScreenOnceScrolledIntoView.X); + Assert.IsTrue(textBoxElement2.LocationOnScreenOnceScrolledIntoView.Y >= textBoxElement1.LocationOnScreenOnceScrolledIntoView.Y); + } + + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Edit", textBoxElement1.TagName); + Assert.AreEqual("ControlType.Edit", textBoxElement2.TagName); + } + + [TestMethod] + public void SendKeys() + { + textBoxElement1.Clear(); + Assert.AreEqual(string.Empty, textBoxElement1.Text); + textBoxElement1.SendKeys("abc"); + Assert.AreEqual("abc", textBoxElement1.Text); + + // Use Ctrl + A to select all text and backspace to clear the box + textBoxElement1.SendKeys(Keys.Control + "a" + Keys.Control + Keys.Backspace); + Assert.AreEqual(string.Empty, textBoxElement1.Text); + + textBoxElement2.Clear(); + Assert.AreEqual(string.Empty, textBoxElement2.Text); + textBoxElement2.SendKeys("efg"); + Assert.AreEqual("efg", textBoxElement2.Text); + } + + [TestMethod] + public void Text() { - private static WindowsElement textBoxElement1 = null; - private static WindowsElement textBoxElement2 = null; - - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("TextBox"); - textBoxElement1 = Session.FindElementByName("simple TextBox"); - textBoxElement2 = Session.FindElementByName("Enter your name:"); - Assert.IsNotNull(textBoxElement1); - Assert.IsNotNull(textBoxElement2); - } - - [TestMethod] - public void Clear() - { - textBoxElement1.Clear(); - Assert.AreEqual(string.Empty, textBoxElement1.Text); - textBoxElement1.SendKeys("fghij"); - Assert.AreEqual("fghij", textBoxElement1.Text); - textBoxElement1.Clear(); - Assert.AreEqual(string.Empty, textBoxElement1.Text); - } - - [TestMethod] - public void Click() - { - // Click textBoxElement1 to set focus and arbitrarily type - textBoxElement1.Clear(); - Assert.AreEqual(string.Empty, textBoxElement1.Text); - textBoxElement1.Click(); - Thread.Sleep(1_000); - TypeText("1234567890"); - Assert.AreEqual("1234567890", textBoxElement1.Text); - - // Click textBoxElement2 to set focus and arbitrarily type - textBoxElement2.Clear(); - Assert.AreEqual(string.Empty, textBoxElement2.Text); - textBoxElement2.Click(); - Thread.Sleep(1_000); - TypeText("1234567890"); - Assert.AreEqual("1234567890", textBoxElement2.Text); - } - - [TestMethod] - public void Displayed() - { - Assert.IsTrue(textBoxElement1.Displayed); - Assert.IsTrue(textBoxElement2.Displayed); - } - - [TestMethod] - public void Enabled() - { - Assert.IsTrue(textBoxElement1.Enabled); - Assert.IsTrue(textBoxElement2.Enabled); - } - - [TestMethod] - public void Location() - { - Assert.IsTrue(textBoxElement2.Location.X >= textBoxElement1.Location.X); - Assert.IsTrue(textBoxElement2.Location.Y >= textBoxElement1.Location.Y); - } - - [TestMethod] - public void LocationInView() - { - Assert.IsTrue(textBoxElement2.LocationOnScreenOnceScrolledIntoView.X >= textBoxElement1.LocationOnScreenOnceScrolledIntoView.X); - Assert.IsTrue(textBoxElement2.LocationOnScreenOnceScrolledIntoView.Y >= textBoxElement1.LocationOnScreenOnceScrolledIntoView.Y); - } - - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Edit", textBoxElement1.TagName); - Assert.AreEqual("ControlType.Edit", textBoxElement2.TagName); - } - - [TestMethod] - public void SendKeys() - { - textBoxElement1.Clear(); - Assert.AreEqual(string.Empty, textBoxElement1.Text); - textBoxElement1.SendKeys("abc"); - Assert.AreEqual("abc", textBoxElement1.Text); - - // Use Ctrl + A to select all text and backspace to clear the box - textBoxElement1.SendKeys(Keys.Control + "a" + Keys.Control + Keys.Backspace); - Assert.AreEqual(string.Empty, textBoxElement1.Text); - - textBoxElement2.Clear(); - Assert.AreEqual(string.Empty, textBoxElement2.Text); - textBoxElement2.SendKeys("efg"); - Assert.AreEqual("efg", textBoxElement2.Text); - } - - [TestMethod] - public void Text() - { - textBoxElement1.Clear(); - Assert.AreEqual(string.Empty, textBoxElement1.Text); - textBoxElement1.SendKeys("abc"); - Assert.AreEqual("abc", textBoxElement1.Text); - } + textBoxElement1.Clear(); + Assert.AreEqual(string.Empty, textBoxElement1.Text); + textBoxElement1.SendKeys("abc"); + Assert.AreEqual("abc", textBoxElement1.Text); } -} \ No newline at end of file +} diff --git a/UITests/Tests/ToggleButton.cs b/UITests/Tests/ToggleButton.cs index e884b085f..b8666a28d 100644 --- a/UITests/Tests/ToggleButton.cs +++ b/UITests/Tests/ToggleButton.cs @@ -18,79 +18,78 @@ using OpenQA.Selenium.Appium.Windows; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class ToggleButton : TestBase { - [TestClass] - public class ToggleButton : TestBase - { - private static WindowsElement toggleButtonElement = null; + private static WindowsElement toggleButtonElement = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("ToggleButton"); - toggleButtonElement = Session.FindElementByAccessibilityId("Toggle1"); - Assert.IsNotNull(toggleButtonElement); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("ToggleButton"); + toggleButtonElement = Session.FindElementByAccessibilityId("Toggle1"); + Assert.IsNotNull(toggleButtonElement); + } - [TestMethod] - public void Click() - { - var buttonEventOutput = Session.FindElementByAccessibilityId("Control1Output"); - Assert.AreEqual("Off", buttonEventOutput.Text); + [TestMethod] + public void Click() + { + var buttonEventOutput = Session.FindElementByAccessibilityId("Control1Output"); + Assert.AreEqual("Off", buttonEventOutput.Text); - toggleButtonElement.Click(); - Assert.AreEqual("On", buttonEventOutput.Text); - toggleButtonElement.Click(); - Assert.AreEqual("Off", buttonEventOutput.Text); - } + toggleButtonElement.Click(); + Assert.AreEqual("On", buttonEventOutput.Text); + toggleButtonElement.Click(); + Assert.AreEqual("Off", buttonEventOutput.Text); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(toggleButtonElement.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(toggleButtonElement.Displayed); + } - [TestMethod] - public void Enabled() - { - var disableButtonCheckbox = Session.FindElementByAccessibilityId("DisableToggle1"); - Assert.IsTrue(toggleButtonElement.Enabled); + [TestMethod] + public void Enabled() + { + var disableButtonCheckbox = Session.FindElementByAccessibilityId("DisableToggle1"); + Assert.IsTrue(toggleButtonElement.Enabled); - disableButtonCheckbox.Click(); - Assert.IsFalse(toggleButtonElement.Enabled); + disableButtonCheckbox.Click(); + Assert.IsFalse(toggleButtonElement.Enabled); - disableButtonCheckbox.Click(); - Assert.IsTrue(toggleButtonElement.Enabled); - } + disableButtonCheckbox.Click(); + Assert.IsTrue(toggleButtonElement.Enabled); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Button", toggleButtonElement.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Button", toggleButtonElement.TagName); + } - [TestMethod] - public void Selected() - { - toggleButtonElement.Click(); - Assert.IsTrue(toggleButtonElement.Selected); + [TestMethod] + public void Selected() + { + toggleButtonElement.Click(); + Assert.IsTrue(toggleButtonElement.Selected); - toggleButtonElement.Click(); - Assert.IsFalse(toggleButtonElement.Selected); - } + toggleButtonElement.Click(); + Assert.IsFalse(toggleButtonElement.Selected); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(toggleButtonElement.Size.Width > 0); - Assert.IsTrue(toggleButtonElement.Size.Height > 0); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(toggleButtonElement.Size.Width > 0); + Assert.IsTrue(toggleButtonElement.Size.Height > 0); + } - [TestMethod] - public void Text() - { - Assert.AreEqual("ToggleButton", toggleButtonElement.Text); - } + [TestMethod] + public void Text() + { + Assert.AreEqual("ToggleButton", toggleButtonElement.Text); } } diff --git a/UITests/Tests/ToggleSwitch.cs b/UITests/Tests/ToggleSwitch.cs index 526d847e0..00cfda4d1 100644 --- a/UITests/Tests/ToggleSwitch.cs +++ b/UITests/Tests/ToggleSwitch.cs @@ -18,74 +18,73 @@ using OpenQA.Selenium.Appium.Windows; using System.Threading; -namespace UITests.Tests +namespace UITests.Tests; + +[TestClass] +public class ToggleSwitch : TestBase { - [TestClass] - public class ToggleSwitch : TestBase - { - private static WindowsElement toggleSwitchElement = null; + private static WindowsElement toggleSwitchElement = null; - [ClassInitialize] - public static void ClassInitialize(TestContext context) - { - OpenControlPage("ToggleSwitch"); - toggleSwitchElement = Session.FindElementByAccessibilityId("ToggleSwitch2"); - Assert.IsNotNull(toggleSwitchElement); - } + [ClassInitialize] + public static void ClassInitialize(TestContext context) + { + OpenControlPage("ToggleSwitch"); + toggleSwitchElement = Session.FindElementByAccessibilityId("ToggleSwitch2"); + Assert.IsNotNull(toggleSwitchElement); + } - [TestMethod] - public void Click() - { - var originalState = toggleSwitchElement.Selected; - toggleSwitchElement.Click(); - Assert.AreNotEqual(originalState, toggleSwitchElement.Selected); + [TestMethod] + public void Click() + { + var originalState = toggleSwitchElement.Selected; + toggleSwitchElement.Click(); + Assert.AreNotEqual(originalState, toggleSwitchElement.Selected); - Thread.Sleep(1000); - toggleSwitchElement.Click(); - Assert.AreEqual(originalState, toggleSwitchElement.Selected); - } + Thread.Sleep(1000); + toggleSwitchElement.Click(); + Assert.AreEqual(originalState, toggleSwitchElement.Selected); + } - [TestMethod] - public void Displayed() - { - Assert.IsTrue(toggleSwitchElement.Displayed); - } + [TestMethod] + public void Displayed() + { + Assert.IsTrue(toggleSwitchElement.Displayed); + } - [TestMethod] - public void Enabled() - { - Assert.IsTrue(toggleSwitchElement.Enabled); - } + [TestMethod] + public void Enabled() + { + Assert.IsTrue(toggleSwitchElement.Enabled); + } - [TestMethod] - public void Name() - { - Assert.AreEqual("ControlType.Button", toggleSwitchElement.TagName); - } + [TestMethod] + public void Name() + { + Assert.AreEqual("ControlType.Button", toggleSwitchElement.TagName); + } - [TestMethod] - public void Selected() - { - var originalState = toggleSwitchElement.Selected; - toggleSwitchElement.Click(); - Assert.AreNotEqual(originalState, toggleSwitchElement.Selected); + [TestMethod] + public void Selected() + { + var originalState = toggleSwitchElement.Selected; + toggleSwitchElement.Click(); + Assert.AreNotEqual(originalState, toggleSwitchElement.Selected); - Thread.Sleep(1000); - toggleSwitchElement.Click(); - Assert.AreEqual(originalState, toggleSwitchElement.Selected); - } + Thread.Sleep(1000); + toggleSwitchElement.Click(); + Assert.AreEqual(originalState, toggleSwitchElement.Selected); + } - [TestMethod] - public void Size() - { - Assert.IsTrue(toggleSwitchElement.Size.Width > 0); - Assert.IsTrue(toggleSwitchElement.Size.Height > 0); - } + [TestMethod] + public void Size() + { + Assert.IsTrue(toggleSwitchElement.Size.Width > 0); + Assert.IsTrue(toggleSwitchElement.Size.Height > 0); + } - [TestMethod] - public void Text() - { - Assert.AreEqual("Toggle work Working", toggleSwitchElement.Text); - } + [TestMethod] + public void Text() + { + Assert.AreEqual("Toggle work Working", toggleSwitchElement.Text); } } diff --git a/WinUIGallery/AllControlsPage.xaml.cs b/WinUIGallery/AllControlsPage.xaml.cs index bffb0cab2..9439c2a80 100644 --- a/WinUIGallery/AllControlsPage.xaml.cs +++ b/WinUIGallery/AllControlsPage.xaml.cs @@ -11,26 +11,25 @@ using System.Linq; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery +namespace WinUIGallery; + +/// +/// A page that displays a grouped collection of items. +/// +public sealed partial class AllControlsPage : ItemsPageBase { - /// - /// A page that displays a grouped collection of items. - /// - public sealed partial class AllControlsPage : ItemsPageBase + public AllControlsPage() { - public AllControlsPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - protected override void OnNavigatedTo(NavigationEventArgs e) - { - NavigationRootPageArgs args = (NavigationRootPageArgs)e.Parameter; + protected override void OnNavigatedTo(NavigationEventArgs e) + { + NavigationRootPageArgs args = (NavigationRootPageArgs)e.Parameter; - var menuItem = (Microsoft.UI.Xaml.Controls.NavigationViewItem)args.NavigationRootPage.NavigationView.MenuItems.ElementAt(2); - menuItem.IsSelected = true; + var menuItem = (Microsoft.UI.Xaml.Controls.NavigationViewItem)args.NavigationRootPage.NavigationView.MenuItems.ElementAt(2); + menuItem.IsSelected = true; - Items = ControlInfoDataSource.Instance.Groups.Where(g => !g.IsSpecialSection).SelectMany(g => g.Items).OrderBy(i => i.Title).ToList(); - } + Items = ControlInfoDataSource.Instance.Groups.Where(g => !g.IsSpecialSection).SelectMany(g => g.Items).OrderBy(i => i.Title).ToList(); } } diff --git a/WinUIGallery/AnimatedVisuals/LottieLogo1.cs b/WinUIGallery/AnimatedVisuals/LottieLogo1.cs index b40048a71..69eb317fb 100644 --- a/WinUIGallery/AnimatedVisuals/LottieLogo1.cs +++ b/WinUIGallery/AnimatedVisuals/LottieLogo1.cs @@ -13,5035 +13,5034 @@ using Microsoft.UI; using Microsoft.UI.Composition; -namespace AnimatedVisuals +namespace AnimatedVisuals; + +sealed class LottieLogo1 : IAnimatedVisualSource { - sealed class LottieLogo1 : IAnimatedVisualSource + public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics) + { + diagnostics = null; + return new AnimatedVisual(compositor); + } + + sealed class AnimatedVisual : IAnimatedVisual { - public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics) - { - diagnostics = null; - return new AnimatedVisual(compositor); - } - - sealed class AnimatedVisual : IAnimatedVisual - { - const long c_durationTicks = 59670000; - readonly Compositor _c; - readonly ExpressionAnimation _reusableExpressionAnimation; - CompositionColorBrush _colorBrush_AlmostTeal_FF007A87; - CompositionColorBrush _colorBrush_White; - CompositionPath _compositionPath_00; - CompositionPath _compositionPath_01; - CompositionPath _compositionPath_02; - CompositionPath _compositionPath_03; - CompositionPath _compositionPath_04; - CompositionPath _compositionPath_05; - CompositionPath _compositionPath_06; - CompositionPath _compositionPath_07; - CompositionPath _compositionPath_08; - CubicBezierEasingFunction _cubicBezierEasingFunction_02; - CubicBezierEasingFunction _cubicBezierEasingFunction_03; - CubicBezierEasingFunction _cubicBezierEasingFunction_04; - CubicBezierEasingFunction _cubicBezierEasingFunction_05; - CubicBezierEasingFunction _cubicBezierEasingFunction_07; - CubicBezierEasingFunction _cubicBezierEasingFunction_08; - CubicBezierEasingFunction _cubicBezierEasingFunction_11; - CubicBezierEasingFunction _cubicBezierEasingFunction_12; - CubicBezierEasingFunction _cubicBezierEasingFunction_15; - CubicBezierEasingFunction _cubicBezierEasingFunction_16; - CubicBezierEasingFunction _cubicBezierEasingFunction_23; - CompositionEllipseGeometry _ellipse_4p7; - StepEasingFunction _holdThenStepEasingFunction; - LinearEasingFunction _linearEasingFunction; - ContainerVisual _root; - ScalarKeyFrameAnimation _scalarAnimation_0_to_0p249; - ScalarKeyFrameAnimation _scalarAnimation_0_to_1_2; - ScalarKeyFrameAnimation _scalarAnimation_0p87_to_0_02; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_10; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_12; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_13; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_14; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_15; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_18; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_19; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_27; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_28; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_30; - ScalarKeyFrameAnimation _scalarAnimation_1_to_0_31; - ScalarKeyFrameAnimation _scalarAnimation_to_1_02; - ScalarKeyFrameAnimation _scalarAnimation_to_1_06; - ExpressionAnimation _scalarExpressionAnimation; - StepEasingFunction _stepThenHoldEasingFunction; - Vector2KeyFrameAnimation _vector2Animation_02; - Vector2KeyFrameAnimation _vector2Animation_03; - Vector2KeyFrameAnimation _vector2Animation_04; - Vector2KeyFrameAnimation _vector2Animation_05; - Vector2KeyFrameAnimation _vector2Animation_06; - Vector2KeyFrameAnimation _vector2Animation_07; + const long c_durationTicks = 59670000; + readonly Compositor _c; + readonly ExpressionAnimation _reusableExpressionAnimation; + CompositionColorBrush _colorBrush_AlmostTeal_FF007A87; + CompositionColorBrush _colorBrush_White; + CompositionPath _compositionPath_00; + CompositionPath _compositionPath_01; + CompositionPath _compositionPath_02; + CompositionPath _compositionPath_03; + CompositionPath _compositionPath_04; + CompositionPath _compositionPath_05; + CompositionPath _compositionPath_06; + CompositionPath _compositionPath_07; + CompositionPath _compositionPath_08; + CubicBezierEasingFunction _cubicBezierEasingFunction_02; + CubicBezierEasingFunction _cubicBezierEasingFunction_03; + CubicBezierEasingFunction _cubicBezierEasingFunction_04; + CubicBezierEasingFunction _cubicBezierEasingFunction_05; + CubicBezierEasingFunction _cubicBezierEasingFunction_07; + CubicBezierEasingFunction _cubicBezierEasingFunction_08; + CubicBezierEasingFunction _cubicBezierEasingFunction_11; + CubicBezierEasingFunction _cubicBezierEasingFunction_12; + CubicBezierEasingFunction _cubicBezierEasingFunction_15; + CubicBezierEasingFunction _cubicBezierEasingFunction_16; + CubicBezierEasingFunction _cubicBezierEasingFunction_23; + CompositionEllipseGeometry _ellipse_4p7; + StepEasingFunction _holdThenStepEasingFunction; + LinearEasingFunction _linearEasingFunction; + ContainerVisual _root; + ScalarKeyFrameAnimation _scalarAnimation_0_to_0p249; + ScalarKeyFrameAnimation _scalarAnimation_0_to_1_2; + ScalarKeyFrameAnimation _scalarAnimation_0p87_to_0_02; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_10; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_12; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_13; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_14; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_15; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_18; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_19; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_27; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_28; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_30; + ScalarKeyFrameAnimation _scalarAnimation_1_to_0_31; + ScalarKeyFrameAnimation _scalarAnimation_to_1_02; + ScalarKeyFrameAnimation _scalarAnimation_to_1_06; + ExpressionAnimation _scalarExpressionAnimation; + StepEasingFunction _stepThenHoldEasingFunction; + Vector2KeyFrameAnimation _vector2Animation_02; + Vector2KeyFrameAnimation _vector2Animation_03; + Vector2KeyFrameAnimation _vector2Animation_04; + Vector2KeyFrameAnimation _vector2Animation_05; + Vector2KeyFrameAnimation _vector2Animation_06; + Vector2KeyFrameAnimation _vector2Animation_07; + + // Rectangle Path 1 + CompositionColorBrush ColorBrush_AlmostDarkTurquoise_FF00D1C1() + { + return _c.CreateColorBrush(Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x00, 0xD1, 0xC1)); + } - // Rectangle Path 1 - CompositionColorBrush ColorBrush_AlmostDarkTurquoise_FF00D1C1() - { - return _c.CreateColorBrush(Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x00, 0xD1, 0xC1)); - } + CompositionColorBrush ColorBrush_AlmostTeal_FF007A87() + { + return _colorBrush_AlmostTeal_FF007A87 = _c.CreateColorBrush(Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x00, 0x7A, 0x87)); + } - CompositionColorBrush ColorBrush_AlmostTeal_FF007A87() - { - return _colorBrush_AlmostTeal_FF007A87 = _c.CreateColorBrush(Microsoft.UI.ColorHelper.FromArgb(0xFF, 0x00, 0x7A, 0x87)); - } + CompositionColorBrush ColorBrush_White() + { + return _colorBrush_White = _c.CreateColorBrush(Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xFF, 0xFF, 0xFF)); + } - CompositionColorBrush ColorBrush_White() - { - return _colorBrush_White = _c.CreateColorBrush(Microsoft.UI.ColorHelper.FromArgb(0xFF, 0xFF, 0xFF, 0xFF)); - } + CompositionPath CompositionPath_00() + { + var result = _compositionPath_00 = new CompositionPath(Geometry_00()); + return result; + } - CompositionPath CompositionPath_00() - { - var result = _compositionPath_00 = new CompositionPath(Geometry_00()); - return result; - } + CompositionPath CompositionPath_01() + { + var result = _compositionPath_01 = new CompositionPath(Geometry_01()); + return result; + } - CompositionPath CompositionPath_01() - { - var result = _compositionPath_01 = new CompositionPath(Geometry_01()); - return result; - } + CompositionPath CompositionPath_02() + { + var result = _compositionPath_02 = new CompositionPath(Geometry_02()); + return result; + } - CompositionPath CompositionPath_02() - { - var result = _compositionPath_02 = new CompositionPath(Geometry_02()); - return result; - } + CompositionPath CompositionPath_03() + { + var result = _compositionPath_03 = new CompositionPath(Geometry_03()); + return result; + } - CompositionPath CompositionPath_03() - { - var result = _compositionPath_03 = new CompositionPath(Geometry_03()); - return result; - } + CompositionPath CompositionPath_04() + { + var result = _compositionPath_04 = new CompositionPath(Geometry_04()); + return result; + } - CompositionPath CompositionPath_04() - { - var result = _compositionPath_04 = new CompositionPath(Geometry_04()); - return result; - } + CompositionPath CompositionPath_05() + { + var result = _compositionPath_05 = new CompositionPath(Geometry_05()); + return result; + } - CompositionPath CompositionPath_05() - { - var result = _compositionPath_05 = new CompositionPath(Geometry_05()); - return result; - } + CompositionPath CompositionPath_06() + { + var result = _compositionPath_06 = new CompositionPath(Geometry_06()); + return result; + } - CompositionPath CompositionPath_06() - { - var result = _compositionPath_06 = new CompositionPath(Geometry_06()); - return result; - } + CompositionPath CompositionPath_07() + { + var result = _compositionPath_07 = new CompositionPath(Geometry_07()); + return result; + } - CompositionPath CompositionPath_07() - { - var result = _compositionPath_07 = new CompositionPath(Geometry_07()); - return result; - } + CompositionPath CompositionPath_08() + { + var result = _compositionPath_08 = new CompositionPath(Geometry_08()); + return result; + } - CompositionPath CompositionPath_08() - { - var result = _compositionPath_08 = new CompositionPath(Geometry_08()); - return result; - } + // Layer (Shape): Dot-Y + CompositionContainerShape ContainerShape_00() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_01()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_00()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): Dot-Y - CompositionContainerShape ContainerShape_00() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_01()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_00()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): Dot-Y + CompositionContainerShape ContainerShape_01() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_02()); + return result; + } - // Layer (Shape): Dot-Y - CompositionContainerShape ContainerShape_01() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_02()); - return result; - } + // Transforms for Bncr + CompositionContainerShape ContainerShape_02() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(164.781998F, 57.4729996F)); + var shapes = result.Shapes; + shapes.Add(ContainerShape_03()); + result.StartAnimation("Position", Vector2Animation_01()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(60,60)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for Bncr - CompositionContainerShape ContainerShape_02() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(164.781998F, 57.4729996F)); - var shapes = result.Shapes; - shapes.Add(ContainerShape_03()); - result.StartAnimation("Position", Vector2Animation_01()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(60,60)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Transforms for Dot-Y + CompositionContainerShape ContainerShape_03() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(43.2630005F, 59.75F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_01()); + result.StartAnimation("Position", Vector2Animation_00()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", ScalarExpressionAnimation()); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for Dot-Y - CompositionContainerShape ContainerShape_03() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(43.2630005F, 59.75F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_01()); - result.StartAnimation("Position", Vector2Animation_00()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", ScalarExpressionAnimation()); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E3-Y + CompositionContainerShape ContainerShape_04() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_05()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_00()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): E3-Y - CompositionContainerShape ContainerShape_04() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_05()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_00()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E3-Y + CompositionContainerShape ContainerShape_05() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_06()); + return result; + } - // Layer (Shape): E3-Y - CompositionContainerShape ContainerShape_05() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_06()); - return result; - } + // Transforms for E3-Y + CompositionContainerShape ContainerShape_06() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(119.167F, 57.4790001F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_02()); + result.StartAnimation("Position", Vector2Animation_02()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(345.124,261.801)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for E3-Y - CompositionContainerShape ContainerShape_06() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(119.167F, 57.4790001F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_02()); - result.StartAnimation("Position", Vector2Animation_02()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(345.124,261.801)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E3-B + CompositionContainerShape ContainerShape_07() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_08()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_01()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): E3-B - CompositionContainerShape ContainerShape_07() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_08()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_01()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E3-B + CompositionContainerShape ContainerShape_08() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_09()); + return result; + } - // Layer (Shape): E3-B - CompositionContainerShape ContainerShape_08() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_09()); - return result; - } + // Transforms for E3-Y + CompositionContainerShape ContainerShape_09() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(119.167F, 57.4790001F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_03()); + result.StartAnimation("Position", _vector2Animation_02); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(345.124,261.801)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for E3-Y - CompositionContainerShape ContainerShape_09() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(119.167F, 57.4790001F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_03()); - result.StartAnimation("Position", _vector2Animation_02); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(345.124,261.801)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): I-Y + CompositionContainerShape ContainerShape_10() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_11()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_01()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): I-Y - CompositionContainerShape ContainerShape_10() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_11()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_01()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): I-Y + CompositionContainerShape ContainerShape_11() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_12()); + return result; + } - // Layer (Shape): I-Y - CompositionContainerShape ContainerShape_11() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_12()); - return result; - } + // Transforms for I-Y + CompositionContainerShape ContainerShape_12() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(93.5940018F, 62.8610001F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_04()); + result.StartAnimation("Position", Vector2Animation_03()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(303.802,282.182)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for I-Y - CompositionContainerShape ContainerShape_12() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(93.5940018F, 62.8610001F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_04()); - result.StartAnimation("Position", Vector2Animation_03()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(303.802,282.182)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): I-B + CompositionContainerShape ContainerShape_13() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_14()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_02()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): I-B - CompositionContainerShape ContainerShape_13() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_14()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_02()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): I-B + CompositionContainerShape ContainerShape_14() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_15()); + return result; + } - // Layer (Shape): I-B - CompositionContainerShape ContainerShape_14() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_15()); - return result; - } + // Transforms for I-Y + CompositionContainerShape ContainerShape_15() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(93.5940018F, 62.8610001F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_05()); + result.StartAnimation("Position", _vector2Animation_03); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(303.802,282.182)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for I-Y - CompositionContainerShape ContainerShape_15() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(93.5940018F, 62.8610001F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_05()); - result.StartAnimation("Position", _vector2Animation_03); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(303.802,282.182)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E2-Y + CompositionContainerShape ContainerShape_16() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_17()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_02()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): E2-Y - CompositionContainerShape ContainerShape_16() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_17()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_02()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E2-Y + CompositionContainerShape ContainerShape_17() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_18()); + return result; + } - // Layer (Shape): E2-Y - CompositionContainerShape ContainerShape_17() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_18()); - return result; - } + // Transforms for E2-Y + CompositionContainerShape ContainerShape_18() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(109.092003F, 33.6100006F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_06()); + result.StartAnimation("Position", Vector2Animation_04()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(332.05,237.932)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for E2-Y - CompositionContainerShape ContainerShape_18() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(109.092003F, 33.6100006F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_06()); - result.StartAnimation("Position", Vector2Animation_04()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(332.05,237.932)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E2-B + CompositionContainerShape ContainerShape_19() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_20()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_03()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): E2-B - CompositionContainerShape ContainerShape_19() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_20()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_03()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E2-B + CompositionContainerShape ContainerShape_20() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_21()); + return result; + } - // Layer (Shape): E2-B - CompositionContainerShape ContainerShape_20() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_21()); - return result; - } + // Transforms for E2-Y + CompositionContainerShape ContainerShape_21() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(109.092003F, 33.6100006F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_07()); + result.StartAnimation("Position", _vector2Animation_04); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(332.05,237.932)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for E2-Y - CompositionContainerShape ContainerShape_21() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(109.092003F, 33.6100006F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_07()); - result.StartAnimation("Position", _vector2Animation_04); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(332.05,237.932)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E1-Y + CompositionContainerShape ContainerShape_22() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_23()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_03()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): E1-Y - CompositionContainerShape ContainerShape_22() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_23()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_03()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E1-Y + CompositionContainerShape ContainerShape_23() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_24()); + return result; + } - // Layer (Shape): E1-Y - CompositionContainerShape ContainerShape_23() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_24()); - return result; - } + // Transforms for E1-Y + CompositionContainerShape ContainerShape_24() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(113.714996F, 9.14599991F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_08()); + result.StartAnimation("Position", Vector2Animation_05()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(344.672,214.842)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for E1-Y - CompositionContainerShape ContainerShape_24() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(113.714996F, 9.14599991F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_08()); - result.StartAnimation("Position", Vector2Animation_05()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(344.672,214.842)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E1-B + CompositionContainerShape ContainerShape_25() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_26()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_04()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): E1-B - CompositionContainerShape ContainerShape_25() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_26()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_04()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): E1-B + CompositionContainerShape ContainerShape_26() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_27()); + return result; + } - // Layer (Shape): E1-B - CompositionContainerShape ContainerShape_26() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_27()); - return result; - } + // Transforms for E1-Y + CompositionContainerShape ContainerShape_27() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(113.714996F, 9.14599991F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_09()); + result.StartAnimation("Position", _vector2Animation_05); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(344.672,214.842)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for E1-Y - CompositionContainerShape ContainerShape_27() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(113.714996F, 9.14599991F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_09()); - result.StartAnimation("Position", _vector2Animation_05); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(344.672,214.842)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1a-Y + CompositionContainerShape ContainerShape_28() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_29()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_04()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T1a-Y - CompositionContainerShape ContainerShape_28() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_29()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_04()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1a-Y + CompositionContainerShape ContainerShape_29() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_30()); + return result; + } - // Layer (Shape): T1a-Y - CompositionContainerShape ContainerShape_29() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_30()); - return result; - } + // Transforms for T1a-Y + CompositionContainerShape ContainerShape_30() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(39.0429993F, 48.6780014F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_10()); + result.StartAnimation("Position", Vector2Animation_06()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(250,250)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for T1a-Y - CompositionContainerShape ContainerShape_30() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(39.0429993F, 48.6780014F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_10()); - result.StartAnimation("Position", Vector2Animation_06()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(250,250)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T2b-Y + CompositionContainerShape ContainerShape_31() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_11()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_05()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T2b-Y - CompositionContainerShape ContainerShape_31() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_11()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_05()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T2a-Y + CompositionContainerShape ContainerShape_32() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_12()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_06()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T2a-Y - CompositionContainerShape ContainerShape_32() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_12()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_06()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T2b-B + CompositionContainerShape ContainerShape_33() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_13()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_05()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T2b-B - CompositionContainerShape ContainerShape_33() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_13()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_05()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1b-Y + CompositionContainerShape ContainerShape_34() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_14()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_07()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T1b-Y - CompositionContainerShape ContainerShape_34() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_14()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_07()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1b-B + CompositionContainerShape ContainerShape_35() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_15()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_to_1_02); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T1b-B - CompositionContainerShape ContainerShape_35() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_15()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_to_1_02); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): O-Y + CompositionContainerShape ContainerShape_36() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_37()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_06()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): O-Y - CompositionContainerShape ContainerShape_36() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_37()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_06()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): O-Y + CompositionContainerShape ContainerShape_37() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_38()); + return result; + } - // Layer (Shape): O-Y - CompositionContainerShape ContainerShape_37() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_38()); - return result; - } + // Transforms for O-Y + CompositionContainerShape ContainerShape_38() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(-62.7919998F, 73.0569992F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_16()); + result.StartAnimation("Position", Vector2Animation_08()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for O-Y - CompositionContainerShape ContainerShape_38() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(-62.7919998F, 73.0569992F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_16()); - result.StartAnimation("Position", Vector2Animation_08()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): O-B + CompositionContainerShape ContainerShape_39() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_40()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_to_1_06); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): O-B - CompositionContainerShape ContainerShape_39() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_40()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_to_1_06); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): O-B + CompositionContainerShape ContainerShape_40() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_41()); + return result; + } - // Layer (Shape): O-B - CompositionContainerShape ContainerShape_40() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_41()); - return result; - } + // Transforms for O-B + CompositionContainerShape ContainerShape_41() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(-62.7919998F, 73.0569992F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_17()); + result.StartAnimation("Position", Vector2Animation_09()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for O-B - CompositionContainerShape ContainerShape_41() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(-62.7919998F, 73.0569992F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_17()); - result.StartAnimation("Position", Vector2Animation_09()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1a-Y 2 + CompositionContainerShape ContainerShape_42() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_43()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_07()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T1a-Y 2 - CompositionContainerShape ContainerShape_42() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_43()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_07()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1a-Y 2 + CompositionContainerShape ContainerShape_43() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_44()); + return result; + } - // Layer (Shape): T1a-Y 2 - CompositionContainerShape ContainerShape_43() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_44()); - return result; - } + // Transforms for T1a-Y 2 + CompositionContainerShape ContainerShape_44() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(39.0429993F, 48.6780014F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_18()); + result.StartAnimation("Position", _vector2Animation_06); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(250,250)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for T1a-Y 2 - CompositionContainerShape ContainerShape_44() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(39.0429993F, 48.6780014F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_18()); - result.StartAnimation("Position", _vector2Animation_06); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(250,250)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T2a-B + CompositionContainerShape ContainerShape_45() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_19()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_08()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T2a-B - CompositionContainerShape ContainerShape_45() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_19()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_08()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1a-B + CompositionContainerShape ContainerShape_46() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_47()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_09()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): T1a-B - CompositionContainerShape ContainerShape_46() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_47()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_09()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): T1a-B + CompositionContainerShape ContainerShape_47() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_48()); + return result; + } - // Layer (Shape): T1a-B - CompositionContainerShape ContainerShape_47() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_48()); - return result; - } + // Transforms for T1a-Y + CompositionContainerShape ContainerShape_48() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(39.0429993F, 48.6780014F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_20()); + result.StartAnimation("Position", _vector2Animation_06); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(250,250)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for T1a-Y - CompositionContainerShape ContainerShape_48() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(39.0429993F, 48.6780014F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_20()); - result.StartAnimation("Position", _vector2Animation_06); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(250,250)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): Dot-Y + CompositionContainerShape ContainerShape_49() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(ContainerShape_50()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_08()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): Dot-Y - CompositionContainerShape ContainerShape_49() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(ContainerShape_50()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_08()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): Dot-Y + CompositionContainerShape ContainerShape_50() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_51()); + return result; + } - // Layer (Shape): Dot-Y - CompositionContainerShape ContainerShape_50() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_51()); - return result; - } + // Transforms for N + CompositionContainerShape ContainerShape_51() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(-33.6669998F, 8.18200016F)); + var shapes = result.Shapes; + shapes.Add(ContainerShape_52()); + result.StartAnimation("Position", Vector2Animation_11()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(60,60)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for N - CompositionContainerShape ContainerShape_51() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(-33.6669998F, 8.18200016F)); - var shapes = result.Shapes; - shapes.Add(ContainerShape_52()); - result.StartAnimation("Position", Vector2Animation_11()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(60,60)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Transforms for Dot-Y + CompositionContainerShape ContainerShape_52() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(39.875F, 60)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_21()); + result.StartAnimation("Position", Vector2Animation_10()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for Dot-Y - CompositionContainerShape ContainerShape_52() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(39.875F, 60)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_21()); - result.StartAnimation("Position", Vector2Animation_10()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): L-Y + CompositionContainerShape ContainerShape_53() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_22()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_10()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): L-Y - CompositionContainerShape ContainerShape_53() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_22()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_10()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): L-B + CompositionContainerShape ContainerShape_54() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_23()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_11()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): L-B - CompositionContainerShape ContainerShape_54() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_23()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_1_11()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): Dot1 + CompositionContainerShape ContainerShape_55() + { + var result = _c.CreateContainerShape(); + var shapes = result.Shapes; + shapes.Add(ContainerShape_56()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_0()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): Dot1 - CompositionContainerShape ContainerShape_55() - { - var result = _c.CreateContainerShape(); - var shapes = result.Shapes; - shapes.Add(ContainerShape_56()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_to_0()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): Dot1 + CompositionContainerShape ContainerShape_56() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); + var shapes = result.Shapes; + shapes.Add(ContainerShape_57()); + return result; + } - // Layer (Shape): Dot1 - CompositionContainerShape ContainerShape_56() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 154.457001F, 287.821991F); - var shapes = result.Shapes; - shapes.Add(ContainerShape_57()); - return result; - } + // Transforms for Dot1 + CompositionContainerShape ContainerShape_57() + { + var result = _c.CreateContainerShape(); + var propertySet = result.Properties; + propertySet.InsertVector2("Position", new Vector2(295.770996F, 108.994003F)); + var shapes = result.Shapes; + shapes.Add(SpriteShape_24()); + result.StartAnimation("Position", Vector2Animation_12()); + var controller = result.TryGetAnimationController("Position"); + controller.Pause(); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "(_.Progress * 0.9835165) + 0.01648352"; + _reusableExpressionAnimation.SetReferenceParameter("_", _root); + controller.StartAnimation("Progress", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("Offset", _reusableExpressionAnimation); + return result; + } - // Transforms for Dot1 - CompositionContainerShape ContainerShape_57() - { - var result = _c.CreateContainerShape(); - var propertySet = result.Properties; - propertySet.InsertVector2("Position", new Vector2(295.770996F, 108.994003F)); - var shapes = result.Shapes; - shapes.Add(SpriteShape_24()); - result.StartAnimation("Position", Vector2Animation_12()); - var controller = result.TryGetAnimationController("Position"); - controller.Pause(); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "(_.Progress * 0.9835165) + 0.01648352"; - _reusableExpressionAnimation.SetReferenceParameter("_", _root); - controller.StartAnimation("Progress", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.Position - Vector2(196.791,266.504)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("Offset", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S1-Y + CompositionContainerShape ContainerShape_58() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_25()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_10()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S1-Y - CompositionContainerShape ContainerShape_58() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_25()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_10()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S2-Y + CompositionContainerShape ContainerShape_59() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_26()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_10); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S2-Y - CompositionContainerShape ContainerShape_59() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_26()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_10); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S7 + CompositionContainerShape ContainerShape_60() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_27()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_13()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S7 - CompositionContainerShape ContainerShape_60() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_27()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_13()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S8 + CompositionContainerShape ContainerShape_61() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_28()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_13); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S8 - CompositionContainerShape ContainerShape_61() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_28()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_13); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S3-Y + CompositionContainerShape ContainerShape_62() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_29()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_15()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S3-Y - CompositionContainerShape ContainerShape_62() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_29()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_15()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S4-Y + CompositionContainerShape ContainerShape_63() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_30()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_15); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S4-Y - CompositionContainerShape ContainerShape_63() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_30()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_15); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S5-Y + CompositionContainerShape ContainerShape_64() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_31()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_15); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S5-Y - CompositionContainerShape ContainerShape_64() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_31()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_15); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S6-Y + CompositionContainerShape ContainerShape_65() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_32()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_15); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S6-Y - CompositionContainerShape ContainerShape_65() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_32()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_15); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S3-Y 2 + CompositionContainerShape ContainerShape_66() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_33()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_19()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S3-Y 2 - CompositionContainerShape ContainerShape_66() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_33()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_19()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S4-Y 2 + CompositionContainerShape ContainerShape_67() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_34()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_19); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S4-Y 2 - CompositionContainerShape ContainerShape_67() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_34()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_19); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S5-Y 2 + CompositionContainerShape ContainerShape_68() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_35()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_19); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S5-Y 2 - CompositionContainerShape ContainerShape_68() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_35()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_19); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S11 + CompositionContainerShape ContainerShape_69() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_36()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_22()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S11 - CompositionContainerShape ContainerShape_69() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_36()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_22()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S12 + CompositionContainerShape ContainerShape_70() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_37()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_24()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S12 - CompositionContainerShape ContainerShape_70() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_37()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_24()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S13 + CompositionContainerShape ContainerShape_71() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_38()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_26()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S13 - CompositionContainerShape ContainerShape_71() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_38()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_26()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S3-Y 3 + CompositionContainerShape ContainerShape_72() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_39()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_28()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S3-Y 3 - CompositionContainerShape ContainerShape_72() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_39()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_28()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S4-Y 3 + CompositionContainerShape ContainerShape_73() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_40()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_28); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S4-Y 3 - CompositionContainerShape ContainerShape_73() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_40()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_28); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S5-Y 3 + CompositionContainerShape ContainerShape_74() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_41()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_28); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S5-Y 3 - CompositionContainerShape ContainerShape_74() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_41()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_28); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S3-Y 4 + CompositionContainerShape ContainerShape_75() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_42()); + result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_31()); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S3-Y 4 - CompositionContainerShape ContainerShape_75() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_42()); - result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0_31()); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S4-Y 4 + CompositionContainerShape ContainerShape_76() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_43()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_31); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S4-Y 4 - CompositionContainerShape ContainerShape_76() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_43()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_31); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Layer (Shape): S5-Y 4 + CompositionContainerShape ContainerShape_77() + { + var result = _c.CreateContainerShape(); + result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); + var shapes = result.Shapes; + shapes.Add(SpriteShape_44()); + result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_31); + var controller = result.TryGetAnimationController("TransformMatrix._11"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); + return result; + } - // Layer (Shape): S5-Y 4 - CompositionContainerShape ContainerShape_77() - { - var result = _c.CreateContainerShape(); - result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); - var shapes = result.Shapes; - shapes.Add(SpriteShape_44()); - result.StartAnimation("TransformMatrix._11", _scalarAnimation_1_to_0_31); - var controller = result.TryGetAnimationController("TransformMatrix._11"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); - return result; - } + // Transforms: Dot-Y + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_00() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0, 0), new Vector2(0, 0.811999977F)); + } - // Transforms: Dot-Y - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_00() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0, 0), new Vector2(0, 0.811999977F)); - } + // Transforms: Dot-Y + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_01() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.389999986F, 0.707000017F), new Vector2(0.708000004F, 1)); + } - // Transforms: Dot-Y - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_01() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.389999986F, 0.707000017F), new Vector2(0.708000004F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_02() + { + return _cubicBezierEasingFunction_02 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.180000007F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_02() - { - return _cubicBezierEasingFunction_02 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.180000007F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_03() + { + return _cubicBezierEasingFunction_03 = _c.CreateCubicBezierEasingFunction(new Vector2(0.819999993F, 0), new Vector2(0.833000004F, 0.833000004F)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_03() - { - return _cubicBezierEasingFunction_03 = _c.CreateCubicBezierEasingFunction(new Vector2(0.819999993F, 0), new Vector2(0.833000004F, 0.833000004F)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_04() + { + return _cubicBezierEasingFunction_04 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.833000004F, 0.833000004F)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_04() - { - return _cubicBezierEasingFunction_04 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.833000004F, 0.833000004F)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_05() + { + return _cubicBezierEasingFunction_05 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.666999996F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_05() - { - return _cubicBezierEasingFunction_05 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.666999996F, 1)); - } + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_06() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0), new Vector2(0.666999996F, 1)); + } - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_06() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0), new Vector2(0.666999996F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_07() + { + return _cubicBezierEasingFunction_07 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.119999997F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_07() - { - return _cubicBezierEasingFunction_07 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.119999997F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_08() + { + return _cubicBezierEasingFunction_08 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0), new Vector2(0.119999997F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_08() - { - return _cubicBezierEasingFunction_08 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0), new Vector2(0.119999997F, 1)); - } + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_09() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.119999997F, 0.119999997F)); + } - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_09() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.119999997F, 0.119999997F)); - } + // TStart + CubicBezierEasingFunction CubicBezierEasingFunction_10() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0), new Vector2(0.833000004F, 1)); + } - // TStart - CubicBezierEasingFunction CubicBezierEasingFunction_10() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0), new Vector2(0.833000004F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_11() + { + return _cubicBezierEasingFunction_11 = _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0), new Vector2(0.666999996F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_11() - { - return _cubicBezierEasingFunction_11 = _c.CreateCubicBezierEasingFunction(new Vector2(0.300999999F, 0), new Vector2(0.666999996F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_12() + { + return _cubicBezierEasingFunction_12 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.0599999987F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_12() - { - return _cubicBezierEasingFunction_12 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.0599999987F, 1)); - } + // Layer (Shape): T1b-B + // Path 1 + // Path 1.PathGeometry + // TrimEnd + CubicBezierEasingFunction CubicBezierEasingFunction_13() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.209999993F, 1)); + } - // Layer (Shape): T1b-B - // Path 1 - // Path 1.PathGeometry - // TrimEnd - CubicBezierEasingFunction CubicBezierEasingFunction_13() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.209999993F, 1)); - } + // Radius + CubicBezierEasingFunction CubicBezierEasingFunction_14() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0), new Vector2(0.666999996F, 1)); + } - // Radius - CubicBezierEasingFunction CubicBezierEasingFunction_14() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0), new Vector2(0.666999996F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_15() + { + return _cubicBezierEasingFunction_15 = _c.CreateCubicBezierEasingFunction(new Vector2(0.180000007F, 0), new Vector2(0.34799999F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_15() - { - return _cubicBezierEasingFunction_15 = _c.CreateCubicBezierEasingFunction(new Vector2(0.180000007F, 0), new Vector2(0.34799999F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_16() + { + return _cubicBezierEasingFunction_16 = _c.CreateCubicBezierEasingFunction(new Vector2(0.693000019F, 0), new Vector2(0.270000011F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_16() - { - return _cubicBezierEasingFunction_16 = _c.CreateCubicBezierEasingFunction(new Vector2(0.693000019F, 0), new Vector2(0.270000011F, 1)); - } + // Transforms: O-B + // Ellipse Path 1 + // Ellipse Path 1.EllipseGeometry + // TrimStart + CubicBezierEasingFunction CubicBezierEasingFunction_17() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 1), new Vector2(0.432000011F, 1)); + } - // Transforms: O-B - // Ellipse Path 1 - // Ellipse Path 1.EllipseGeometry - // TrimStart - CubicBezierEasingFunction CubicBezierEasingFunction_17() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 1), new Vector2(0.432000011F, 1)); - } + // Transforms: T1a-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + CubicBezierEasingFunction CubicBezierEasingFunction_18() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.672999978F, 1)); + } - // Transforms: T1a-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - CubicBezierEasingFunction CubicBezierEasingFunction_18() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.672999978F, 1)); - } + // Transforms: N + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_19() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.25999999F, 1)); + } - // Transforms: N - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_19() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.25999999F, 1)); - } + // Transforms: N + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_20() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.74000001F, 0), new Vector2(0.833000004F, 0.833000004F)); + } - // Transforms: N - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_20() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.74000001F, 0), new Vector2(0.833000004F, 0.833000004F)); - } + // TStart + CubicBezierEasingFunction CubicBezierEasingFunction_21() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.856999993F)); + } - // TStart - CubicBezierEasingFunction CubicBezierEasingFunction_21() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.856999993F)); - } + // TStart + CubicBezierEasingFunction CubicBezierEasingFunction_22() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0.202000007F), new Vector2(0.938000023F, 1)); + } - // TStart - CubicBezierEasingFunction CubicBezierEasingFunction_22() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0.202000007F), new Vector2(0.938000023F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_23() + { + return _cubicBezierEasingFunction_23 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.337000012F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_23() - { - return _cubicBezierEasingFunction_23 = _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.337000012F, 1)); - } + // TStart + CubicBezierEasingFunction CubicBezierEasingFunction_24() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.82099998F)); + } - // TStart - CubicBezierEasingFunction CubicBezierEasingFunction_24() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.166999996F), new Vector2(0.703000009F, 0.82099998F)); - } + // TStart + CubicBezierEasingFunction CubicBezierEasingFunction_25() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.0370000005F, 0.167999998F), new Vector2(0.263000011F, 1)); + } - // TStart - CubicBezierEasingFunction CubicBezierEasingFunction_25() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.0370000005F, 0.167999998F), new Vector2(0.263000011F, 1)); - } + // Transforms: Dot1 + // Position + CubicBezierEasingFunction CubicBezierEasingFunction_26() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.823000014F, 0), new Vector2(0.833000004F, 0.833000004F)); + } - // Transforms: Dot1 - // Position - CubicBezierEasingFunction CubicBezierEasingFunction_26() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.823000014F, 0), new Vector2(0.833000004F, 0.833000004F)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_27() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.197999999F), new Vector2(0.638000011F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_27() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.166999996F, 0.197999999F), new Vector2(0.638000011F, 1)); - } + CubicBezierEasingFunction CubicBezierEasingFunction_28() + { + return _c.CreateCubicBezierEasingFunction(new Vector2(0.523000002F, 0), new Vector2(0.795000017F, 1)); + } - CubicBezierEasingFunction CubicBezierEasingFunction_28() - { - return _c.CreateCubicBezierEasingFunction(new Vector2(0.523000002F, 0), new Vector2(0.795000017F, 1)); - } + // Transforms: O-Y + // Ellipse Path 1 + // Ellipse Path 1.EllipseGeometry + CompositionEllipseGeometry Ellipse_1p5_0() + { + var result = _c.CreateEllipseGeometry(); + result.Center = new Vector2(0.800000012F, -0.5F); + result.Radius = new Vector2(1.5F, 1.5F); + result.StartAnimation("Radius", Vector2Animation_07()); + var controller = result.TryGetAnimationController("Radius"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: O-Y - // Ellipse Path 1 - // Ellipse Path 1.EllipseGeometry - CompositionEllipseGeometry Ellipse_1p5_0() - { - var result = _c.CreateEllipseGeometry(); - result.Center = new Vector2(0.800000012F, -0.5F); - result.Radius = new Vector2(1.5F, 1.5F); - result.StartAnimation("Radius", Vector2Animation_07()); - var controller = result.TryGetAnimationController("Radius"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: O-B + // Ellipse Path 1 + // Ellipse Path 1.EllipseGeometry + CompositionEllipseGeometry Ellipse_1p5_1() + { + var result = _c.CreateEllipseGeometry(); + result.Center = new Vector2(0.800000012F, -0.5F); + result.Radius = new Vector2(1.5F, 1.5F); + result.StartAnimation("Radius", _vector2Animation_07); + var controller = result.TryGetAnimationController("Radius"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TrimStart", ScalarAnimation_0_to_0p399()); + controller = result.TryGetAnimationController("TrimStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TrimEnd", ScalarAnimation_1_to_0p88()); + controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: O-B - // Ellipse Path 1 - // Ellipse Path 1.EllipseGeometry - CompositionEllipseGeometry Ellipse_1p5_1() - { - var result = _c.CreateEllipseGeometry(); - result.Center = new Vector2(0.800000012F, -0.5F); - result.Radius = new Vector2(1.5F, 1.5F); - result.StartAnimation("Radius", _vector2Animation_07); - var controller = result.TryGetAnimationController("Radius"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TrimStart", ScalarAnimation_0_to_0p399()); - controller = result.TryGetAnimationController("TrimStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TrimEnd", ScalarAnimation_1_to_0p88()); - controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: Dot-Y + // Ellipse Path 1 + // Ellipse Path 1.EllipseGeometry + CompositionEllipseGeometry Ellipse_4p6() + { + var result = _c.CreateEllipseGeometry(); + result.Center = new Vector2(0.800000012F, -0.5F); + result.Radius = new Vector2(4.5999999F, 4.5999999F); + return result; + } - // Transforms: Dot-Y - // Ellipse Path 1 - // Ellipse Path 1.EllipseGeometry - CompositionEllipseGeometry Ellipse_4p6() - { - var result = _c.CreateEllipseGeometry(); - result.Center = new Vector2(0.800000012F, -0.5F); - result.Radius = new Vector2(4.5999999F, 4.5999999F); - return result; - } + // Ellipse Path 1.EllipseGeometry + CompositionEllipseGeometry Ellipse_4p7() + { + var result = _ellipse_4p7 = _c.CreateEllipseGeometry(); + result.Center = new Vector2(0.800000012F, -0.5F); + result.Radius = new Vector2(4.69999981F, 4.69999981F); + return result; + } - // Ellipse Path 1.EllipseGeometry - CompositionEllipseGeometry Ellipse_4p7() + CanvasGeometry Geometry_00() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - var result = _ellipse_4p7 = _c.CreateEllipseGeometry(); - result.Center = new Vector2(0.800000012F, -0.5F); - result.Radius = new Vector2(4.69999981F, 4.69999981F); - return result; + builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F)); + builder.AddLine(new Vector2(75.663002F, 0.289999992F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_00() + CanvasGeometry Geometry_01() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F)); - builder.AddLine(new Vector2(75.663002F, 0.289999992F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(0.859000027F, -21.1429996F)); + builder.AddLine(new Vector2(-4.35900021F, 70.3919983F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_01() + CanvasGeometry Geometry_02() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(0.859000027F, -21.1429996F)); - builder.AddLine(new Vector2(-4.35900021F, 70.3919983F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-26.6700001F, -0.282999992F)); + builder.AddLine(new Vector2(99.1709976F, 0.0659999996F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_02() + CanvasGeometry Geometry_03() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-26.6700001F, -0.282999992F)); - builder.AddLine(new Vector2(99.1709976F, 0.0659999996F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F)); + builder.AddLine(new Vector2(62.1629982F, 0.289999992F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_03() - { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-13.6639996F, -0.144999996F)); - builder.AddLine(new Vector2(62.1629982F, 0.289999992F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; - } + CanvasGeometry Geometry_04() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) + { + builder.BeginFigure(new Vector2(-30.7199993F, 63.7610016F)); + builder.AddCubicBezier(new Vector2(-30.6889992F, 63.1669998F), new Vector2(-30.7889996F, 50.8470001F), new Vector2(-30.7409992F, 45.1920013F)); + builder.AddCubicBezier(new Vector2(-30.6650009F, 36.2140007F), new Vector2(-37.3429985F, 27.0739994F), new Vector2(-37.3969994F, 27.0139999F)); + builder.AddCubicBezier(new Vector2(-38.5579987F, 25.7140007F), new Vector2(-39.7519989F, 24.1469994F), new Vector2(-40.6980019F, 22.6609993F)); + builder.AddCubicBezier(new Vector2(-46.637001F, 13.3339996F), new Vector2(-47.8400002F, 0.933000028F), new Vector2(-37.8730011F, -7.1170001F)); + builder.AddCubicBezier(new Vector2(-13.1960001F, -27.0459995F), new Vector2(8.96000004F, 11.559F), new Vector2(49.5060005F, 11.559F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); + } + return result; + } - CanvasGeometry Geometry_04() + CanvasGeometry Geometry_05() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-30.7199993F, 63.7610016F)); - builder.AddCubicBezier(new Vector2(-30.6889992F, 63.1669998F), new Vector2(-30.7889996F, 50.8470001F), new Vector2(-30.7409992F, 45.1920013F)); - builder.AddCubicBezier(new Vector2(-30.6650009F, 36.2140007F), new Vector2(-37.3429985F, 27.0739994F), new Vector2(-37.3969994F, 27.0139999F)); - builder.AddCubicBezier(new Vector2(-38.5579987F, 25.7140007F), new Vector2(-39.7519989F, 24.1469994F), new Vector2(-40.6980019F, 22.6609993F)); - builder.AddCubicBezier(new Vector2(-46.637001F, 13.3339996F), new Vector2(-47.8400002F, 0.933000028F), new Vector2(-37.8730011F, -7.1170001F)); - builder.AddCubicBezier(new Vector2(-13.1960001F, -27.0459995F), new Vector2(8.96000004F, 11.559F), new Vector2(49.5060005F, 11.559F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(246.649994F, 213.813995F)); + builder.AddLine(new Vector2(340.955994F, 213.628006F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_05() + CanvasGeometry Geometry_06() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(246.649994F, 213.813995F)); - builder.AddLine(new Vector2(340.955994F, 213.628006F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(1.68099999F, -29.9920006F)); + builder.AddLine(new Vector2(-1.68099999F, 29.9920006F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_06() + CanvasGeometry Geometry_07() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(1.68099999F, -29.9920006F)); - builder.AddLine(new Vector2(-1.68099999F, 29.9920006F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(1.76800001F, -25.9659996F)); + builder.AddLine(new Vector2(-1.76800001F, 25.9659996F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_07() - { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(1.76800001F, -25.9659996F)); - builder.AddLine(new Vector2(-1.76800001F, 25.9659996F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; - } + CanvasGeometry Geometry_08() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) + { + builder.BeginFigure(new Vector2(-8.83699989F, -58.2290001F)); + builder.AddCubicBezier(new Vector2(-8.83699989F, -58.2290001F), new Vector2(-10.1630001F, 29.4950008F), new Vector2(-35.8339996F, 33.6619987F)); + builder.AddCubicBezier(new Vector2(-44.0579987F, 34.9970016F), new Vector2(-50.2319984F, 30.0499992F), new Vector2(-51.6879997F, 23.1480007F)); + builder.AddCubicBezier(new Vector2(-53.144001F, 16.2450008F), new Vector2(-49.6549988F, 9.15600014F), new Vector2(-41.1739998F, 7.29300022F)); + builder.AddCubicBezier(new Vector2(-17.3570004F, 2.05999994F), new Vector2(4.23500013F, 57.1879997F), new Vector2(51.7970009F, 44.1780014F)); + builder.AddCubicBezier(new Vector2(51.9570007F, 44.1339989F), new Vector2(52.6870003F, 43.8740005F), new Vector2(53.1879997F, 43.7410011F)); + builder.AddCubicBezier(new Vector2(53.6889992F, 43.6080017F), new Vector2(68.9710007F, 41.3569984F), new Vector2(140.393997F, 43.6720009F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); + } + return result; + } - CanvasGeometry Geometry_08() + CanvasGeometry Geometry_09() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-8.83699989F, -58.2290001F)); - builder.AddCubicBezier(new Vector2(-8.83699989F, -58.2290001F), new Vector2(-10.1630001F, 29.4950008F), new Vector2(-35.8339996F, 33.6619987F)); - builder.AddCubicBezier(new Vector2(-44.0579987F, 34.9970016F), new Vector2(-50.2319984F, 30.0499992F), new Vector2(-51.6879997F, 23.1480007F)); - builder.AddCubicBezier(new Vector2(-53.144001F, 16.2450008F), new Vector2(-49.6549988F, 9.15600014F), new Vector2(-41.1739998F, 7.29300022F)); - builder.AddCubicBezier(new Vector2(-17.3570004F, 2.05999994F), new Vector2(4.23500013F, 57.1879997F), new Vector2(51.7970009F, 44.1780014F)); - builder.AddCubicBezier(new Vector2(51.9570007F, 44.1339989F), new Vector2(52.6870003F, 43.8740005F), new Vector2(53.1879997F, 43.7410011F)); - builder.AddCubicBezier(new Vector2(53.6889992F, 43.6080017F), new Vector2(68.9710007F, 41.3569984F), new Vector2(140.393997F, 43.6720009F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-67.125F, -112)); + builder.AddCubicBezier(new Vector2(-67.125F, -112), new Vector2(-73.5579987F, -100.719002F), new Vector2(-75.4580002F, -89.9509964F)); + builder.AddCubicBezier(new Vector2(-78.625F, -72), new Vector2(-79.375F, -58.25F), new Vector2(-80.375F, -39.25F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_09() + CanvasGeometry Geometry_10() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-67.125F, -112)); - builder.AddCubicBezier(new Vector2(-67.125F, -112), new Vector2(-73.5579987F, -100.719002F), new Vector2(-75.4580002F, -89.9509964F)); - builder.AddCubicBezier(new Vector2(-78.625F, -72), new Vector2(-79.375F, -58.25F), new Vector2(-80.375F, -39.25F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-67.25F, -105.5F)); + builder.AddCubicBezier(new Vector2(-67.25F, -105.5F), new Vector2(-70.4329987F, -94.9690018F), new Vector2(-72.3330002F, -84.2009964F)); + builder.AddCubicBezier(new Vector2(-75.5F, -66.25F), new Vector2(-75.5F, -56.75F), new Vector2(-76.5F, -37.75F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_10() + CanvasGeometry Geometry_11() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-67.25F, -105.5F)); - builder.AddCubicBezier(new Vector2(-67.25F, -105.5F), new Vector2(-70.4329987F, -94.9690018F), new Vector2(-72.3330002F, -84.2009964F)); - builder.AddCubicBezier(new Vector2(-75.5F, -66.25F), new Vector2(-75.5F, -56.75F), new Vector2(-76.5F, -37.75F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(34.5F, -13.0500002F)); + builder.AddCubicBezier(new Vector2(7.5F, -14.5F), new Vector2(-4, -37), new Vector2(-35.0460014F, -35.5789986F)); + builder.AddCubicBezier(new Vector2(-61.4720001F, -34.3689995F), new Vector2(-62.25F, -5.75F), new Vector2(-62.25F, -5.75F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_11() + CanvasGeometry Geometry_12() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(34.5F, -13.0500002F)); - builder.AddCubicBezier(new Vector2(7.5F, -14.5F), new Vector2(-4, -37), new Vector2(-35.0460014F, -35.5789986F)); - builder.AddCubicBezier(new Vector2(-61.4720001F, -34.3689995F), new Vector2(-62.25F, -5.75F), new Vector2(-62.25F, -5.75F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-3, 35.9500008F)); + builder.AddCubicBezier(new Vector2(-3, 35.9500008F), new Vector2(-1.5F, 7.5F), new Vector2(-1.352F, -6.75600004F)); + builder.AddCubicBezier(new Vector2(-9.90299988F, -15.0190001F), new Vector2(-21.5699997F, -20.5790005F), new Vector2(-32.0460014F, -20.5790005F)); + builder.AddCubicBezier(new Vector2(-53.5F, -20.5790005F), new Vector2(-42.25F, 4.25F), new Vector2(-42.25F, 4.25F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_12() + CanvasGeometry Geometry_13() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-3, 35.9500008F)); - builder.AddCubicBezier(new Vector2(-3, 35.9500008F), new Vector2(-1.5F, 7.5F), new Vector2(-1.352F, -6.75600004F)); - builder.AddCubicBezier(new Vector2(-9.90299988F, -15.0190001F), new Vector2(-21.5699997F, -20.5790005F), new Vector2(-32.0460014F, -20.5790005F)); - builder.AddCubicBezier(new Vector2(-53.5F, -20.5790005F), new Vector2(-42.25F, 4.25F), new Vector2(-42.25F, 4.25F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(16.2310009F, 39.0730019F)); + builder.AddLine(new Vector2(-32.769001F, 57.3650017F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_13() + CanvasGeometry Geometry_14() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(16.2310009F, 39.0730019F)); - builder.AddLine(new Vector2(-32.769001F, 57.3650017F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(7.44999981F, 21.9500008F)); + builder.AddLine(new Vector2(-32.75F, 55.75F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_14() + CanvasGeometry Geometry_15() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(7.44999981F, 21.9500008F)); - builder.AddLine(new Vector2(-32.75F, 55.75F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-94.5F, 37.0730019F)); + builder.AddLine(new Vector2(-48.769001F, 55.3650017F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_15() + CanvasGeometry Geometry_16() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-94.5F, 37.0730019F)); - builder.AddLine(new Vector2(-48.769001F, 55.3650017F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(-87.5F, 20.9500008F)); + builder.AddLine(new Vector2(-48.75F, 54.75F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_16() + CanvasGeometry Geometry_17() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(-87.5F, 20.9500008F)); - builder.AddLine(new Vector2(-48.75F, 54.75F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(166.731003F, -7.92700005F)); + builder.AddLine(new Vector2(136.731003F, 7.11499977F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_17() + CanvasGeometry Geometry_18() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(166.731003F, -7.92700005F)); - builder.AddLine(new Vector2(136.731003F, 7.11499977F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(156.449997F, -23.0499992F)); + builder.AddLine(new Vector2(132, 2.75F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_18() + CanvasGeometry Geometry_19() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(156.449997F, -23.0499992F)); - builder.AddLine(new Vector2(132, 2.75F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(169.5F, 18.073F)); + builder.AddLine(new Vector2(137.481003F, 11.3649998F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_19() + CanvasGeometry Geometry_20() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(169.5F, 18.073F)); - builder.AddLine(new Vector2(137.481003F, 11.3649998F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(119.5F, -45.0499992F)); + builder.AddLine(new Vector2(82.75F, -44.75F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_20() + CanvasGeometry Geometry_21() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(119.5F, -45.0499992F)); - builder.AddLine(new Vector2(82.75F, -44.75F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(119.25F, -20.0499992F)); + builder.AddLine(new Vector2(63.5F, -20.5F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_21() + CanvasGeometry Geometry_22() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(119.25F, -20.0499992F)); - builder.AddLine(new Vector2(63.5F, -20.5F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(128, 3.6500001F)); + builder.AddLine(new Vector2(78.25F, 3.5F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_22() + CanvasGeometry Geometry_23() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(128, 3.6500001F)); - builder.AddLine(new Vector2(78.25F, 3.5F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(149.623993F, 8.24400043F)); + builder.AddLine(new Vector2(136.647995F, 10.1560001F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_23() + CanvasGeometry Geometry_24() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(149.623993F, 8.24400043F)); - builder.AddLine(new Vector2(136.647995F, 10.1560001F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(144.429001F, -5.39699984F)); + builder.AddLine(new Vector2(132.274994F, 4.73099995F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_24() + CanvasGeometry Geometry_25() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(144.429001F, -5.39699984F)); - builder.AddLine(new Vector2(132.274994F, 4.73099995F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(145.677002F, 22.2199993F)); + builder.AddLine(new Vector2(134.921997F, 14.7489996F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_25() + CanvasGeometry Geometry_26() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(145.677002F, 22.2199993F)); - builder.AddLine(new Vector2(134.921997F, 14.7489996F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(147.699005F, 13.0249996F)); + builder.AddLine(new Vector2(133.195007F, 13.21F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_26() + CanvasGeometry Geometry_27() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(147.699005F, 13.0249996F)); - builder.AddLine(new Vector2(133.195007F, 13.21F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(142.182999F, -5.11199999F)); + builder.AddLine(new Vector2(130.029007F, 5.01599979F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_27() + CanvasGeometry Geometry_28() + { + CanvasGeometry result; + using (var builder = new CanvasPathBuilder(null)) { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(142.182999F, -5.11199999F)); - builder.AddLine(new Vector2(130.029007F, 5.01599979F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; + builder.BeginFigure(new Vector2(142.037994F, 29.2779999F)); + builder.AddLine(new Vector2(131.281998F, 21.8069992F)); + builder.EndFigure(CanvasFigureLoop.Open); + result = CanvasGeometry.CreatePath(builder); } + return result; + } - CanvasGeometry Geometry_28() - { - CanvasGeometry result; - using (var builder = new CanvasPathBuilder(null)) - { - builder.BeginFigure(new Vector2(142.037994F, 29.2779999F)); - builder.AddLine(new Vector2(131.281998F, 21.8069992F)); - builder.EndFigure(CanvasFigureLoop.Open); - result = CanvasGeometry.CreatePath(builder); - } - return result; - } + StepEasingFunction HoldThenStepEasingFunction() + { + var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction(); + result.IsFinalStepSingleFrame = true; + return result; + } - StepEasingFunction HoldThenStepEasingFunction() - { - var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction(); - result.IsFinalStepSingleFrame = true; - return result; - } + LinearEasingFunction LinearEasingFunction() + { + return _linearEasingFunction = _c.CreateLinearEasingFunction(); + } - LinearEasingFunction LinearEasingFunction() - { - return _linearEasingFunction = _c.CreateLinearEasingFunction(); - } + // Transforms: E3-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_00() + { + var result = _c.CreatePathGeometry(CompositionPath_00()); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p316_0()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: E3-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_00() - { - var result = _c.CreatePathGeometry(CompositionPath_00()); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p316_0()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: E3-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_01() + { + var result = _c.CreatePathGeometry(_compositionPath_00); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p316_1()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: E3-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_01() - { - var result = _c.CreatePathGeometry(_compositionPath_00); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p316_1()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: I-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_02() + { + var result = _c.CreatePathGeometry(CompositionPath_01()); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p457_0()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: I-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_02() - { - var result = _c.CreatePathGeometry(CompositionPath_01()); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p457_0()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: I-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_03() + { + var result = _c.CreatePathGeometry(_compositionPath_01); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p457_1()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: I-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_03() - { - var result = _c.CreatePathGeometry(_compositionPath_01); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p457_1()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: E2-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_04() + { + var result = _c.CreatePathGeometry(CompositionPath_02()); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p43_0()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: E2-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_04() - { - var result = _c.CreatePathGeometry(CompositionPath_02()); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p43_0()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: E2-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_05() + { + var result = _c.CreatePathGeometry(_compositionPath_02); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p43_1()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: E2-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_05() - { - var result = _c.CreatePathGeometry(_compositionPath_02); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p43_1()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: E1-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_06() + { + var result = _c.CreatePathGeometry(CompositionPath_03()); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p375_0()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: E1-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_06() - { - var result = _c.CreatePathGeometry(CompositionPath_03()); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p375_0()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: E1-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_07() + { + var result = _c.CreatePathGeometry(_compositionPath_03); + result.TrimEnd = 0; + result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p375_1()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: E1-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_07() - { - var result = _c.CreatePathGeometry(_compositionPath_03); - result.TrimEnd = 0; - result.StartAnimation("TrimEnd", ScalarAnimation_0_to_0p375_1()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_08() + { + var result = _c.CreatePathGeometry(CompositionPath_04()); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0); + propertySet.InsertScalar("TEnd", 0); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0_to_0p249()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_0_to_1_0()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_08() - { - var result = _c.CreatePathGeometry(CompositionPath_04()); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0); - propertySet.InsertScalar("TEnd", 0); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0_to_0p249()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_0_to_1_0()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Layer (Shape): T2b-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_09() + { + var result = _c.CreatePathGeometry(CompositionPath_05()); + result.TrimEnd = 0.411000013F; + result.TrimStart = 0.289999992F; + result.StartAnimation("TrimStart", ScalarAnimation_0p29_to_0_0()); + var controller = result.TryGetAnimationController("TrimStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TrimEnd", ScalarAnimation_0p411_to_0p665_0()); + controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Layer (Shape): T2b-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_09() - { - var result = _c.CreatePathGeometry(CompositionPath_05()); - result.TrimEnd = 0.411000013F; - result.TrimStart = 0.289999992F; - result.StartAnimation("TrimStart", ScalarAnimation_0p29_to_0_0()); - var controller = result.TryGetAnimationController("TrimStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TrimEnd", ScalarAnimation_0p411_to_0p665_0()); - controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Layer (Shape): T2a-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_10() + { + var result = _c.CreatePathGeometry(CompositionPath_06()); + result.TrimEnd = 0.5F; + result.TrimStart = 0.5F; + result.StartAnimation("TrimStart", ScalarAnimation_0p5_to_0_0()); + var controller = result.TryGetAnimationController("TrimStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TrimEnd", ScalarAnimation_0p5_to_1_0()); + controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Layer (Shape): T2a-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_10() - { - var result = _c.CreatePathGeometry(CompositionPath_06()); - result.TrimEnd = 0.5F; - result.TrimStart = 0.5F; - result.StartAnimation("TrimStart", ScalarAnimation_0p5_to_0_0()); - var controller = result.TryGetAnimationController("TrimStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TrimEnd", ScalarAnimation_0p5_to_1_0()); - controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Layer (Shape): T2b-B + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_11() + { + var result = _c.CreatePathGeometry(_compositionPath_05); + result.TrimEnd = 0.411000013F; + result.TrimStart = 0.289999992F; + result.StartAnimation("TrimStart", ScalarAnimation_0p29_to_0_1()); + var controller = result.TryGetAnimationController("TrimStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TrimEnd", ScalarAnimation_0p411_to_0p665_1()); + controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Layer (Shape): T2b-B - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_11() - { - var result = _c.CreatePathGeometry(_compositionPath_05); - result.TrimEnd = 0.411000013F; - result.TrimStart = 0.289999992F; - result.StartAnimation("TrimStart", ScalarAnimation_0p29_to_0_1()); - var controller = result.TryGetAnimationController("TrimStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TrimEnd", ScalarAnimation_0p411_to_0p665_1()); - controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Layer (Shape): T1b-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_12() + { + var result = _c.CreatePathGeometry(CompositionPath_07()); + result.TrimEnd = 0.116999999F; + result.StartAnimation("TrimEnd", ScalarAnimation_0p117_to_1_0()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Layer (Shape): T1b-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_12() - { - var result = _c.CreatePathGeometry(CompositionPath_07()); - result.TrimEnd = 0.116999999F; - result.StartAnimation("TrimEnd", ScalarAnimation_0p117_to_1_0()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Layer (Shape): T1b-B + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_13() + { + var result = _c.CreatePathGeometry(_compositionPath_07); + result.TrimEnd = 0.116999999F; + result.StartAnimation("TrimEnd", ScalarAnimation_0p117_to_1_1()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Layer (Shape): T1b-B - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_13() - { - var result = _c.CreatePathGeometry(_compositionPath_07); - result.TrimEnd = 0.116999999F; - result.StartAnimation("TrimEnd", ScalarAnimation_0p117_to_1_1()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_14() + { + var result = _c.CreatePathGeometry(_compositionPath_04); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0); + propertySet.InsertScalar("TEnd", 0); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", _scalarAnimation_0_to_0p249); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_0_to_1_1()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_14() - { - var result = _c.CreatePathGeometry(_compositionPath_04); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0); - propertySet.InsertScalar("TEnd", 0); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", _scalarAnimation_0_to_0p249); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_0_to_1_1()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Layer (Shape): T2a-B + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_15() + { + var result = _c.CreatePathGeometry(_compositionPath_06); + result.TrimEnd = 0.5F; + result.TrimStart = 0.5F; + result.StartAnimation("TrimStart", ScalarAnimation_0p5_to_0_1()); + var controller = result.TryGetAnimationController("TrimStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TrimEnd", ScalarAnimation_0p5_to_1_1()); + controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Layer (Shape): T2a-B - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_15() - { - var result = _c.CreatePathGeometry(_compositionPath_06); - result.TrimEnd = 0.5F; - result.TrimStart = 0.5F; - result.StartAnimation("TrimStart", ScalarAnimation_0p5_to_0_1()); - var controller = result.TryGetAnimationController("TrimStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TrimEnd", ScalarAnimation_0p5_to_1_1()); - controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Transforms: T1a-Y + // Path 1 + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_16() + { + var result = _c.CreatePathGeometry(_compositionPath_04); + result.TrimEnd = 0.248999998F; + result.TrimStart = 0.248999998F; + result.StartAnimation("TrimEnd", ScalarAnimation_0p249_to_0p891()); + var controller = result.TryGetAnimationController("TrimEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Transforms: T1a-Y - // Path 1 - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_16() - { - var result = _c.CreatePathGeometry(_compositionPath_04); - result.TrimEnd = 0.248999998F; - result.TrimStart = 0.248999998F; - result.StartAnimation("TrimEnd", ScalarAnimation_0p249_to_0p891()); - var controller = result.TryGetAnimationController("TrimEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_17() + { + var result = _c.CreatePathGeometry(CompositionPath_08()); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.800000012F); + propertySet.InsertScalar("TEnd", 0.810000002F); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p8_to_0()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_0p81_to_0p734_0()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_17() - { - var result = _c.CreatePathGeometry(CompositionPath_08()); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.800000012F); - propertySet.InsertScalar("TEnd", 0.810000002F); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p8_to_0()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_0p81_to_0p734_0()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_18() + { + var result = _c.CreatePathGeometry(_compositionPath_08); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.800000012F); + propertySet.InsertScalar("TEnd", 0.810000002F); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p8_to_0p3()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_0p81_to_0p734_1()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_18() - { - var result = _c.CreatePathGeometry(_compositionPath_08); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.800000012F); - propertySet.InsertScalar("TEnd", 0.810000002F); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p8_to_0p3()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_0p81_to_0p734_1()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_19() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_09())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_00()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_09()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_19() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_09())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_00()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_09()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_20() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_10())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_01()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_11()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_20() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_10())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_01()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_11()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_21() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_11())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_02()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_12()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_21() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_11())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_02()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_12()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_22() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_12())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", _scalarAnimation_0p87_to_0_02); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", _scalarAnimation_1_to_0_12); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_22() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_12())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", _scalarAnimation_0p87_to_0_02); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", _scalarAnimation_1_to_0_12); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_23() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_13())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_03()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_14()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_23() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_13())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_03()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_14()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_24() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_14())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_04()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", _scalarAnimation_1_to_0_14); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_24() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_14())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_04()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", _scalarAnimation_1_to_0_14); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_25() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_15())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_05()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_16()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_25() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_15())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_05()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_16()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_26() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_16())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_06()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_17()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_26() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_16())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_06()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_17()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_27() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_17())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_07()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_18()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_27() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_17())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_07()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_18()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_28() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_18())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_08()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", _scalarAnimation_1_to_0_18); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_28() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_18())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_08()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", _scalarAnimation_1_to_0_18); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_29() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_19())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_09()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_20()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_29() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_19())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_09()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_20()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_30() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_20())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_10()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_21()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_30() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_20())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_10()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_21()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_31() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_21())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_11()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_23()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_31() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_21())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_11()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_23()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_32() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_22())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_12()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_25()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_32() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_22())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_12()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_25()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_33() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_23())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_13()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_27()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_33() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_23())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_13()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_27()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } - - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_34() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_24())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_14()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", _scalarAnimation_1_to_0_27); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } - - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_35() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_25())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_15()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_29()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_34() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_24())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_14()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", _scalarAnimation_1_to_0_27); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_36() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_26())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_16()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_30()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_35() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_25())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_15()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_29()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_37() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_27())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_17()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", _scalarAnimation_1_to_0_30); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_36() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_26())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_16()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_30()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Path 1.PathGeometry - CompositionPathGeometry PathGeometry_38() - { - var result = _c.CreatePathGeometry(new CompositionPath(Geometry_28())); - var propertySet = result.Properties; - propertySet.InsertScalar("TStart", 0.870000005F); - propertySet.InsertScalar("TEnd", 1); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimStart", _reusableExpressionAnimation); - _reusableExpressionAnimation.ClearAllParameters(); - _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; - _reusableExpressionAnimation.SetReferenceParameter("my", result); - result.StartAnimation("TrimEnd", _reusableExpressionAnimation); - result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_18()); - var controller = result.TryGetAnimationController("TStart"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("TEnd", ScalarAnimation_1_to_0_32()); - controller = result.TryGetAnimationController("TEnd"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_37() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_27())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_17()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", _scalarAnimation_1_to_0_30); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // The root of the composition. - ContainerVisual Root() - { - var result = _root = _c.CreateContainerVisual(); - var propertySet = result.Properties; - propertySet.InsertScalar("Progress", 0); - propertySet.InsertScalar("t0", 0); - propertySet.InsertScalar("t1", 0); - var children = result.Children; - children.InsertAtTop(ShapeVisual()); - result.StartAnimation("t0", ScalarAnimation_0_to_1_2()); - var controller = result.TryGetAnimationController("t0"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - result.StartAnimation("t1", _scalarAnimation_0_to_1_2); - controller = result.TryGetAnimationController("t1"); - controller.Pause(); - controller.StartAnimation("Progress", _scalarExpressionAnimation); - return result; - } + // Path 1.PathGeometry + CompositionPathGeometry PathGeometry_38() + { + var result = _c.CreatePathGeometry(new CompositionPath(Geometry_28())); + var propertySet = result.Properties; + propertySet.InsertScalar("TStart", 0.870000005F); + propertySet.InsertScalar("TEnd", 1); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimStart", _reusableExpressionAnimation); + _reusableExpressionAnimation.ClearAllParameters(); + _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; + _reusableExpressionAnimation.SetReferenceParameter("my", result); + result.StartAnimation("TrimEnd", _reusableExpressionAnimation); + result.StartAnimation("TStart", ScalarAnimation_0p87_to_0_18()); + var controller = result.TryGetAnimationController("TStart"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("TEnd", ScalarAnimation_1_to_0_32()); + controller = result.TryGetAnimationController("TEnd"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // Rectangle Path 1 - // Rectangle Path 1.RectangleGeometry - CompositionRoundedRectangleGeometry RoundedRectangle_375x667() - { - var result = _c.CreateRoundedRectangleGeometry(); - result.CornerRadius = new Vector2(9.99999997E-07F, 9.99999997E-07F); - result.Offset = new Vector2(-187.5F, -333.5F); - result.Size = new Vector2(375, 667); - return result; - } + // The root of the composition. + ContainerVisual Root() + { + var result = _root = _c.CreateContainerVisual(); + var propertySet = result.Properties; + propertySet.InsertScalar("Progress", 0); + propertySet.InsertScalar("t0", 0); + propertySet.InsertScalar("t1", 0); + var children = result.Children; + children.InsertAtTop(ShapeVisual()); + result.StartAnimation("t0", ScalarAnimation_0_to_1_2()); + var controller = result.TryGetAnimationController("t0"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + result.StartAnimation("t1", _scalarAnimation_0_to_1_2); + controller = result.TryGetAnimationController("t1"); + controller.Pause(); + controller.StartAnimation("Progress", _scalarExpressionAnimation); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p249() - { - var result = _scalarAnimation_0_to_0p249 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.391061455F, 0.248999998F, CubicBezierEasingFunction_10()); - return result; - } + // Rectangle Path 1 + // Rectangle Path 1.RectangleGeometry + CompositionRoundedRectangleGeometry RoundedRectangle_375x667() + { + var result = _c.CreateRoundedRectangleGeometry(); + result.CornerRadius = new Vector2(9.99999997E-07F, 9.99999997E-07F); + result.Offset = new Vector2(-187.5F, -333.5F); + result.Size = new Vector2(375, 667); + return result; + } - // Transforms: E3-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p316_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.469273746F, 0, LinearEasingFunction()); - result.InsertKeyFrame(0.513966501F, 0.316000015F, CubicBezierEasingFunction_04()); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p249() + { + var result = _scalarAnimation_0_to_0p249 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.391061455F, 0.248999998F, CubicBezierEasingFunction_10()); + return result; + } - // Transforms: E3-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p316_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.513966501F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.541899443F, 0.316000015F, _cubicBezierEasingFunction_04); - return result; - } + // Transforms: E3-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p316_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.469273746F, 0, LinearEasingFunction()); + result.InsertKeyFrame(0.513966501F, 0.316000015F, CubicBezierEasingFunction_04()); + return result; + } - // Transforms: E1-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p375_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.441340774F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.491620123F, 0.375F, _cubicBezierEasingFunction_07); - return result; - } + // Transforms: E3-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p316_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.513966501F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.541899443F, 0.316000015F, _cubicBezierEasingFunction_04); + return result; + } - // Transforms: E1-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p375_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.469273746F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.519553065F, 0.375F, _cubicBezierEasingFunction_07); - return result; - } + // Transforms: E1-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p375_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.441340774F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.491620123F, 0.375F, _cubicBezierEasingFunction_07); + return result; + } - // Transforms: O-B - // Ellipse Path 1 - // Ellipse Path 1.EllipseGeometry - // TrimStart - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p399() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.351955295F, 0.300000012F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.508379877F, 0.398999989F, CubicBezierEasingFunction_17()); - return result; - } + // Transforms: E1-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p375_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.469273746F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.519553065F, 0.375F, _cubicBezierEasingFunction_07); + return result; + } - // Transforms: E2-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p43_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.463687152F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.513966501F, 0.430000007F, _cubicBezierEasingFunction_07); - return result; - } + // Transforms: O-B + // Ellipse Path 1 + // Ellipse Path 1.EllipseGeometry + // TrimStart + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p399() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.351955295F, 0.300000012F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.508379877F, 0.398999989F, CubicBezierEasingFunction_17()); + return result; + } - // Transforms: E2-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p43_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.480446935F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.530726254F, 0.430000007F, _cubicBezierEasingFunction_07); - return result; - } + // Transforms: E2-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p43_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.463687152F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.513966501F, 0.430000007F, _cubicBezierEasingFunction_07); + return result; + } - // Transforms: I-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p457_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.43575418F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.491620123F, 0.456999987F, CubicBezierEasingFunction_07()); - return result; - } + // Transforms: E2-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p43_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.480446935F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.530726254F, 0.430000007F, _cubicBezierEasingFunction_07); + return result; + } - // Transforms: I-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_0p457_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.452513963F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.508379877F, 0.456999987F, _cubicBezierEasingFunction_07); - return result; - } + // Transforms: I-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p457_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.43575418F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.491620123F, 0.456999987F, CubicBezierEasingFunction_07()); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_1_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.413407832F, 1, CubicBezierEasingFunction_11()); - return result; - } + // Transforms: I-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_0p457_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.452513963F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.508379877F, 0.456999987F, _cubicBezierEasingFunction_07); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_0_to_1_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); - result.InsertKeyFrame(0.43575418F, 1, _cubicBezierEasingFunction_11); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_1_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.413407832F, 1, CubicBezierEasingFunction_11()); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_0_to_1_2() - { - var result = _scalarAnimation_0_to_1_2 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.196966588F, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.245809957F, 1, CubicBezierEasingFunction_27()); - result.InsertKeyFrame(0.245810062F, 0, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675886F, 1, CubicBezierEasingFunction_28()); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_0_to_1_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0, _linearEasingFunction); + result.InsertKeyFrame(0.43575418F, 1, _cubicBezierEasingFunction_11); + return result; + } - // Layer (Shape): T1b-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p117_to_1_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.116999999F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.391061455F, 0.116999999F, _linearEasingFunction); - result.InsertKeyFrame(0.418994427F, 1, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_0_to_1_2() + { + var result = _scalarAnimation_0_to_1_2 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.196966588F, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.245809957F, 1, CubicBezierEasingFunction_27()); + result.InsertKeyFrame(0.245810062F, 0, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675886F, 1, CubicBezierEasingFunction_28()); + return result; + } - // Layer (Shape): T1b-B - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p117_to_1_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.116999999F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.452513963F, 0.116999999F, _linearEasingFunction); - result.InsertKeyFrame(0.491620123F, 1, CubicBezierEasingFunction_13()); - return result; - } + // Layer (Shape): T1b-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p117_to_1_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.116999999F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.391061455F, 0.116999999F, _linearEasingFunction); + result.InsertKeyFrame(0.418994427F, 1, _cubicBezierEasingFunction_04); + return result; + } - // Transforms: T1a-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p249_to_0p891() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.248999998F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.391061455F, 0.248999998F, _linearEasingFunction); - result.InsertKeyFrame(0.469273746F, 0.890999973F, CubicBezierEasingFunction_18()); - return result; - } + // Layer (Shape): T1b-B + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p117_to_1_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.116999999F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.452513963F, 0.116999999F, _linearEasingFunction); + result.InsertKeyFrame(0.491620123F, 1, CubicBezierEasingFunction_13()); + return result; + } - // Layer (Shape): T2b-Y - // Path 1 - // Path 1.PathGeometry - // TrimStart - ScalarKeyFrameAnimation ScalarAnimation_0p29_to_0_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.289999992F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 0.289999992F, _linearEasingFunction); - result.InsertKeyFrame(0.47486034F, 0, _cubicBezierEasingFunction_07); - return result; - } + // Transforms: T1a-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p249_to_0p891() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.248999998F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.391061455F, 0.248999998F, _linearEasingFunction); + result.InsertKeyFrame(0.469273746F, 0.890999973F, CubicBezierEasingFunction_18()); + return result; + } - // Layer (Shape): T2b-B - // Path 1 - // Path 1.PathGeometry - // TrimStart - ScalarKeyFrameAnimation ScalarAnimation_0p29_to_0_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.289999992F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.458100557F, 0.289999992F, _linearEasingFunction); - result.InsertKeyFrame(0.508379877F, 0, _cubicBezierEasingFunction_07); - return result; - } + // Layer (Shape): T2b-Y + // Path 1 + // Path 1.PathGeometry + // TrimStart + ScalarKeyFrameAnimation ScalarAnimation_0p29_to_0_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.289999992F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 0.289999992F, _linearEasingFunction); + result.InsertKeyFrame(0.47486034F, 0, _cubicBezierEasingFunction_07); + return result; + } - // Layer (Shape): T2b-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p411_to_0p665_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.411000013F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 0.411000013F, _linearEasingFunction); - result.InsertKeyFrame(0.47486034F, 0.665000021F, _cubicBezierEasingFunction_07); - return result; - } + // Layer (Shape): T2b-B + // Path 1 + // Path 1.PathGeometry + // TrimStart + ScalarKeyFrameAnimation ScalarAnimation_0p29_to_0_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.289999992F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.458100557F, 0.289999992F, _linearEasingFunction); + result.InsertKeyFrame(0.508379877F, 0, _cubicBezierEasingFunction_07); + return result; + } - // Layer (Shape): T2b-B - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p411_to_0p665_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.411000013F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.458100557F, 0.411000013F, _linearEasingFunction); - result.InsertKeyFrame(0.508379877F, 0.665000021F, _cubicBezierEasingFunction_07); - return result; - } + // Layer (Shape): T2b-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p411_to_0p665_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.411000013F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 0.411000013F, _linearEasingFunction); + result.InsertKeyFrame(0.47486034F, 0.665000021F, _cubicBezierEasingFunction_07); + return result; + } - // Layer (Shape): T2a-Y - // Path 1 - // Path 1.PathGeometry - // TrimStart - ScalarKeyFrameAnimation ScalarAnimation_0p5_to_0_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.402234644F, 0.5F, _linearEasingFunction); - result.InsertKeyFrame(0.458100557F, 0, CubicBezierEasingFunction_12()); - return result; - } + // Layer (Shape): T2b-B + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p411_to_0p665_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.411000013F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.458100557F, 0.411000013F, _linearEasingFunction); + result.InsertKeyFrame(0.508379877F, 0.665000021F, _cubicBezierEasingFunction_07); + return result; + } - // Layer (Shape): T2a-B - // Path 1 - // Path 1.PathGeometry - // TrimStart - ScalarKeyFrameAnimation ScalarAnimation_0p5_to_0_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 0.5F, _linearEasingFunction); - result.InsertKeyFrame(0.47486034F, 0, _cubicBezierEasingFunction_12); - return result; - } + // Layer (Shape): T2a-Y + // Path 1 + // Path 1.PathGeometry + // TrimStart + ScalarKeyFrameAnimation ScalarAnimation_0p5_to_0_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.402234644F, 0.5F, _linearEasingFunction); + result.InsertKeyFrame(0.458100557F, 0, CubicBezierEasingFunction_12()); + return result; + } - // Layer (Shape): T2a-Y - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p5_to_1_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.402234644F, 0.5F, _linearEasingFunction); - result.InsertKeyFrame(0.458100557F, 1, _cubicBezierEasingFunction_12); - return result; - } + // Layer (Shape): T2a-B + // Path 1 + // Path 1.PathGeometry + // TrimStart + ScalarKeyFrameAnimation ScalarAnimation_0p5_to_0_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 0.5F, _linearEasingFunction); + result.InsertKeyFrame(0.47486034F, 0, _cubicBezierEasingFunction_12); + return result; + } - // Layer (Shape): T2a-B - // Path 1 - // Path 1.PathGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_0p5_to_1_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 0.5F, _linearEasingFunction); - result.InsertKeyFrame(0.47486034F, 1, _cubicBezierEasingFunction_12); - return result; - } + // Layer (Shape): T2a-Y + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p5_to_1_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.402234644F, 0.5F, _linearEasingFunction); + result.InsertKeyFrame(0.458100557F, 1, _cubicBezierEasingFunction_12); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p8_to_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.800000012F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.0893854722F, 0.800000012F, _linearEasingFunction); - result.InsertKeyFrame(0.111731842F, 0.5F, CubicBezierEasingFunction_21()); - result.InsertKeyFrame(0.156424582F, 0, CubicBezierEasingFunction_22()); - return result; - } + // Layer (Shape): T2a-B + // Path 1 + // Path 1.PathGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_0p5_to_1_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.5F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 0.5F, _linearEasingFunction); + result.InsertKeyFrame(0.47486034F, 1, _cubicBezierEasingFunction_12); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p8_to_0p3() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.800000012F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.100558661F, 0.800000012F, _linearEasingFunction); - result.InsertKeyFrame(0.128491625F, 0.5F, CubicBezierEasingFunction_24()); - result.InsertKeyFrame(0.30726257F, 0.300000012F, CubicBezierEasingFunction_25()); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p8_to_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.800000012F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.0893854722F, 0.800000012F, _linearEasingFunction); + result.InsertKeyFrame(0.111731842F, 0.5F, CubicBezierEasingFunction_21()); + result.InsertKeyFrame(0.156424582F, 0, CubicBezierEasingFunction_22()); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_0p81_to_0p734_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.810000002F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.0893854722F, 0.810000002F, _linearEasingFunction); - result.InsertKeyFrame(0.150837988F, 0.734000027F, CubicBezierEasingFunction_23()); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p8_to_0p3() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.800000012F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.100558661F, 0.800000012F, _linearEasingFunction); + result.InsertKeyFrame(0.128491625F, 0.5F, CubicBezierEasingFunction_24()); + result.InsertKeyFrame(0.30726257F, 0.300000012F, CubicBezierEasingFunction_25()); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_0p81_to_0p734_1() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.810000002F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.100558661F, 0.810000002F, _linearEasingFunction); - result.InsertKeyFrame(0.162011176F, 0.734000027F, _cubicBezierEasingFunction_23); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_0p81_to_0p734_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.810000002F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.0893854722F, 0.810000002F, _linearEasingFunction); + result.InsertKeyFrame(0.150837988F, 0.734000027F, CubicBezierEasingFunction_23()); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_00() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.162011176F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.184357539F, 0.375330001F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_0p81_to_0p734_1() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.810000002F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.100558661F, 0.810000002F, _linearEasingFunction); + result.InsertKeyFrame(0.162011176F, 0.734000027F, _cubicBezierEasingFunction_23); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_01() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.162011176F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.184357539F, 0.253329992F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_00() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.162011176F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.184357539F, 0.375330001F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_02() - { - var result = _scalarAnimation_0p87_to_0_02 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.363128483F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.391061455F, 0.212329999F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.418994427F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_01() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.162011176F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.184357539F, 0.253329992F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_03() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.421330005F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_02() + { + var result = _scalarAnimation_0p87_to_0_02 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.363128483F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.391061455F, 0.212329999F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.418994427F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_04() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.438329995F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_03() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.421330005F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_05() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.506330013F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_04() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.438329995F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_06() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.439330012F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_05() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.506330013F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_07() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.541899443F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.558659196F, 0.421330005F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_06() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.439330012F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_08() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.541899443F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.558659196F, 0.438329995F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_07() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.541899443F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.558659196F, 0.421330005F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_09() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.541899443F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.558659196F, 0.506330013F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_08() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.541899443F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.558659196F, 0.438329995F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_10() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.446927369F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.463687152F, 0.212329999F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.486033529F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_09() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.541899443F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.558659196F, 0.506330013F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_11() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.469273746F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.486033529F, 0.212329999F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.508379877F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_10() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.446927369F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.463687152F, 0.212329999F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.486033529F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_12() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.47486034F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.502793312F, 0.212329999F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.525139689F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_11() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.469273746F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.486033529F, 0.212329999F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.508379877F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_13() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.43575418F, 0.421330005F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_12() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.47486034F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.502793312F, 0.212329999F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.525139689F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_14() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.43575418F, 0.438329995F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_13() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.43575418F, 0.421330005F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_15() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.43575418F, 0.506330013F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_14() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.43575418F, 0.438329995F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_16() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.441340774F, 0.421330005F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_15() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.43575418F, 0.506330013F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_17() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.441340774F, 0.438329995F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_16() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.441340774F, 0.421330005F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TStart - ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_18() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 0.870000005F, _linearEasingFunction); - result.InsertKeyFrame(0.441340774F, 0.506330013F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_17() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.441340774F, 0.438329995F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); + return result; + } - // Layer (Shape): E3-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_00() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.469273746F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.569832385F, 0, _holdThenStepEasingFunction); - return result; - } + // TStart + ScalarKeyFrameAnimation ScalarAnimation_0p87_to_0_18() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 0.870000005F, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 0.870000005F, _linearEasingFunction); + result.InsertKeyFrame(0.441340774F, 0.506330013F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); + return result; + } - // Layer (Shape): I-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_01() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.43575418F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.519553065F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): E3-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_00() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.469273746F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.569832385F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): E2-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_02() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.463687152F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.536312878F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): I-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_01() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.43575418F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.519553065F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): E1-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_03() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.441340774F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.525139689F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): E2-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_02() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.463687152F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.536312878F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T1a-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_04() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.329608947F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.87150836F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): E1-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_03() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.441340774F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.525139689F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T2b-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_05() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.424580991F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.513966501F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T1a-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_04() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.329608947F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.87150836F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T2a-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_06() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.402234644F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.497206718F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T2b-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_05() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.424580991F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.513966501F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T1b-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_07() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.391061455F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.899441361F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T2a-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_06() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.402234644F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.497206718F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): Dot-Y - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_08() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.156424582F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.301675975F, 0, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T1b-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_07() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.391061455F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.899441361F, 0, _holdThenStepEasingFunction); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_09() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.162011176F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.184357539F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); - return result; - } + // Layer (Shape): Dot-Y + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_08() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.156424582F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.301675975F, 0, _holdThenStepEasingFunction); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_10() - { - var result = _scalarAnimation_1_to_0_10 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.167597771F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.206703916F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_09() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.162011176F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.184357539F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_11() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.162011176F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.184357539F, 0.690559983F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_10() + { + var result = _scalarAnimation_1_to_0_10 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.167597771F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.206703916F, 0, _holdThenStepEasingFunction); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_12() - { - var result = _scalarAnimation_1_to_0_12 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.363128483F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.391061455F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.418994427F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_11() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.162011176F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.184357539F, 0.690559983F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.201117322F, 0, _cubicBezierEasingFunction_04); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_13() - { - var result = _scalarAnimation_1_to_0_13 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.363128483F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.418994427F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_12() + { + var result = _scalarAnimation_1_to_0_12 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.363128483F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.391061455F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.418994427F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_14() - { - var result = _scalarAnimation_1_to_0_14 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_13() + { + var result = _scalarAnimation_1_to_0_13 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.363128483F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.418994427F, 0, _holdThenStepEasingFunction); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_15() - { - var result = _scalarAnimation_1_to_0_15 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.301675975F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.357541889F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_14() + { + var result = _scalarAnimation_1_to_0_14 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_16() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.758560002F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_15() + { + var result = _scalarAnimation_1_to_0_15 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.301675975F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.357541889F, 0, _holdThenStepEasingFunction); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_17() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.318435758F, 0.704559982F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_16() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.758560002F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_18() - { - var result = _scalarAnimation_1_to_0_18 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.541899443F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.558659196F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_17() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.318435758F, 0.704559982F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.357541889F, 0, _cubicBezierEasingFunction_04); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_19() - { - var result = _scalarAnimation_1_to_0_19 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.541899443F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.597765386F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_18() + { + var result = _scalarAnimation_1_to_0_18 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.541899443F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.558659196F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_20() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.541899443F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.558659196F, 0.758560002F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_19() + { + var result = _scalarAnimation_1_to_0_19 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.541899443F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.597765386F, 0, _holdThenStepEasingFunction); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_21() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.446927369F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.463687152F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.486033529F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_20() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.541899443F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.558659196F, 0.758560002F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.597765386F, 0, _cubicBezierEasingFunction_04); + return result; + } - // Layer (Shape): S11 - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_22() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.446927369F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.502793312F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_21() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.446927369F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.463687152F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.486033529F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_23() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.469273746F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.486033529F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.508379877F, 0, _cubicBezierEasingFunction_04); - return result; - } + // Layer (Shape): S11 + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_22() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.446927369F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.502793312F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): S12 - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_24() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.469273746F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.525139689F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_23() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.469273746F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.486033529F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.508379877F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_25() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.47486034F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.502793312F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.525139689F, 0, _cubicBezierEasingFunction_04); - return result; - } + // Layer (Shape): S12 + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_24() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.469273746F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.525139689F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): S13 - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_26() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.47486034F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.530726254F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_25() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.47486034F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.502793312F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.525139689F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_27() - { - var result = _scalarAnimation_1_to_0_27 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.43575418F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); - return result; - } + // Layer (Shape): S13 + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_26() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.47486034F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.530726254F, 0, _holdThenStepEasingFunction); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_28() - { - var result = _scalarAnimation_1_to_0_28 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.418994427F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.463687152F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_27() + { + var result = _scalarAnimation_1_to_0_27 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.43575418F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_29() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.418994427F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.43575418F, 0.758560002F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_28() + { + var result = _scalarAnimation_1_to_0_28 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.418994427F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.463687152F, 0, _holdThenStepEasingFunction); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_30() - { - var result = _scalarAnimation_1_to_0_30 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.441340774F, 0.663559973F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_29() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.418994427F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.43575418F, 0.758560002F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.458100557F, 0, _cubicBezierEasingFunction_04); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_31() - { - var result = _scalarAnimation_1_to_0_31 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.424580991F, 1, _holdThenStepEasingFunction); - result.InsertKeyFrame(0.469273746F, 0, _holdThenStepEasingFunction); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_30() + { + var result = _scalarAnimation_1_to_0_30 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.441340774F, 0.663559973F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); + return result; + } - // TEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0_32() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.424580991F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.441340774F, 0.758560002F, _cubicBezierEasingFunction_04); - result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_31() + { + var result = _scalarAnimation_1_to_0_31 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.424580991F, 1, _holdThenStepEasingFunction); + result.InsertKeyFrame(0.469273746F, 0, _holdThenStepEasingFunction); + return result; + } - // Transforms: O-B - // Ellipse Path 1 - // Ellipse Path 1.EllipseGeometry - // TrimEnd - ScalarKeyFrameAnimation ScalarAnimation_1_to_0p88() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); - result.InsertKeyFrame(0.351955295F, 0.879999995F, _cubicBezierEasingFunction_04); - return result; - } + // TEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0_32() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.424580991F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.441340774F, 0.758560002F, _cubicBezierEasingFunction_04); + result.InsertKeyFrame(0.463687152F, 0, _cubicBezierEasingFunction_04); + return result; + } - // Layer (Shape): Dot1 - ScalarKeyFrameAnimation ScalarAnimation_to_0() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.0949720666F, 0, _holdThenStepEasingFunction); - return result; - } + // Transforms: O-B + // Ellipse Path 1 + // Ellipse Path 1.EllipseGeometry + // TrimEnd + ScalarKeyFrameAnimation ScalarAnimation_1_to_0p88() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, 1, _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, 1, _linearEasingFunction); + result.InsertKeyFrame(0.351955295F, 0.879999995F, _cubicBezierEasingFunction_04); + return result; + } - // Layer (Shape): Dot-Y - ScalarKeyFrameAnimation ScalarAnimation_to_1_00() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.536312878F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): Dot1 + ScalarKeyFrameAnimation ScalarAnimation_to_0() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.0949720666F, 0, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): E3-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_01() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.513966501F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): Dot-Y + ScalarKeyFrameAnimation ScalarAnimation_to_1_00() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.536312878F, 1, _holdThenStepEasingFunction); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_to_1_02() - { - var result = _scalarAnimation_to_1_02 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.452513963F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): E3-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_01() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.513966501F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): E2-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_03() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.480446935F, 1, _holdThenStepEasingFunction); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_to_1_02() + { + var result = _scalarAnimation_to_1_02 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.452513963F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): E1-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_04() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.469273746F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): E2-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_03() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.480446935F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T2b-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_05() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.458100557F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): E1-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_04() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.469273746F, 1, _holdThenStepEasingFunction); + return result; + } - ScalarKeyFrameAnimation ScalarAnimation_to_1_06() - { - var result = _scalarAnimation_to_1_06 = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.301675975F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T2b-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_05() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.458100557F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T1a-Y 2 - ScalarKeyFrameAnimation ScalarAnimation_to_1_07() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.329608947F, 1, _holdThenStepEasingFunction); - return result; - } + ScalarKeyFrameAnimation ScalarAnimation_to_1_06() + { + var result = _scalarAnimation_to_1_06 = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.301675975F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T2a-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_08() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.418994427F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T1a-Y 2 + ScalarKeyFrameAnimation ScalarAnimation_to_1_07() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.329608947F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): T1a-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_09() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.391061455F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T2a-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_08() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.418994427F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): L-Y - ScalarKeyFrameAnimation ScalarAnimation_to_1_10() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.0893854722F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): T1a-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_09() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.391061455F, 1, _holdThenStepEasingFunction); + return result; + } - // Layer (Shape): L-B - ScalarKeyFrameAnimation ScalarAnimation_to_1_11() - { - var result = _c.CreateScalarKeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0.100558661F, 1, _holdThenStepEasingFunction); - return result; - } + // Layer (Shape): L-Y + ScalarKeyFrameAnimation ScalarAnimation_to_1_10() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.0893854722F, 1, _holdThenStepEasingFunction); + return result; + } - ExpressionAnimation ScalarExpressionAnimation() - { - var result = _scalarExpressionAnimation = _c.CreateExpressionAnimation(); - result.SetReferenceParameter("_", _root); - result.Expression = "_.Progress"; - return result; - } + // Layer (Shape): L-B + ScalarKeyFrameAnimation ScalarAnimation_to_1_11() + { + var result = _c.CreateScalarKeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0.100558661F, 1, _holdThenStepEasingFunction); + return result; + } - ShapeVisual ShapeVisual() - { - var result = _c.CreateShapeVisual(); - result.Size = new Vector2(375, 667); - var shapes = result.Shapes; - // Rectangle Path 1 - shapes.Add(SpriteShape_00()); - // Layer (Shape): Dot-Y - shapes.Add(ContainerShape_00()); - // Layer (Shape): E3-Y - shapes.Add(ContainerShape_04()); - // Layer (Shape): E3-B - shapes.Add(ContainerShape_07()); - // Layer (Shape): I-Y - shapes.Add(ContainerShape_10()); - // Layer (Shape): I-B - shapes.Add(ContainerShape_13()); - // Layer (Shape): E2-Y - shapes.Add(ContainerShape_16()); - // Layer (Shape): E2-B - shapes.Add(ContainerShape_19()); - // Layer (Shape): E1-Y - shapes.Add(ContainerShape_22()); - // Layer (Shape): E1-B - shapes.Add(ContainerShape_25()); - // Layer (Shape): T1a-Y - shapes.Add(ContainerShape_28()); - // Layer (Shape): T2b-Y - shapes.Add(ContainerShape_31()); - // Layer (Shape): T2a-Y - shapes.Add(ContainerShape_32()); - // Layer (Shape): T2b-B - shapes.Add(ContainerShape_33()); - // Layer (Shape): T1b-Y - shapes.Add(ContainerShape_34()); - // Layer (Shape): T1b-B - shapes.Add(ContainerShape_35()); - // Layer (Shape): O-Y - shapes.Add(ContainerShape_36()); - // Layer (Shape): O-B - shapes.Add(ContainerShape_39()); - // Layer (Shape): T1a-Y 2 - shapes.Add(ContainerShape_42()); - // Layer (Shape): T2a-B - shapes.Add(ContainerShape_45()); - // Layer (Shape): T1a-B - shapes.Add(ContainerShape_46()); - // Layer (Shape): Dot-Y - shapes.Add(ContainerShape_49()); - // Layer (Shape): L-Y - shapes.Add(ContainerShape_53()); - // Layer (Shape): L-B - shapes.Add(ContainerShape_54()); - // Layer (Shape): Dot1 - shapes.Add(ContainerShape_55()); - // Layer (Shape): S1-Y - shapes.Add(ContainerShape_58()); - // Layer (Shape): S2-Y - shapes.Add(ContainerShape_59()); - // Layer (Shape): S7 - shapes.Add(ContainerShape_60()); - // Layer (Shape): S8 - shapes.Add(ContainerShape_61()); - // Layer (Shape): S3-Y - shapes.Add(ContainerShape_62()); - // Layer (Shape): S4-Y - shapes.Add(ContainerShape_63()); - // Layer (Shape): S5-Y - shapes.Add(ContainerShape_64()); - // Layer (Shape): S6-Y - shapes.Add(ContainerShape_65()); - // Layer (Shape): S3-Y 2 - shapes.Add(ContainerShape_66()); - // Layer (Shape): S4-Y 2 - shapes.Add(ContainerShape_67()); - // Layer (Shape): S5-Y 2 - shapes.Add(ContainerShape_68()); - // Layer (Shape): S11 - shapes.Add(ContainerShape_69()); - // Layer (Shape): S12 - shapes.Add(ContainerShape_70()); - // Layer (Shape): S13 - shapes.Add(ContainerShape_71()); - // Layer (Shape): S3-Y 3 - shapes.Add(ContainerShape_72()); - // Layer (Shape): S4-Y 3 - shapes.Add(ContainerShape_73()); - // Layer (Shape): S5-Y 3 - shapes.Add(ContainerShape_74()); - // Layer (Shape): S3-Y 4 - shapes.Add(ContainerShape_75()); - // Layer (Shape): S4-Y 4 - shapes.Add(ContainerShape_76()); - // Layer (Shape): S5-Y 4 - shapes.Add(ContainerShape_77()); - return result; - } + ExpressionAnimation ScalarExpressionAnimation() + { + var result = _scalarExpressionAnimation = _c.CreateExpressionAnimation(); + result.SetReferenceParameter("_", _root); + result.Expression = "_.Progress"; + return result; + } + ShapeVisual ShapeVisual() + { + var result = _c.CreateShapeVisual(); + result.Size = new Vector2(375, 667); + var shapes = result.Shapes; // Rectangle Path 1 - CompositionSpriteShape SpriteShape_00() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 187.5F, 333.5F); - result.FillBrush = ColorBrush_AlmostDarkTurquoise_FF00D1C1(); - result.Geometry = RoundedRectangle_375x667(); - return result; - } + shapes.Add(SpriteShape_00()); + // Layer (Shape): Dot-Y + shapes.Add(ContainerShape_00()); + // Layer (Shape): E3-Y + shapes.Add(ContainerShape_04()); + // Layer (Shape): E3-B + shapes.Add(ContainerShape_07()); + // Layer (Shape): I-Y + shapes.Add(ContainerShape_10()); + // Layer (Shape): I-B + shapes.Add(ContainerShape_13()); + // Layer (Shape): E2-Y + shapes.Add(ContainerShape_16()); + // Layer (Shape): E2-B + shapes.Add(ContainerShape_19()); + // Layer (Shape): E1-Y + shapes.Add(ContainerShape_22()); + // Layer (Shape): E1-B + shapes.Add(ContainerShape_25()); + // Layer (Shape): T1a-Y + shapes.Add(ContainerShape_28()); + // Layer (Shape): T2b-Y + shapes.Add(ContainerShape_31()); + // Layer (Shape): T2a-Y + shapes.Add(ContainerShape_32()); + // Layer (Shape): T2b-B + shapes.Add(ContainerShape_33()); + // Layer (Shape): T1b-Y + shapes.Add(ContainerShape_34()); + // Layer (Shape): T1b-B + shapes.Add(ContainerShape_35()); + // Layer (Shape): O-Y + shapes.Add(ContainerShape_36()); + // Layer (Shape): O-B + shapes.Add(ContainerShape_39()); + // Layer (Shape): T1a-Y 2 + shapes.Add(ContainerShape_42()); + // Layer (Shape): T2a-B + shapes.Add(ContainerShape_45()); + // Layer (Shape): T1a-B + shapes.Add(ContainerShape_46()); + // Layer (Shape): Dot-Y + shapes.Add(ContainerShape_49()); + // Layer (Shape): L-Y + shapes.Add(ContainerShape_53()); + // Layer (Shape): L-B + shapes.Add(ContainerShape_54()); + // Layer (Shape): Dot1 + shapes.Add(ContainerShape_55()); + // Layer (Shape): S1-Y + shapes.Add(ContainerShape_58()); + // Layer (Shape): S2-Y + shapes.Add(ContainerShape_59()); + // Layer (Shape): S7 + shapes.Add(ContainerShape_60()); + // Layer (Shape): S8 + shapes.Add(ContainerShape_61()); + // Layer (Shape): S3-Y + shapes.Add(ContainerShape_62()); + // Layer (Shape): S4-Y + shapes.Add(ContainerShape_63()); + // Layer (Shape): S5-Y + shapes.Add(ContainerShape_64()); + // Layer (Shape): S6-Y + shapes.Add(ContainerShape_65()); + // Layer (Shape): S3-Y 2 + shapes.Add(ContainerShape_66()); + // Layer (Shape): S4-Y 2 + shapes.Add(ContainerShape_67()); + // Layer (Shape): S5-Y 2 + shapes.Add(ContainerShape_68()); + // Layer (Shape): S11 + shapes.Add(ContainerShape_69()); + // Layer (Shape): S12 + shapes.Add(ContainerShape_70()); + // Layer (Shape): S13 + shapes.Add(ContainerShape_71()); + // Layer (Shape): S3-Y 3 + shapes.Add(ContainerShape_72()); + // Layer (Shape): S4-Y 3 + shapes.Add(ContainerShape_73()); + // Layer (Shape): S5-Y 3 + shapes.Add(ContainerShape_74()); + // Layer (Shape): S3-Y 4 + shapes.Add(ContainerShape_75()); + // Layer (Shape): S4-Y 4 + shapes.Add(ContainerShape_76()); + // Layer (Shape): S5-Y 4 + shapes.Add(ContainerShape_77()); + return result; + } - // Transforms: Dot-Y - // Ellipse Path 1 - CompositionSpriteShape SpriteShape_01() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); - result.FillBrush = ColorBrush_White(); - result.Geometry = Ellipse_4p6(); - return result; - } + // Rectangle Path 1 + CompositionSpriteShape SpriteShape_00() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 187.5F, 333.5F); + result.FillBrush = ColorBrush_AlmostDarkTurquoise_FF00D1C1(); + result.Geometry = RoundedRectangle_375x667(); + return result; + } - // Transforms: E3-Y - // Path 1 - CompositionSpriteShape SpriteShape_02() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.674011F, 261.877014F); - result.Geometry = PathGeometry_00(); - result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87(); - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.56200027F; - return result; - } + // Transforms: Dot-Y + // Ellipse Path 1 + CompositionSpriteShape SpriteShape_01() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); + result.FillBrush = ColorBrush_White(); + result.Geometry = Ellipse_4p6(); + return result; + } - // Transforms: E3-Y - // Path 1 - CompositionSpriteShape SpriteShape_03() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.739014F, 261.877014F); - result.Geometry = PathGeometry_01(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.56200027F; - return result; - } + // Transforms: E3-Y + // Path 1 + CompositionSpriteShape SpriteShape_02() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.674011F, 261.877014F); + result.Geometry = PathGeometry_00(); + result.StrokeBrush = ColorBrush_AlmostTeal_FF007A87(); + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.56200027F; + return result; + } - // Transforms: I-Y - // Path 1 - CompositionSpriteShape SpriteShape_04() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 304.13501F, 282.408997F); - result.Geometry = PathGeometry_02(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Square; - result.StrokeEndCap = CompositionStrokeCap.Square; - result.StrokeStartCap = CompositionStrokeCap.Square; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 8.39999962F; - return result; - } + // Transforms: E3-Y + // Path 1 + CompositionSpriteShape SpriteShape_03() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.739014F, 261.877014F); + result.Geometry = PathGeometry_01(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.56200027F; + return result; + } - // Transforms: I-Y - // Path 1 - CompositionSpriteShape SpriteShape_05() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 304.13501F, 282.408997F); - result.Geometry = PathGeometry_03(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Square; - result.StrokeEndCap = CompositionStrokeCap.Square; - result.StrokeStartCap = CompositionStrokeCap.Square; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Transforms: I-Y + // Path 1 + CompositionSpriteShape SpriteShape_04() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 304.13501F, 282.408997F); + result.Geometry = PathGeometry_02(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Square; + result.StrokeEndCap = CompositionStrokeCap.Square; + result.StrokeStartCap = CompositionStrokeCap.Square; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 8.39999962F; + return result; + } - // Transforms: E2-Y - // Path 1 - CompositionSpriteShape SpriteShape_06() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 331.664001F, 238.139999F); - result.Geometry = PathGeometry_04(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 8.39999962F; - return result; - } + // Transforms: I-Y + // Path 1 + CompositionSpriteShape SpriteShape_05() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 304.13501F, 282.408997F); + result.Geometry = PathGeometry_03(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Square; + result.StrokeEndCap = CompositionStrokeCap.Square; + result.StrokeStartCap = CompositionStrokeCap.Square; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Transforms: E2-Y - // Path 1 - CompositionSpriteShape SpriteShape_07() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 331.664001F, 238.139999F); - result.Geometry = PathGeometry_05(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.56200027F; - return result; - } + // Transforms: E2-Y + // Path 1 + CompositionSpriteShape SpriteShape_06() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 331.664001F, 238.139999F); + result.Geometry = PathGeometry_04(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 8.39999962F; + return result; + } - // Transforms: E1-Y - // Path 1 - CompositionSpriteShape SpriteShape_08() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.671997F, 214.841995F); - result.Geometry = PathGeometry_06(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 8.39999962F; - return result; - } + // Transforms: E2-Y + // Path 1 + CompositionSpriteShape SpriteShape_07() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 331.664001F, 238.139999F); + result.Geometry = PathGeometry_05(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.56200027F; + return result; + } - // Transforms: E1-Y - // Path 1 - CompositionSpriteShape SpriteShape_09() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.671997F, 214.841995F); - result.Geometry = PathGeometry_07(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.56200027F; - return result; - } + // Transforms: E1-Y + // Path 1 + CompositionSpriteShape SpriteShape_08() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.671997F, 214.841995F); + result.Geometry = PathGeometry_06(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 8.39999962F; + return result; + } - // Transforms: T1a-Y - // Path 1 - CompositionSpriteShape SpriteShape_10() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 227.677002F, 234.375F); - result.Geometry = PathGeometry_08(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 8.39999962F; - return result; - } + // Transforms: E1-Y + // Path 1 + CompositionSpriteShape SpriteShape_09() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 344.671997F, 214.841995F); + result.Geometry = PathGeometry_07(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.56200027F; + return result; + } - // Layer (Shape): T2b-Y - // Path 1 - CompositionSpriteShape SpriteShape_11() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, -56.5F, 83.5F); - result.Geometry = PathGeometry_09(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Transforms: T1a-Y + // Path 1 + CompositionSpriteShape SpriteShape_10() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 227.677002F, 234.375F); + result.Geometry = PathGeometry_08(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 8.39999962F; + return result; + } - // Layer (Shape): T2a-Y - // Path 1 - CompositionSpriteShape SpriteShape_12() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 221.197998F, 330.757996F); - result.Geometry = PathGeometry_10(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Square; - result.StrokeEndCap = CompositionStrokeCap.Square; - result.StrokeStartCap = CompositionStrokeCap.Square; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Layer (Shape): T2b-Y + // Path 1 + CompositionSpriteShape SpriteShape_11() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, -56.5F, 83.5F); + result.Geometry = PathGeometry_09(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Layer (Shape): T2b-B - // Path 1 - CompositionSpriteShape SpriteShape_13() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, -56.5F, 83.5F); - result.Geometry = PathGeometry_11(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Layer (Shape): T2a-Y + // Path 1 + CompositionSpriteShape SpriteShape_12() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 221.197998F, 330.757996F); + result.Geometry = PathGeometry_10(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Square; + result.StrokeEndCap = CompositionStrokeCap.Square; + result.StrokeStartCap = CompositionStrokeCap.Square; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Layer (Shape): T1b-Y - // Path 1 - CompositionSpriteShape SpriteShape_14() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 186.255997F, 349.080994F); - result.Geometry = PathGeometry_12(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeLineJoin = CompositionStrokeLineJoin.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 8.39999962F; - return result; - } + // Layer (Shape): T2b-B + // Path 1 + CompositionSpriteShape SpriteShape_13() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, -56.5F, 83.5F); + result.Geometry = PathGeometry_11(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Layer (Shape): T1b-B - // Path 1 - CompositionSpriteShape SpriteShape_15() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 186.255997F, 349.080994F); - result.Geometry = PathGeometry_13(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeLineJoin = CompositionStrokeLineJoin.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 9.19400024F; - return result; - } + // Layer (Shape): T1b-Y + // Path 1 + CompositionSpriteShape SpriteShape_14() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 186.255997F, 349.080994F); + result.Geometry = PathGeometry_12(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeLineJoin = CompositionStrokeLineJoin.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 8.39999962F; + return result; + } - // Transforms: O-Y - // Ellipse Path 1 - CompositionSpriteShape SpriteShape_16() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); - result.Geometry = Ellipse_1p5_0(); - result.StrokeBrush = _colorBrush_White; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 8.80000019F; - return result; - } + // Layer (Shape): T1b-B + // Path 1 + CompositionSpriteShape SpriteShape_15() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 186.255997F, 349.080994F); + result.Geometry = PathGeometry_13(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeLineJoin = CompositionStrokeLineJoin.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 9.19400024F; + return result; + } - // Transforms: O-B - // Ellipse Path 1 - CompositionSpriteShape SpriteShape_17() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); - result.Geometry = Ellipse_1p5_1(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 9.19400024F; - return result; - } + // Transforms: O-Y + // Ellipse Path 1 + CompositionSpriteShape SpriteShape_16() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); + result.Geometry = Ellipse_1p5_0(); + result.StrokeBrush = _colorBrush_White; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 8.80000019F; + return result; + } - // Transforms: T1a-Y 2 - // Path 1 - CompositionSpriteShape SpriteShape_18() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 227.677002F, 234.375F); - result.Geometry = PathGeometry_14(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 8.39999962F; - return result; - } + // Transforms: O-B + // Ellipse Path 1 + CompositionSpriteShape SpriteShape_17() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); + result.Geometry = Ellipse_1p5_1(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 9.19400024F; + return result; + } - // Layer (Shape): T2a-B - // Path 1 - CompositionSpriteShape SpriteShape_19() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 221.197998F, 330.757996F); - result.Geometry = PathGeometry_15(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Square; - result.StrokeEndCap = CompositionStrokeCap.Square; - result.StrokeStartCap = CompositionStrokeCap.Square; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Transforms: T1a-Y 2 + // Path 1 + CompositionSpriteShape SpriteShape_18() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 227.677002F, 234.375F); + result.Geometry = PathGeometry_14(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 8.39999962F; + return result; + } - // Transforms: T1a-Y - // Path 1 - CompositionSpriteShape SpriteShape_20() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 227.677002F, 234.375F); - result.Geometry = PathGeometry_16(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Layer (Shape): T2a-B + // Path 1 + CompositionSpriteShape SpriteShape_19() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 221.197998F, 330.757996F); + result.Geometry = PathGeometry_15(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Square; + result.StrokeEndCap = CompositionStrokeCap.Square; + result.StrokeStartCap = CompositionStrokeCap.Square; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Transforms: Dot-Y - // Ellipse Path 1 - CompositionSpriteShape SpriteShape_21() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); - result.FillBrush = _colorBrush_White; - result.Geometry = Ellipse_4p7(); - return result; - } + // Transforms: T1a-Y + // Path 1 + CompositionSpriteShape SpriteShape_20() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 227.677002F, 234.375F); + result.Geometry = PathGeometry_16(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Layer (Shape): L-Y - // Path 1 - CompositionSpriteShape SpriteShape_22() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 109.529007F, 354.143005F); - result.Geometry = PathGeometry_17(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 8.39999962F; - return result; - } + // Transforms: Dot-Y + // Ellipse Path 1 + CompositionSpriteShape SpriteShape_21() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); + result.FillBrush = _colorBrush_White; + result.Geometry = Ellipse_4p7(); + return result; + } - // Layer (Shape): L-B - // Path 1 - CompositionSpriteShape SpriteShape_23() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 109.529007F, 354.143005F); - result.Geometry = PathGeometry_18(); - result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 10; - result.StrokeThickness = 9.19400024F; - return result; - } + // Layer (Shape): L-Y + // Path 1 + CompositionSpriteShape SpriteShape_22() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 109.529007F, 354.143005F); + result.Geometry = PathGeometry_17(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 8.39999962F; + return result; + } - // Transforms: Dot1 - // Ellipse Path 1 - CompositionSpriteShape SpriteShape_24() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); - result.FillBrush = _colorBrush_White; - result.Geometry = _ellipse_4p7; - return result; - } + // Layer (Shape): L-B + // Path 1 + CompositionSpriteShape SpriteShape_23() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 109.529007F, 354.143005F); + result.Geometry = PathGeometry_18(); + result.StrokeBrush = _colorBrush_AlmostTeal_FF007A87; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 10; + result.StrokeThickness = 9.19400024F; + return result; + } - // Layer (Shape): S1-Y - // Path 1 - CompositionSpriteShape SpriteShape_25() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_19(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Transforms: Dot1 + // Ellipse Path 1 + CompositionSpriteShape SpriteShape_24() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 196, 267); + result.FillBrush = _colorBrush_White; + result.Geometry = _ellipse_4p7; + return result; + } - // Layer (Shape): S2-Y - // Path 1 - CompositionSpriteShape SpriteShape_26() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_20(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Layer (Shape): S1-Y + // Path 1 + CompositionSpriteShape SpriteShape_25() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_19(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S7 - // Path 1 - CompositionSpriteShape SpriteShape_27() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_21(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Layer (Shape): S2-Y + // Path 1 + CompositionSpriteShape SpriteShape_26() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_20(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S8 - // Path 1 - CompositionSpriteShape SpriteShape_28() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_22(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Layer (Shape): S7 + // Path 1 + CompositionSpriteShape SpriteShape_27() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_21(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S3-Y - // Path 1 - CompositionSpriteShape SpriteShape_29() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_23(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S8 + // Path 1 + CompositionSpriteShape SpriteShape_28() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_22(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S4-Y - // Path 1 - CompositionSpriteShape SpriteShape_30() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_24(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S3-Y + // Path 1 + CompositionSpriteShape SpriteShape_29() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_23(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S5-Y - // Path 1 - CompositionSpriteShape SpriteShape_31() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_25(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S4-Y + // Path 1 + CompositionSpriteShape SpriteShape_30() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_24(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S6-Y - // Path 1 - CompositionSpriteShape SpriteShape_32() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_26(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S5-Y + // Path 1 + CompositionSpriteShape SpriteShape_31() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_25(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S3-Y 2 - // Path 1 - CompositionSpriteShape SpriteShape_33() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_27(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S6-Y + // Path 1 + CompositionSpriteShape SpriteShape_32() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_26(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S4-Y 2 - // Path 1 - CompositionSpriteShape SpriteShape_34() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_28(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S3-Y 2 + // Path 1 + CompositionSpriteShape SpriteShape_33() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_27(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S5-Y 2 - // Path 1 - CompositionSpriteShape SpriteShape_35() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_29(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S4-Y 2 + // Path 1 + CompositionSpriteShape SpriteShape_34() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_28(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S11 - // Path 1 - CompositionSpriteShape SpriteShape_36() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_30(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Layer (Shape): S5-Y 2 + // Path 1 + CompositionSpriteShape SpriteShape_35() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_29(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S12 - // Path 1 - CompositionSpriteShape SpriteShape_37() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_31(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Layer (Shape): S11 + // Path 1 + CompositionSpriteShape SpriteShape_36() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_30(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S13 - // Path 1 - CompositionSpriteShape SpriteShape_38() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); - result.Geometry = PathGeometry_32(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 1.5F; - return result; - } + // Layer (Shape): S12 + // Path 1 + CompositionSpriteShape SpriteShape_37() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_31(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S3-Y 3 - // Path 1 - CompositionSpriteShape SpriteShape_39() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F); - result.Geometry = PathGeometry_33(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S13 + // Path 1 + CompositionSpriteShape SpriteShape_38() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(1, 0, 0, 1, 179.5F, 333.5F); + result.Geometry = PathGeometry_32(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 1.5F; + return result; + } - // Layer (Shape): S4-Y 3 - // Path 1 - CompositionSpriteShape SpriteShape_40() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F); - result.Geometry = PathGeometry_34(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S3-Y 3 + // Path 1 + CompositionSpriteShape SpriteShape_39() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F); + result.Geometry = PathGeometry_33(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S5-Y 3 - // Path 1 - CompositionSpriteShape SpriteShape_41() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F); - result.Geometry = PathGeometry_35(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S4-Y 3 + // Path 1 + CompositionSpriteShape SpriteShape_40() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F); + result.Geometry = PathGeometry_34(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S3-Y 4 - // Path 1 - CompositionSpriteShape SpriteShape_42() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F); - result.Geometry = PathGeometry_36(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S5-Y 3 + // Path 1 + CompositionSpriteShape SpriteShape_41() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(-0.137444615F, 0.99050945F, -0.99050945F, -0.137444615F, 212.662003F, 248.427994F); + result.Geometry = PathGeometry_35(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S4-Y 4 - // Path 1 - CompositionSpriteShape SpriteShape_43() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F); - result.Geometry = PathGeometry_37(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S3-Y 4 + // Path 1 + CompositionSpriteShape SpriteShape_42() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F); + result.Geometry = PathGeometry_36(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Layer (Shape): S5-Y 4 - // Path 1 - CompositionSpriteShape SpriteShape_44() - { - var result = _c.CreateSpriteShape(); - result.TransformMatrix = new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F); - result.Geometry = PathGeometry_38(); - result.StrokeBrush = _colorBrush_White; - result.StrokeDashCap = CompositionStrokeCap.Round; - result.StrokeEndCap = CompositionStrokeCap.Round; - result.StrokeStartCap = CompositionStrokeCap.Round; - result.StrokeMiterLimit = 4; - result.StrokeThickness = 2; - return result; - } + // Layer (Shape): S4-Y 4 + // Path 1 + CompositionSpriteShape SpriteShape_43() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F); + result.Geometry = PathGeometry_37(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - StepEasingFunction StepThenHoldEasingFunction() - { - var result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction(); - result.IsInitialStepSingleFrame = true; - return result; - } + // Layer (Shape): S5-Y 4 + // Path 1 + CompositionSpriteShape SpriteShape_44() + { + var result = _c.CreateSpriteShape(); + result.TransformMatrix = new Matrix3x2(0.0157073997F, -0.999876618F, 0.999876618F, 0.0157073997F, 207.662003F, 419.427979F); + result.Geometry = PathGeometry_38(); + result.StrokeBrush = _colorBrush_White; + result.StrokeDashCap = CompositionStrokeCap.Round; + result.StrokeEndCap = CompositionStrokeCap.Round; + result.StrokeStartCap = CompositionStrokeCap.Round; + result.StrokeMiterLimit = 4; + result.StrokeThickness = 2; + return result; + } - // Transforms: Dot-Y - // Position - Vector2KeyFrameAnimation Vector2Animation_00() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(43.2630005F, 59.75F), StepThenHoldEasingFunction()); - result.InsertKeyFrame(0.536312878F, new Vector2(43.2630005F, 59.75F), HoldThenStepEasingFunction()); - result.InsertKeyFrame(0.603351951F, new Vector2(62.5130005F, 59.75F), CubicBezierEasingFunction_00()); - result.InsertKeyFrame(0.642458081F, new Vector2(63.7630005F, 59.75F), CubicBezierEasingFunction_01()); - return result; - } + StepEasingFunction StepThenHoldEasingFunction() + { + var result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction(); + result.IsInitialStepSingleFrame = true; + return result; + } - // Transforms: Bncr - // Position - Vector2KeyFrameAnimation Vector2Animation_01() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(164.781998F, 57.4729996F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.536312878F, new Vector2(164.781998F, 57.4729996F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.553072631F, new Vector2(164.781998F, 55.4729996F), CubicBezierEasingFunction_02()); - result.InsertKeyFrame(0.569832385F, new Vector2(164.781998F, 57.4729996F), CubicBezierEasingFunction_03()); - result.InsertKeyFrame(0.586592197F, new Vector2(164.781998F, 56.9090004F), _cubicBezierEasingFunction_02); - result.InsertKeyFrame(0.603351951F, new Vector2(164.781998F, 57.4729996F), _cubicBezierEasingFunction_03); - return result; - } + // Transforms: Dot-Y + // Position + Vector2KeyFrameAnimation Vector2Animation_00() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(43.2630005F, 59.75F), StepThenHoldEasingFunction()); + result.InsertKeyFrame(0.536312878F, new Vector2(43.2630005F, 59.75F), HoldThenStepEasingFunction()); + result.InsertKeyFrame(0.603351951F, new Vector2(62.5130005F, 59.75F), CubicBezierEasingFunction_00()); + result.InsertKeyFrame(0.642458081F, new Vector2(63.7630005F, 59.75F), CubicBezierEasingFunction_01()); + return result; + } - // Position - Vector2KeyFrameAnimation Vector2Animation_02() - { - var result = _vector2Animation_02 = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(119.167F, 57.4790001F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.469273746F, new Vector2(119.167F, 57.4790001F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.513966501F, new Vector2(137.167007F, 57.4790001F), CubicBezierEasingFunction_05()); - result.InsertKeyFrame(0.536312878F, new Vector2(134.167007F, 57.4790001F), CubicBezierEasingFunction_06()); - return result; - } + // Transforms: Bncr + // Position + Vector2KeyFrameAnimation Vector2Animation_01() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(164.781998F, 57.4729996F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.536312878F, new Vector2(164.781998F, 57.4729996F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.553072631F, new Vector2(164.781998F, 55.4729996F), CubicBezierEasingFunction_02()); + result.InsertKeyFrame(0.569832385F, new Vector2(164.781998F, 57.4729996F), CubicBezierEasingFunction_03()); + result.InsertKeyFrame(0.586592197F, new Vector2(164.781998F, 56.9090004F), _cubicBezierEasingFunction_02); + result.InsertKeyFrame(0.603351951F, new Vector2(164.781998F, 57.4729996F), _cubicBezierEasingFunction_03); + return result; + } - // Position - Vector2KeyFrameAnimation Vector2Animation_03() - { - var result = _vector2Animation_03 = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(93.5940018F, 62.8610001F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.43575418F, new Vector2(93.5940018F, 62.8610001F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.491620123F, new Vector2(92.6259995F, 82.8290024F), _cubicBezierEasingFunction_07); - result.InsertKeyFrame(0.513966501F, new Vector2(92.8440018F, 77.8610001F), CubicBezierEasingFunction_08()); - return result; - } + // Position + Vector2KeyFrameAnimation Vector2Animation_02() + { + var result = _vector2Animation_02 = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(119.167F, 57.4790001F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.469273746F, new Vector2(119.167F, 57.4790001F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.513966501F, new Vector2(137.167007F, 57.4790001F), CubicBezierEasingFunction_05()); + result.InsertKeyFrame(0.536312878F, new Vector2(134.167007F, 57.4790001F), CubicBezierEasingFunction_06()); + return result; + } - // Position - Vector2KeyFrameAnimation Vector2Animation_04() - { - var result = _vector2Animation_04 = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(109.092003F, 33.6100006F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.463687152F, new Vector2(109.092003F, 33.6100006F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.513966501F, new Vector2(121.092003F, 33.6100006F), _cubicBezierEasingFunction_07); - result.InsertKeyFrame(0.536312878F, new Vector2(121.092003F, 33.6100006F), CubicBezierEasingFunction_09()); - return result; - } + // Position + Vector2KeyFrameAnimation Vector2Animation_03() + { + var result = _vector2Animation_03 = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(93.5940018F, 62.8610001F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.43575418F, new Vector2(93.5940018F, 62.8610001F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.491620123F, new Vector2(92.6259995F, 82.8290024F), _cubicBezierEasingFunction_07); + result.InsertKeyFrame(0.513966501F, new Vector2(92.8440018F, 77.8610001F), CubicBezierEasingFunction_08()); + return result; + } - // Position - Vector2KeyFrameAnimation Vector2Animation_05() - { - var result = _vector2Animation_05 = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(113.714996F, 9.14599991F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.441340774F, new Vector2(113.714996F, 9.14599991F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.491620123F, new Vector2(137.714996F, 9.14599991F), _cubicBezierEasingFunction_07); - result.InsertKeyFrame(0.513966501F, new Vector2(133.714996F, 9.14599991F), _cubicBezierEasingFunction_08); - return result; - } + // Position + Vector2KeyFrameAnimation Vector2Animation_04() + { + var result = _vector2Animation_04 = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(109.092003F, 33.6100006F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.463687152F, new Vector2(109.092003F, 33.6100006F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.513966501F, new Vector2(121.092003F, 33.6100006F), _cubicBezierEasingFunction_07); + result.InsertKeyFrame(0.536312878F, new Vector2(121.092003F, 33.6100006F), CubicBezierEasingFunction_09()); + return result; + } - // Position - Vector2KeyFrameAnimation Vector2Animation_06() - { - var result = _vector2Animation_06 = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(39.0429993F, 48.6780014F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.312849164F, new Vector2(39.0429993F, 48.6780014F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.357541889F, new Vector2(39.0429993F, 45.6780014F), _cubicBezierEasingFunction_05); - return result; - } + // Position + Vector2KeyFrameAnimation Vector2Animation_05() + { + var result = _vector2Animation_05 = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(113.714996F, 9.14599991F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.441340774F, new Vector2(113.714996F, 9.14599991F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.491620123F, new Vector2(137.714996F, 9.14599991F), _cubicBezierEasingFunction_07); + result.InsertKeyFrame(0.513966501F, new Vector2(133.714996F, 9.14599991F), _cubicBezierEasingFunction_08); + return result; + } - // Radius - Vector2KeyFrameAnimation Vector2Animation_07() - { - var result = _vector2Animation_07 = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(1.5F, 1.5F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, new Vector2(1.5F, 1.5F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.340782136F, new Vector2(22.2999992F, 22.2999992F), CubicBezierEasingFunction_14()); - return result; - } + // Position + Vector2KeyFrameAnimation Vector2Animation_06() + { + var result = _vector2Animation_06 = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(39.0429993F, 48.6780014F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.312849164F, new Vector2(39.0429993F, 48.6780014F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.357541889F, new Vector2(39.0429993F, 45.6780014F), _cubicBezierEasingFunction_05); + return result; + } - // Transforms: O-Y - // Position - Vector2KeyFrameAnimation Vector2Animation_08() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.SetReferenceParameter("_", _root); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(-62.7919998F, 73.0569992F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.17318435F, new Vector2(-62.7919998F, 73.0569992F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.196966484F, new Vector2(-53.7919998F, 7.55700016F), _cubicBezierEasingFunction_04); - result.InsertExpressionKeyFrame(0.245809957F, "(Pow(1 - _.t0, 3) * Vector2((-53.792),7.557)) + (3 * Square(1 - _.t0) * _.t0 * Vector2((-53.792),7.557)) + (3 * (1 - _.t0) * Square(_.t0) * Vector2((-52.82329),(-71.07968))) + (Pow(_.t0, 3) * Vector2((-33.667),(-72.818)))", _stepThenHoldEasingFunction); - result.InsertExpressionKeyFrame(0.301675886F, "(Pow(1 - _.t0, 3) * Vector2((-33.667),(-72.818))) + (3 * Square(1 - _.t0) * _.t0 * Vector2((-17.45947),(-74.28873))) + (3 * (1 - _.t0) * Square(_.t0) * Vector2((-14.167),102.182)) + (Pow(_.t0, 3) * Vector2((-14.167),102.182))", _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, new Vector2(-14.1669998F, 102.181999F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.351955295F, new Vector2(-14.1669998F, 59.1819992F), CubicBezierEasingFunction_15()); - result.InsertKeyFrame(0.407821238F, new Vector2(-14.1669998F, 62.1819992F), CubicBezierEasingFunction_16()); - return result; - } + // Radius + Vector2KeyFrameAnimation Vector2Animation_07() + { + var result = _vector2Animation_07 = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(1.5F, 1.5F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, new Vector2(1.5F, 1.5F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.340782136F, new Vector2(22.2999992F, 22.2999992F), CubicBezierEasingFunction_14()); + return result; + } - // Transforms: O-B - // Position - Vector2KeyFrameAnimation Vector2Animation_09() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.SetReferenceParameter("_", _root); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(-62.7919998F, 73.0569992F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.17318435F, new Vector2(-62.7919998F, 73.0569992F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.196966484F, new Vector2(-53.7919998F, 7.55700016F), _cubicBezierEasingFunction_04); - result.InsertExpressionKeyFrame(0.245809957F, "(Pow(1 - _.t1, 3) * Vector2((-53.792),7.557)) + (3 * Square(1 - _.t1) * _.t1 * Vector2((-53.792),7.557)) + (3 * (1 - _.t1) * Square(_.t1) * Vector2((-52.82329),(-71.07968))) + (Pow(_.t1, 3) * Vector2((-33.667),(-72.818)))", _stepThenHoldEasingFunction); - result.InsertExpressionKeyFrame(0.301675886F, "(Pow(1 - _.t1, 3) * Vector2((-33.667),(-72.818))) + (3 * Square(1 - _.t1) * _.t1 * Vector2((-17.45947),(-74.28873))) + (3 * (1 - _.t1) * Square(_.t1) * Vector2((-14.167),102.182)) + (Pow(_.t1, 3) * Vector2((-14.167),102.182))", _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.301675975F, new Vector2(-14.1669998F, 102.181999F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.351955295F, new Vector2(-14.1669998F, 59.1819992F), _cubicBezierEasingFunction_15); - result.InsertKeyFrame(0.407821238F, new Vector2(-14.1669998F, 62.1819992F), _cubicBezierEasingFunction_16); - return result; - } + // Transforms: O-Y + // Position + Vector2KeyFrameAnimation Vector2Animation_08() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.SetReferenceParameter("_", _root); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(-62.7919998F, 73.0569992F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.17318435F, new Vector2(-62.7919998F, 73.0569992F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.196966484F, new Vector2(-53.7919998F, 7.55700016F), _cubicBezierEasingFunction_04); + result.InsertExpressionKeyFrame(0.245809957F, "(Pow(1 - _.t0, 3) * Vector2((-53.792),7.557)) + (3 * Square(1 - _.t0) * _.t0 * Vector2((-53.792),7.557)) + (3 * (1 - _.t0) * Square(_.t0) * Vector2((-52.82329),(-71.07968))) + (Pow(_.t0, 3) * Vector2((-33.667),(-72.818)))", _stepThenHoldEasingFunction); + result.InsertExpressionKeyFrame(0.301675886F, "(Pow(1 - _.t0, 3) * Vector2((-33.667),(-72.818))) + (3 * Square(1 - _.t0) * _.t0 * Vector2((-17.45947),(-74.28873))) + (3 * (1 - _.t0) * Square(_.t0) * Vector2((-14.167),102.182)) + (Pow(_.t0, 3) * Vector2((-14.167),102.182))", _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, new Vector2(-14.1669998F, 102.181999F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.351955295F, new Vector2(-14.1669998F, 59.1819992F), CubicBezierEasingFunction_15()); + result.InsertKeyFrame(0.407821238F, new Vector2(-14.1669998F, 62.1819992F), CubicBezierEasingFunction_16()); + return result; + } - // Transforms: Dot-Y - // Position - Vector2KeyFrameAnimation Vector2Animation_10() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(39.875F, 60), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.156424582F, new Vector2(39.875F, 60), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.301675975F, new Vector2(79.375F, 60), _cubicBezierEasingFunction_04); - return result; - } + // Transforms: O-B + // Position + Vector2KeyFrameAnimation Vector2Animation_09() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.SetReferenceParameter("_", _root); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(-62.7919998F, 73.0569992F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.17318435F, new Vector2(-62.7919998F, 73.0569992F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.196966484F, new Vector2(-53.7919998F, 7.55700016F), _cubicBezierEasingFunction_04); + result.InsertExpressionKeyFrame(0.245809957F, "(Pow(1 - _.t1, 3) * Vector2((-53.792),7.557)) + (3 * Square(1 - _.t1) * _.t1 * Vector2((-53.792),7.557)) + (3 * (1 - _.t1) * Square(_.t1) * Vector2((-52.82329),(-71.07968))) + (Pow(_.t1, 3) * Vector2((-33.667),(-72.818)))", _stepThenHoldEasingFunction); + result.InsertExpressionKeyFrame(0.301675886F, "(Pow(1 - _.t1, 3) * Vector2((-33.667),(-72.818))) + (3 * Square(1 - _.t1) * _.t1 * Vector2((-17.45947),(-74.28873))) + (3 * (1 - _.t1) * Square(_.t1) * Vector2((-14.167),102.182)) + (Pow(_.t1, 3) * Vector2((-14.167),102.182))", _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.301675975F, new Vector2(-14.1669998F, 102.181999F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.351955295F, new Vector2(-14.1669998F, 59.1819992F), _cubicBezierEasingFunction_15); + result.InsertKeyFrame(0.407821238F, new Vector2(-14.1669998F, 62.1819992F), _cubicBezierEasingFunction_16); + return result; + } - // Transforms: N - // Position - Vector2KeyFrameAnimation Vector2Animation_11() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(-33.6669998F, 8.18200016F), _stepThenHoldEasingFunction); - result.InsertKeyFrame(0.156424582F, new Vector2(-33.6669998F, 8.18200016F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.223463684F, new Vector2(-33.6669998F, -72.8180008F), CubicBezierEasingFunction_19()); - result.InsertKeyFrame(0.301675975F, new Vector2(-33.6669998F, 102.056999F), CubicBezierEasingFunction_20()); - return result; - } + // Transforms: Dot-Y + // Position + Vector2KeyFrameAnimation Vector2Animation_10() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(39.875F, 60), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.156424582F, new Vector2(39.875F, 60), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.301675975F, new Vector2(79.375F, 60), _cubicBezierEasingFunction_04); + return result; + } - // Transforms: Dot1 - // Position - Vector2KeyFrameAnimation Vector2Animation_12() - { - var result = _c.CreateVector2KeyFrameAnimation(); - result.Duration = TimeSpan.FromTicks(c_durationTicks); - result.InsertKeyFrame(0, new Vector2(295.770996F, 108.994003F), _holdThenStepEasingFunction); - result.InsertKeyFrame(0.104395606F, new Vector2(35.7709999F, 108.994003F), CubicBezierEasingFunction_26()); - return result; - } + // Transforms: N + // Position + Vector2KeyFrameAnimation Vector2Animation_11() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(-33.6669998F, 8.18200016F), _stepThenHoldEasingFunction); + result.InsertKeyFrame(0.156424582F, new Vector2(-33.6669998F, 8.18200016F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.223463684F, new Vector2(-33.6669998F, -72.8180008F), CubicBezierEasingFunction_19()); + result.InsertKeyFrame(0.301675975F, new Vector2(-33.6669998F, 102.056999F), CubicBezierEasingFunction_20()); + return result; + } - internal AnimatedVisual(Compositor compositor) - { - _c = compositor; - _reusableExpressionAnimation = compositor.CreateExpressionAnimation(); - Root(); - } + // Transforms: Dot1 + // Position + Vector2KeyFrameAnimation Vector2Animation_12() + { + var result = _c.CreateVector2KeyFrameAnimation(); + result.Duration = TimeSpan.FromTicks(c_durationTicks); + result.InsertKeyFrame(0, new Vector2(295.770996F, 108.994003F), _holdThenStepEasingFunction); + result.InsertKeyFrame(0.104395606F, new Vector2(35.7709999F, 108.994003F), CubicBezierEasingFunction_26()); + return result; + } - Visual IAnimatedVisual.RootVisual => _root; - TimeSpan IAnimatedVisual.Duration => TimeSpan.FromTicks(c_durationTicks); - Vector2 IAnimatedVisual.Size => new Vector2(375, 667); - void IDisposable.Dispose() => _root?.Dispose(); + internal AnimatedVisual(Compositor compositor) + { + _c = compositor; + _reusableExpressionAnimation = compositor.CreateExpressionAnimation(); + Root(); } + + Visual IAnimatedVisual.RootVisual => _root; + TimeSpan IAnimatedVisual.Duration => TimeSpan.FromTicks(c_durationTicks); + Vector2 IAnimatedVisual.Size => new Vector2(375, 667); + void IDisposable.Dispose() => _root?.Dispose(); } } diff --git a/WinUIGallery/App.xaml.cs b/WinUIGallery/App.xaml.cs index 759be7f81..822c5ba38 100644 --- a/WinUIGallery/App.xaml.cs +++ b/WinUIGallery/App.xaml.cs @@ -28,287 +28,286 @@ using Microsoft.Windows.AppNotifications.Builder; using static WinUIGallery.Win32; -namespace WinUIGallery +namespace WinUIGallery; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +sealed partial class App : Application { - /// - /// Provides application-specific behavior to supplement the default Application class. - /// - sealed partial class App : Application - { - private static Window startupWindow; - private static Win32WindowHelper win32WindowHelper; - private static int registeredKeyPressedHook = 0; - private HookProc keyEventHook; + private static Window startupWindow; + private static Win32WindowHelper win32WindowHelper; + private static int registeredKeyPressedHook = 0; + private HookProc keyEventHook; - public static string WinAppSdkDetails - { - // TODO: restore patch number and version tag when WinAppSDK supports them both - get => string.Format("Windows App SDK {0}.{1}", - WASDK.Release.Major, WASDK.Release.Minor); - } + public static string WinAppSdkDetails + { + // TODO: restore patch number and version tag when WinAppSDK supports them both + get => string.Format("Windows App SDK {0}.{1}", + WASDK.Release.Major, WASDK.Release.Minor); + } - public static string WinAppSdkRuntimeDetails + public static string WinAppSdkRuntimeDetails + { + get { - get + try { - try - { - // Retrieve Windows App Runtime version info dynamically - var windowsAppRuntimeVersion = - from module in Process.GetCurrentProcess().Modules.OfType() - where module.FileName.EndsWith("Microsoft.WindowsAppRuntime.Insights.Resource.dll") - select FileVersionInfo.GetVersionInfo(module.FileName); - return WinAppSdkDetails + ", Windows App Runtime " + windowsAppRuntimeVersion.First().FileVersion; - } - catch - { - return WinAppSdkDetails + $", Windows App Runtime {WASDK.Runtime.Version.Major}.{WASDK.Runtime.Version.Minor}"; - } + // Retrieve Windows App Runtime version info dynamically + var windowsAppRuntimeVersion = + from module in Process.GetCurrentProcess().Modules.OfType() + where module.FileName.EndsWith("Microsoft.WindowsAppRuntime.Insights.Resource.dll") + select FileVersionInfo.GetVersionInfo(module.FileName); + return WinAppSdkDetails + ", Windows App Runtime " + windowsAppRuntimeVersion.First().FileVersion; } - } - - // Get the initial window created for this app - // On UWP, this is simply Window.Current - // On Desktop, multiple Windows may be created, and the StartupWindow may have already - // been closed. - public static Window StartupWindow - { - get + catch { - return startupWindow; + return WinAppSdkDetails + $", Windows App Runtime {WASDK.Runtime.Version.Major}.{WASDK.Runtime.Version.Minor}"; } } - /// - /// Initializes the singleton Application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() + } + + // Get the initial window created for this app + // On UWP, this is simply Window.Current + // On Desktop, multiple Windows may be created, and the StartupWindow may have already + // been closed. + public static Window StartupWindow + { + get { - this.InitializeComponent(); - this.UnhandledException += HandleExceptions; + return startupWindow; + } + } + /// + /// Initializes the singleton Application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + this.InitializeComponent(); + this.UnhandledException += HandleExceptions; #if WINUI_PRERELEASE - this.Suspending += OnSuspending; - this.Resuming += App_Resuming; - this.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; + this.Suspending += OnSuspending; + this.Resuming += App_Resuming; + this.RequiresPointerMode = ApplicationRequiresPointerMode.WhenRequested; #endif - } + } - public void EnableSound(bool withSpatial = false) - { - ElementSoundPlayer.State = ElementSoundPlayerState.On; + public void EnableSound(bool withSpatial = false) + { + ElementSoundPlayer.State = ElementSoundPlayerState.On; - if (!withSpatial) - ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.Off; - else - ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.On; - } + if (!withSpatial) + ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.Off; + else + ElementSoundPlayer.SpatialAudioMode = ElementSpatialAudioMode.On; + } - public static TEnum GetEnum(string text) where TEnum : struct + public static TEnum GetEnum(string text) where TEnum : struct + { + if (!typeof(TEnum).GetTypeInfo().IsEnum) { - if (!typeof(TEnum).GetTypeInfo().IsEnum) - { - throw new InvalidOperationException("Generic parameter 'TEnum' must be an enum."); - } - return (TEnum)Enum.Parse(typeof(TEnum), text); + throw new InvalidOperationException("Generic parameter 'TEnum' must be an enum."); } + return (TEnum)Enum.Parse(typeof(TEnum), text); + } - /// - /// Invoked when the application is launched normally by the end user. Other entry points - /// will be used such as when the application is launched to open a specific file. - /// - /// Details about the launch request and process. - protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) - { - IdleSynchronizer.Init(); + /// + /// Invoked when the application is launched normally by the end user. Other entry points + /// will be used such as when the application is launched to open a specific file. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + IdleSynchronizer.Init(); - startupWindow = WindowHelper.CreateWindow(); - startupWindow.ExtendsContentIntoTitleBar = true; + startupWindow = WindowHelper.CreateWindow(); + startupWindow.ExtendsContentIntoTitleBar = true; - win32WindowHelper = new Win32WindowHelper(startupWindow); - win32WindowHelper.SetWindowMinMaxSize(new Win32WindowHelper.POINT() { x = 500, y = 500 }); + win32WindowHelper = new Win32WindowHelper(startupWindow); + win32WindowHelper.SetWindowMinMaxSize(new Win32WindowHelper.POINT() { x = 500, y = 500 }); #if DEBUG - if (System.Diagnostics.Debugger.IsAttached) - { - this.DebugSettings.BindingFailed += DebugSettings_BindingFailed; - } + if (System.Diagnostics.Debugger.IsAttached) + { + this.DebugSettings.BindingFailed += DebugSettings_BindingFailed; + } #endif - keyEventHook = new HookProc(KeyEventHook); - registeredKeyPressedHook = SetWindowKeyHook(keyEventHook); + keyEventHook = new HookProc(KeyEventHook); + registeredKeyPressedHook = SetWindowKeyHook(keyEventHook); - EnsureWindow(); - } + EnsureWindow(); + } - private int KeyEventHook(int nCode, IntPtr wParam, IntPtr lParam) + private int KeyEventHook(int nCode, IntPtr wParam, IntPtr lParam) + { + if (nCode >= 0 && IsKeyDownHook(lParam)) { - if (nCode >= 0 && IsKeyDownHook(lParam)) - { - RootFrameNavigationHelper.RaiseKeyPressed((uint)wParam); - } - - return CallNextHookEx(registeredKeyPressedHook, nCode, wParam, lParam); + RootFrameNavigationHelper.RaiseKeyPressed((uint)wParam); } - private void DebugSettings_BindingFailed(object sender, BindingFailedEventArgs e) - { + return CallNextHookEx(registeredKeyPressedHook, nCode, wParam, lParam); + } - } + private void DebugSettings_BindingFailed(object sender, BindingFailedEventArgs e) + { + + } #if WINUI_PRERELEASE - protected override void OnActivated(IActivatedEventArgs args) - { - EnsureWindow(args); - } + protected override void OnActivated(IActivatedEventArgs args) + { + EnsureWindow(args); + } #endif - private async void EnsureWindow(IActivatedEventArgs args = null) - { - // No matter what our destination is, we're going to need control data loaded - let's knock that out now. - // We'll never need to do this again. - await ControlInfoDataSource.Instance.GetGroupsAsync(); - await IconsDataSource.Instance.LoadIcons(); + private async void EnsureWindow(IActivatedEventArgs args = null) + { + // No matter what our destination is, we're going to need control data loaded - let's knock that out now. + // We'll never need to do this again. + await ControlInfoDataSource.Instance.GetGroupsAsync(); + await IconsDataSource.Instance.LoadIcons(); - Frame rootFrame = GetRootFrame(); + Frame rootFrame = GetRootFrame(); - ThemeHelper.Initialize(); + ThemeHelper.Initialize(); - Type targetPageType = typeof(HomePage); - string targetPageArguments = string.Empty; + Type targetPageType = typeof(HomePage); + string targetPageArguments = string.Empty; - if (args != null) + if (args != null) + { + if (args.Kind == ActivationKind.Launch) { - if (args.Kind == ActivationKind.Launch) + if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) { - if (args.PreviousExecutionState == ApplicationExecutionState.Terminated) + try { - try - { - await SuspensionManager.RestoreAsync(); - } - catch (SuspensionManagerException) - { - //Something went wrong restoring state. - //Assume there is no state and continue - } + await SuspensionManager.RestoreAsync(); + } + catch (SuspensionManagerException) + { + //Something went wrong restoring state. + //Assume there is no state and continue } - - targetPageArguments = ((Windows.ApplicationModel.Activation.LaunchActivatedEventArgs)args).Arguments; } - } - var eventargs = Microsoft.Windows.AppLifecycle.AppInstance.GetCurrent().GetActivatedEventArgs(); - if (eventargs != null && eventargs.Kind is ExtendedActivationKind.Protocol && eventargs.Data is ProtocolActivatedEventArgs) - { - ProtocolActivatedEventArgs ProtocolArgs = eventargs.Data as ProtocolActivatedEventArgs; - var uri = ProtocolArgs.Uri.LocalPath.Replace("/", ""); - targetPageArguments = uri; - string targetId = string.Empty; - - if (uri == "AllControls") - { - targetPageType = typeof(AllControlsPage); - } - else if (uri == "NewControls") - { - targetPageType = typeof(HomePage); - } - else if (ControlInfoDataSource.Instance.Groups.Any(g => g.UniqueId == uri)) - { - targetPageType = typeof(SectionPage); - } - else if (ControlInfoDataSource.Instance.Groups.Any(g => g.Items.Any(i => i.UniqueId == uri))) - { - targetPageType = typeof(ItemPage); - } + targetPageArguments = ((Windows.ApplicationModel.Activation.LaunchActivatedEventArgs)args).Arguments; } + } + var eventargs = Microsoft.Windows.AppLifecycle.AppInstance.GetCurrent().GetActivatedEventArgs(); + if (eventargs != null && eventargs.Kind is ExtendedActivationKind.Protocol && eventargs.Data is ProtocolActivatedEventArgs) + { + ProtocolActivatedEventArgs ProtocolArgs = eventargs.Data as ProtocolActivatedEventArgs; + var uri = ProtocolArgs.Uri.LocalPath.Replace("/", ""); - NavigationRootPage rootPage = StartupWindow.Content as NavigationRootPage; - rootPage.Navigate(targetPageType, targetPageArguments); + targetPageArguments = uri; + string targetId = string.Empty; - if (targetPageType == typeof(HomePage)) + if (uri == "AllControls") { - ((Microsoft.UI.Xaml.Controls.NavigationViewItem)((NavigationRootPage)App.StartupWindow.Content).NavigationView.MenuItems[0]).IsSelected = true; + targetPageType = typeof(AllControlsPage); } - - // Ensure the current window is active - StartupWindow.Activate(); - } - - public Frame GetRootFrame() - { - Frame rootFrame; - NavigationRootPage rootPage = StartupWindow.Content as NavigationRootPage; - if (rootPage == null) + else if (uri == "NewControls") { - rootPage = new NavigationRootPage(); - rootFrame = (Frame)rootPage.FindName("rootFrame"); - if (rootFrame == null) - { - throw new Exception("Root frame not found"); - } - SuspensionManager.RegisterFrame(rootFrame, "AppFrame"); - rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; - rootFrame.NavigationFailed += OnNavigationFailed; - - StartupWindow.Content = rootPage; + targetPageType = typeof(HomePage); } - else + else if (ControlInfoDataSource.Instance.Groups.Any(g => g.UniqueId == uri)) { - rootFrame = (Frame)rootPage.FindName("rootFrame"); + targetPageType = typeof(SectionPage); + } + else if (ControlInfoDataSource.Instance.Groups.Any(g => g.Items.Any(i => i.UniqueId == uri))) + { + targetPageType = typeof(ItemPage); } - - return rootFrame; } - /// - /// Invoked when Navigation to a certain page fails - /// - /// The Frame which failed navigation - /// Details about the navigation failure - void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + NavigationRootPage rootPage = StartupWindow.Content as NavigationRootPage; + rootPage.Navigate(targetPageType, targetPageArguments); + + if (targetPageType == typeof(HomePage)) { - throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + ((Microsoft.UI.Xaml.Controls.NavigationViewItem)((NavigationRootPage)App.StartupWindow.Content).NavigationView.MenuItems[0]).IsSelected = true; } - /// - /// Prevents the app from crashing when a exception gets thrown and notifies the user. - /// - /// The app as an object. - /// Details about the exception. - private void HandleExceptions(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) + // Ensure the current window is active + StartupWindow.Activate(); + } + + public Frame GetRootFrame() + { + Frame rootFrame; + NavigationRootPage rootPage = StartupWindow.Content as NavigationRootPage; + if (rootPage == null) + { + rootPage = new NavigationRootPage(); + rootFrame = (Frame)rootPage.FindName("rootFrame"); + if (rootFrame == null) + { + throw new Exception("Root frame not found"); + } + SuspensionManager.RegisterFrame(rootFrame, "AppFrame"); + rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; + rootFrame.NavigationFailed += OnNavigationFailed; + + StartupWindow.Content = rootPage; + } + else { - e.Handled = true; //Don't crash the app. - - //Create the notification. - var notification = new AppNotificationBuilder() - .AddText("An exception was thrown.") - .AddText($"Type: {e.Exception.GetType()}") - .AddText($"Message: {e.Message}\r\n" + - $"HResult: {e.Exception.HResult}") - .BuildNotification(); - - //Show the notification - AppNotificationManager.Default.Show(notification); + rootFrame = (Frame)rootPage.FindName("rootFrame"); } + return rootFrame; + } + + /// + /// Invoked when Navigation to a certain page fails + /// + /// The Frame which failed navigation + /// Details about the navigation failure + void OnNavigationFailed(object sender, NavigationFailedEventArgs e) + { + throw new Exception("Failed to load Page " + e.SourcePageType.FullName); + } + + /// + /// Prevents the app from crashing when a exception gets thrown and notifies the user. + /// + /// The app as an object. + /// Details about the exception. + private void HandleExceptions(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) + { + e.Handled = true; //Don't crash the app. + + //Create the notification. + var notification = new AppNotificationBuilder() + .AddText("An exception was thrown.") + .AddText($"Type: {e.Exception.GetType()}") + .AddText($"Message: {e.Message}\r\n" + + $"HResult: {e.Exception.HResult}") + .BuildNotification(); + + //Show the notification + AppNotificationManager.Default.Show(notification); + } + #if WINUI_PRERELEASE - /// - /// Invoked when application execution is being suspended. Application state is saved - /// without knowing whether the application will be terminated or resumed with the contents - /// of memory still intact. - /// - /// The source of the suspend request. - /// Details about the suspend request. - private async void OnSuspending(object sender, SuspendingEventArgs e) - { - var deferral = e.SuspendingOperation.GetDeferral(); - await SuspensionManager.SaveAsync(); - deferral.Complete(); - } -#endif // WINUI_PRERELEASE + /// + /// Invoked when application execution is being suspended. Application state is saved + /// without knowing whether the application will be terminated or resumed with the contents + /// of memory still intact. + /// + /// The source of the suspend request. + /// Details about the suspend request. + private async void OnSuspending(object sender, SuspendingEventArgs e) + { + var deferral = e.SuspendingOperation.GetDeferral(); + await SuspensionManager.SaveAsync(); + deferral.Complete(); } +#endif // WINUI_PRERELEASE } diff --git a/WinUIGallery/Behaviors/ImageScrollBehavior.cs b/WinUIGallery/Behaviors/ImageScrollBehavior.cs index 437b85d11..fa3c02b71 100644 --- a/WinUIGallery/Behaviors/ImageScrollBehavior.cs +++ b/WinUIGallery/Behaviors/ImageScrollBehavior.cs @@ -7,97 +7,96 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; -namespace WinUIGallery.Behaviors +namespace WinUIGallery.Behaviors; + +public class ImageScrollBehavior : DependencyObject, IBehavior { - public class ImageScrollBehavior : DependencyObject, IBehavior - { - private const int _opacityMaxValue = 250; - private const int _alpha = 255; - private const int _maxFontSize = 28; - private const int _minFontSize = 10; - private const int scrollViewerThresholdValue = 85; + private const int _opacityMaxValue = 250; + private const int _alpha = 255; + private const int _maxFontSize = 28; + private const int _minFontSize = 10; + private const int scrollViewerThresholdValue = 85; - private ScrollViewer scrollViewer; - private ListViewBase listGridView; + private ScrollViewer scrollViewer; + private ListViewBase listGridView; - public DependencyObject AssociatedObject { get; private set; } + public DependencyObject AssociatedObject { get; private set; } - public Control TargetControl + public Control TargetControl + { + get { return (Control)GetValue(TargetControlProperty); } + set { SetValue(TargetControlProperty, value); } + } + + // Using a DependencyProperty as the backing store for TargetControl. This enables animation, styling, binding, etc... + public static readonly DependencyProperty TargetControlProperty = + DependencyProperty.Register("TargetControl", typeof(Control), typeof(ImageScrollBehavior), new PropertyMetadata(null)); + + public void Attach(DependencyObject associatedObject) + { + AssociatedObject = associatedObject; + if (!GetScrollViewer()) { - get { return (Control)GetValue(TargetControlProperty); } - set { SetValue(TargetControlProperty, value); } + ((ListViewBase)associatedObject).Loaded += ListGridView_Loaded; } + } - // Using a DependencyProperty as the backing store for TargetControl. This enables animation, styling, binding, etc... - public static readonly DependencyProperty TargetControlProperty = - DependencyProperty.Register("TargetControl", typeof(Control), typeof(ImageScrollBehavior), new PropertyMetadata(null)); + private void ListGridView_Loaded(object sender, RoutedEventArgs e) + { + GetScrollViewer(); + listGridView = sender as ListViewBase; + } - public void Attach(DependencyObject associatedObject) + private bool GetScrollViewer() + { + scrollViewer = Helper.UIHelper.GetDescendantsOfType(AssociatedObject).FirstOrDefault(); + if (scrollViewer != null) { - AssociatedObject = associatedObject; - if (!GetScrollViewer()) - { - ((ListViewBase)associatedObject).Loaded += ListGridView_Loaded; - } + scrollViewer.ViewChanging += ScrollViewer_ViewChanging; + return true; } + return false; + } - private void ListGridView_Loaded(object sender, RoutedEventArgs e) + private void ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs e) + { + double verticalOffset = ((ScrollViewer)sender).VerticalOffset; + var header = (PageHeader)TargetControl; + header.BackgroundColorOpacity = verticalOffset / _opacityMaxValue; + header.AcrylicOpacity = 0.3 * (1 - (verticalOffset / _opacityMaxValue)); + if (verticalOffset < 10) { - GetScrollViewer(); - listGridView = sender as ListViewBase; + VisualStateManager.GoToState(header, "DefaultForeground", false); + header.BackgroundColorOpacity = 0; + header.FontSize = 28; + header.AcrylicOpacity = 0.3; } - - private bool GetScrollViewer() + else if (verticalOffset > scrollViewerThresholdValue) { - scrollViewer = Helper.UIHelper.GetDescendantsOfType(AssociatedObject).FirstOrDefault(); - if (scrollViewer != null) - { - scrollViewer.ViewChanging += ScrollViewer_ViewChanging; - return true; - } - return false; + VisualStateManager.GoToState(header, "AlternateForeground", false); + header.FontSize = _minFontSize; } - - private void ScrollViewer_ViewChanging(object sender, ScrollViewerViewChangingEventArgs e) + else { - double verticalOffset = ((ScrollViewer)sender).VerticalOffset; - var header = (PageHeader)TargetControl; - header.BackgroundColorOpacity = verticalOffset / _opacityMaxValue; - header.AcrylicOpacity = 0.3 * (1 - (verticalOffset / _opacityMaxValue)); - if (verticalOffset < 10) + if (ThemeHelper.ActualTheme != ElementTheme.Dark) { VisualStateManager.GoToState(header, "DefaultForeground", false); - header.BackgroundColorOpacity = 0; - header.FontSize = 28; - header.AcrylicOpacity = 0.3; + Color foreground = new Color() { A = (byte)((verticalOffset > scrollViewerThresholdValue) ? 0 : (_alpha * (1 - (verticalOffset / scrollViewerThresholdValue)))) }; + foreground.R = foreground.G = foreground.B = 0; + header.Foreground = new SolidColorBrush(foreground); } - else if (verticalOffset > scrollViewerThresholdValue) + else { VisualStateManager.GoToState(header, "AlternateForeground", false); - header.FontSize = _minFontSize; } - else - { - if (ThemeHelper.ActualTheme != ElementTheme.Dark) - { - VisualStateManager.GoToState(header, "DefaultForeground", false); - Color foreground = new Color() { A = (byte)((verticalOffset > scrollViewerThresholdValue) ? 0 : (_alpha * (1 - (verticalOffset / scrollViewerThresholdValue)))) }; - foreground.R = foreground.G = foreground.B = 0; - header.Foreground = new SolidColorBrush(foreground); - } - else - { - VisualStateManager.GoToState(header, "AlternateForeground", false); - } - header.FontSize = -(((verticalOffset / scrollViewerThresholdValue) * (_maxFontSize - _minFontSize)) - _maxFontSize); - } + header.FontSize = -(((verticalOffset / scrollViewerThresholdValue) * (_maxFontSize - _minFontSize)) - _maxFontSize); } + } - public void Detach() - { - ((ListViewBase)AssociatedObject).Loaded -= ListGridView_Loaded; - AssociatedObject = null; - } + public void Detach() + { + ((ListViewBase)AssociatedObject).Loaded -= ListGridView_Loaded; + AssociatedObject = null; } } diff --git a/WinUIGallery/CollectionsInterop.cs b/WinUIGallery/CollectionsInterop.cs index 8e7419e13..e30bfa5c2 100644 --- a/WinUIGallery/CollectionsInterop.cs +++ b/WinUIGallery/CollectionsInterop.cs @@ -11,293 +11,292 @@ using NotifyCollectionChangedAction = Microsoft.UI.Xaml.Interop.NotifyCollectionChangedAction; -namespace WinUIGallery +namespace WinUIGallery; + +// .NET collection types are tightly coupled with WUX types - e.g., ObservableCollection +// maps to WUX.INotifyCollectionChanged, and creates WUX.NotifyCollectionChangedEventArgs +// when raising its INCC event. This is a problem because we've switched everything else over +// to use MUX types, such that creating WUX types raises an RPC_E_WRONG_THREAD error +// due to DXamlCore not being initialized. For the purposes of our tests, we're providing +// our own implementation of ObservableCollection that implements MUX.INotifyCollectionChanged. +public class ObservableCollection : Collection, Microsoft.UI.Xaml.Interop.INotifyCollectionChanged, INotifyPropertyChanged { - // .NET collection types are tightly coupled with WUX types - e.g., ObservableCollection - // maps to WUX.INotifyCollectionChanged, and creates WUX.NotifyCollectionChangedEventArgs - // when raising its INCC event. This is a problem because we've switched everything else over - // to use MUX types, such that creating WUX types raises an RPC_E_WRONG_THREAD error - // due to DXamlCore not being initialized. For the purposes of our tests, we're providing - // our own implementation of ObservableCollection that implements MUX.INotifyCollectionChanged. - public class ObservableCollection : Collection, Microsoft.UI.Xaml.Interop.INotifyCollectionChanged, INotifyPropertyChanged + private ReentrancyGuard reentrancyGuard = null; + + private class ReentrancyGuard : IDisposable { - private ReentrancyGuard reentrancyGuard = null; + private ObservableCollection owningCollection; - private class ReentrancyGuard : IDisposable + public ReentrancyGuard(ObservableCollection owningCollection) { - private ObservableCollection owningCollection; - - public ReentrancyGuard(ObservableCollection owningCollection) - { - owningCollection.CheckReentrancy(); - owningCollection.reentrancyGuard = this; - this.owningCollection = owningCollection; - } - - public void Dispose() - { - owningCollection.reentrancyGuard = null; - } + owningCollection.CheckReentrancy(); + owningCollection.reentrancyGuard = this; + this.owningCollection = owningCollection; } - public ObservableCollection() : base() { } - public ObservableCollection(IList list) : base(list.ToList()) { } - public ObservableCollection(IEnumerable collection) : base(collection.ToList()) { } - - public event Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventHandler CollectionChanged; - - public void Move(int oldIndex, int newIndex) + public void Dispose() { - MoveItem(oldIndex, newIndex); + owningCollection.reentrancyGuard = null; } + } - protected IDisposable BlockReentrancy() - { - return new ReentrancyGuard(this); - } + public ObservableCollection() : base() { } + public ObservableCollection(IList list) : base(list.ToList()) { } + public ObservableCollection(IEnumerable collection) : base(collection.ToList()) { } + + public event Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventHandler CollectionChanged; + + public void Move(int oldIndex, int newIndex) + { + MoveItem(oldIndex, newIndex); + } + + protected IDisposable BlockReentrancy() + { + return new ReentrancyGuard(this); + } - protected void CheckReentrancy() + protected void CheckReentrancy() + { + if (reentrancyGuard != null) { - if (reentrancyGuard != null) - { - throw new InvalidOperationException("Collection cannot be modified in a collection changed handler."); - } + throw new InvalidOperationException("Collection cannot be modified in a collection changed handler."); } + } - protected override void ClearItems() - { - CheckReentrancy(); + protected override void ClearItems() + { + CheckReentrancy(); - TestBindableVector oldItems = new TestBindableVector(this); + TestBindableVector oldItems = new TestBindableVector(this); - base.ClearItems(); - OnCollectionChanged( - NotifyCollectionChangedAction.Reset, - null, oldItems, 0, 0); - } + base.ClearItems(); + OnCollectionChanged( + NotifyCollectionChangedAction.Reset, + null, oldItems, 0, 0); + } - protected override void InsertItem(int index, T item) - { - CheckReentrancy(); + protected override void InsertItem(int index, T item) + { + CheckReentrancy(); - TestBindableVector newItem = new TestBindableVector(); - newItem.Add(item); + TestBindableVector newItem = new TestBindableVector(); + newItem.Add(item); - base.InsertItem(index, item); - OnCollectionChanged( - NotifyCollectionChangedAction.Add, - newItem, null, index, 0); - } + base.InsertItem(index, item); + OnCollectionChanged( + NotifyCollectionChangedAction.Add, + newItem, null, index, 0); + } - protected virtual void MoveItem(int oldIndex, int newIndex) - { - CheckReentrancy(); - - TestBindableVector oldItem = new TestBindableVector(); - oldItem.Add(this[oldIndex]); - TestBindableVector newItem = new TestBindableVector(oldItem); - - T item = this[oldIndex]; - base.RemoveAt(oldIndex); - base.InsertItem(newIndex, item); - OnCollectionChanged( - NotifyCollectionChangedAction.Move, - newItem, oldItem, newIndex, oldIndex); - } + protected virtual void MoveItem(int oldIndex, int newIndex) + { + CheckReentrancy(); + + TestBindableVector oldItem = new TestBindableVector(); + oldItem.Add(this[oldIndex]); + TestBindableVector newItem = new TestBindableVector(oldItem); + + T item = this[oldIndex]; + base.RemoveAt(oldIndex); + base.InsertItem(newIndex, item); + OnCollectionChanged( + NotifyCollectionChangedAction.Move, + newItem, oldItem, newIndex, oldIndex); + } - protected override void RemoveItem(int index) - { - CheckReentrancy(); + protected override void RemoveItem(int index) + { + CheckReentrancy(); - TestBindableVector oldItem = new TestBindableVector(); - oldItem.Add(this[index]); + TestBindableVector oldItem = new TestBindableVector(); + oldItem.Add(this[index]); - base.RemoveItem(index); - OnCollectionChanged( - NotifyCollectionChangedAction.Remove, - null, oldItem, 0, index); - } + base.RemoveItem(index); + OnCollectionChanged( + NotifyCollectionChangedAction.Remove, + null, oldItem, 0, index); + } - protected override void SetItem(int index, T item) - { - CheckReentrancy(); + protected override void SetItem(int index, T item) + { + CheckReentrancy(); - TestBindableVector oldItem = new TestBindableVector(); - oldItem.Add(this[index]); - TestBindableVector newItem = new TestBindableVector(); - newItem.Add(item); + TestBindableVector oldItem = new TestBindableVector(); + oldItem.Add(this[index]); + TestBindableVector newItem = new TestBindableVector(); + newItem.Add(item); - base.SetItem(index, item); - OnCollectionChanged( - NotifyCollectionChangedAction.Replace, - newItem, oldItem, index, index); - } + base.SetItem(index, item); + OnCollectionChanged( + NotifyCollectionChangedAction.Replace, + newItem, oldItem, index, index); + } - protected virtual void OnCollectionChanged( - NotifyCollectionChangedAction action, - IBindableVector newItems, - IBindableVector oldItems, - int newIndex, - int oldIndex) - { - OnCollectionChanged(new Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventArgs(action, newItems, oldItems, newIndex, oldIndex)); - } + protected virtual void OnCollectionChanged( + NotifyCollectionChangedAction action, + IBindableVector newItems, + IBindableVector oldItems, + int newIndex, + int oldIndex) + { + OnCollectionChanged(new Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventArgs(action, newItems, oldItems, newIndex, oldIndex)); + } - protected virtual void OnCollectionChanged(Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventArgs e) + protected virtual void OnCollectionChanged(Microsoft.UI.Xaml.Interop.NotifyCollectionChangedEventArgs e) + { + using (BlockReentrancy()) { - using (BlockReentrancy()) - { - CollectionChanged?.Invoke(this, e); - } + CollectionChanged?.Invoke(this, e); } + } #pragma warning disable 0067 // PropertyChanged is never used, raising a warning, but it's needed to implement INotifyPropertyChanged. - public event PropertyChangedEventHandler PropertyChanged; + public event PropertyChangedEventHandler PropertyChanged; #pragma warning restore 0067 - } - - public class TestBindableVector : IList, IBindableVector - { - IList implementation; - - public TestBindableVector() { implementation = new List(); } - public TestBindableVector(IList list) { implementation = new List(list); } +} - public T this[int index] { get => implementation[index]; set => implementation[index] = value; } +public class TestBindableVector : IList, IBindableVector +{ + IList implementation; - public int Count => implementation.Count; + public TestBindableVector() { implementation = new List(); } + public TestBindableVector(IList list) { implementation = new List(list); } - public virtual bool IsReadOnly => implementation.IsReadOnly; + public T this[int index] { get => implementation[index]; set => implementation[index] = value; } - public void Add(T item) - { - implementation.Add(item); - } + public int Count => implementation.Count; - public void Clear() - { - implementation.Clear(); - } + public virtual bool IsReadOnly => implementation.IsReadOnly; - public bool Contains(T item) - { - return implementation.Contains(item); - } + public void Add(T item) + { + implementation.Add(item); + } - public void CopyTo(T[] array, int arrayIndex) - { - implementation.CopyTo(array, arrayIndex); - } + public void Clear() + { + implementation.Clear(); + } - public IEnumerator GetEnumerator() - { - return implementation.GetEnumerator(); - } + public bool Contains(T item) + { + return implementation.Contains(item); + } - public int IndexOf(T item) - { - return implementation.IndexOf(item); - } + public void CopyTo(T[] array, int arrayIndex) + { + implementation.CopyTo(array, arrayIndex); + } - public void Insert(int index, T item) - { - implementation.Insert(index, item); - } + public IEnumerator GetEnumerator() + { + return implementation.GetEnumerator(); + } - public bool Remove(T item) - { - return implementation.Remove(item); - } + public int IndexOf(T item) + { + return implementation.IndexOf(item); + } - public void RemoveAt(int index) - { - implementation.RemoveAt(index); - } + public void Insert(int index, T item) + { + implementation.Insert(index, item); + } - IEnumerator IEnumerable.GetEnumerator() - { - return implementation.GetEnumerator(); - } + public bool Remove(T item) + { + return implementation.Remove(item); + } - public object GetAt(uint index) - { - return implementation[(int)index]; - } + public void RemoveAt(int index) + { + implementation.RemoveAt(index); + } - public IBindableVectorView GetView() - { - return new TestBindableVectorView(implementation); - } + IEnumerator IEnumerable.GetEnumerator() + { + return implementation.GetEnumerator(); + } - public bool IndexOf(object value, out uint index) - { - int indexOf = implementation.IndexOf((T)value); - - if (indexOf >= 0) - { - index = (uint)indexOf; - return true; - } - else - { - index = 0; - return false; - } - } + public object GetAt(uint index) + { + return implementation[(int)index]; + } - public void SetAt(uint index, object value) - { - implementation[(int)index] = (T)value; - } + public IBindableVectorView GetView() + { + return new TestBindableVectorView(implementation); + } - public void InsertAt(uint index, object value) - { - implementation.Insert((int)index, (T)value); - } + public bool IndexOf(object value, out uint index) + { + int indexOf = implementation.IndexOf((T)value); - public void RemoveAt(uint index) + if (indexOf >= 0) { - implementation.RemoveAt((int)index); + index = (uint)indexOf; + return true; } - - public void Append(object value) + else { - implementation.Add((T)value); + index = 0; + return false; } + } - public void RemoveAtEnd() - { - implementation.RemoveAt(implementation.Count - 1); - } + public void SetAt(uint index, object value) + { + implementation[(int)index] = (T)value; + } - public uint Size => (uint)implementation.Count; + public void InsertAt(uint index, object value) + { + implementation.Insert((int)index, (T)value); + } - public IBindableIterator First() - { - return new TestBindableIterator(implementation); - } + public void RemoveAt(uint index) + { + implementation.RemoveAt((int)index); } - public class TestBindableVectorView : TestBindableVector, IBindableVectorView + public void Append(object value) { - public TestBindableVectorView(IList list) : base(list) { } + implementation.Add((T)value); + } - public override bool IsReadOnly => true; + public void RemoveAtEnd() + { + implementation.RemoveAt(implementation.Count - 1); } - public class TestBindableIterator : IBindableIterator + public uint Size => (uint)implementation.Count; + + public IBindableIterator First() { - private readonly IEnumerator enumerator; + return new TestBindableIterator(implementation); + } +} - public TestBindableIterator(IEnumerable enumerable) { enumerator = enumerable.GetEnumerator(); } +public class TestBindableVectorView : TestBindableVector, IBindableVectorView +{ + public TestBindableVectorView(IList list) : base(list) { } - public bool MoveNext() - { - return enumerator.MoveNext(); - } + public override bool IsReadOnly => true; +} + +public class TestBindableIterator : IBindableIterator +{ + private readonly IEnumerator enumerator; - public object Current => enumerator.Current; + public TestBindableIterator(IEnumerable enumerable) { enumerator = enumerable.GetEnumerator(); } - public bool HasCurrent => enumerator.Current != null; + public bool MoveNext() + { + return enumerator.MoveNext(); } + + public object Current => enumerator.Current; + + public bool HasCurrent => enumerator.Current != null; } diff --git a/WinUIGallery/Common/ActivityFeedLayout.cs b/WinUIGallery/Common/ActivityFeedLayout.cs index a512014d4..cd430010a 100644 --- a/WinUIGallery/Common/ActivityFeedLayout.cs +++ b/WinUIGallery/Common/ActivityFeedLayout.cs @@ -8,263 +8,262 @@ using VirtualizingLayout = Microsoft.UI.Xaml.Controls.VirtualizingLayout; using VirtualizingLayoutContext = Microsoft.UI.Xaml.Controls.VirtualizingLayoutContext; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +class ActivityFeedLayout : VirtualizingLayout { - class ActivityFeedLayout : VirtualizingLayout + #region Layout parameters + + // We'll cache copies of the dependency properties to avoid calling GetValue during layout since that + // can be quite expensive due to the number of times we'd end up calling these. + private double _rowSpacing; + private double _colSpacing; + private Size _minItemSize = Size.Empty; + + /// + /// Gets or sets the size of the whitespace gutter to include between rows + /// + public double RowSpacing + { + get { return _rowSpacing; } + set { SetValue(RowSpacingProperty, value); } + } + + public static readonly DependencyProperty RowSpacingProperty = + DependencyProperty.Register( + "RowSpacing", + typeof(double), + typeof(ActivityFeedLayout), + new PropertyMetadata(0, OnPropertyChanged)); + + /// + /// Gets or sets the size of the whitespace gutter to include between items on the same row + /// + public double ColumnSpacing + { + get { return _colSpacing; } + set { SetValue(ColumnSpacingProperty, value); } + } + + public static readonly DependencyProperty ColumnSpacingProperty = + DependencyProperty.Register( + "ColumnSpacing", + typeof(double), + typeof(ActivityFeedLayout), + new PropertyMetadata(0, OnPropertyChanged)); + + public Size MinItemSize + { + get { return _minItemSize; } + set { SetValue(MinItemSizeProperty, value); } + } + + public static readonly DependencyProperty MinItemSizeProperty = + DependencyProperty.Register( + "MinItemSize", + typeof(Size), + typeof(ActivityFeedLayout), + new PropertyMetadata(Size.Empty, OnPropertyChanged)); + + private static void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { - #region Layout parameters - - // We'll cache copies of the dependency properties to avoid calling GetValue during layout since that - // can be quite expensive due to the number of times we'd end up calling these. - private double _rowSpacing; - private double _colSpacing; - private Size _minItemSize = Size.Empty; - - /// - /// Gets or sets the size of the whitespace gutter to include between rows - /// - public double RowSpacing + var layout = obj as ActivityFeedLayout; + if (args.Property == RowSpacingProperty) { - get { return _rowSpacing; } - set { SetValue(RowSpacingProperty, value); } + layout._rowSpacing = (double)args.NewValue; } - - public static readonly DependencyProperty RowSpacingProperty = - DependencyProperty.Register( - "RowSpacing", - typeof(double), - typeof(ActivityFeedLayout), - new PropertyMetadata(0, OnPropertyChanged)); - - /// - /// Gets or sets the size of the whitespace gutter to include between items on the same row - /// - public double ColumnSpacing + else if (args.Property == ColumnSpacingProperty) { - get { return _colSpacing; } - set { SetValue(ColumnSpacingProperty, value); } + layout._colSpacing = (double)args.NewValue; } - - public static readonly DependencyProperty ColumnSpacingProperty = - DependencyProperty.Register( - "ColumnSpacing", - typeof(double), - typeof(ActivityFeedLayout), - new PropertyMetadata(0, OnPropertyChanged)); - - public Size MinItemSize + else if (args.Property == MinItemSizeProperty) { - get { return _minItemSize; } - set { SetValue(MinItemSizeProperty, value); } + layout._minItemSize = (Size)args.NewValue; } - - public static readonly DependencyProperty MinItemSizeProperty = - DependencyProperty.Register( - "MinItemSize", - typeof(Size), - typeof(ActivityFeedLayout), - new PropertyMetadata(Size.Empty, OnPropertyChanged)); - - private static void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) + else { - var layout = obj as ActivityFeedLayout; - if (args.Property == RowSpacingProperty) - { - layout._rowSpacing = (double)args.NewValue; - } - else if (args.Property == ColumnSpacingProperty) - { - layout._colSpacing = (double)args.NewValue; - } - else if (args.Property == MinItemSizeProperty) - { - layout._minItemSize = (Size)args.NewValue; - } - else - { - throw new InvalidOperationException("Don't know what you are talking about!"); - } - - layout.InvalidateMeasure(); + throw new InvalidOperationException("Don't know what you are talking about!"); } - #endregion + layout.InvalidateMeasure(); + } + + #endregion - #region Setup / teardown + #region Setup / teardown - protected override void InitializeForContextCore(VirtualizingLayoutContext context) + protected override void InitializeForContextCore(VirtualizingLayoutContext context) + { + base.InitializeForContextCore(context); + if (!(context.LayoutState is ActivityFeedLayoutState)) { - base.InitializeForContextCore(context); - if (!(context.LayoutState is ActivityFeedLayoutState)) - { - // Store any state we might need since (in theory) the layout could be in use by multiple - // elements simultaneously - // In reality for the Xbox Activity Feed there's probably only a single instance. - context.LayoutState = new ActivityFeedLayoutState(); - } + // Store any state we might need since (in theory) the layout could be in use by multiple + // elements simultaneously + // In reality for the Xbox Activity Feed there's probably only a single instance. + context.LayoutState = new ActivityFeedLayoutState(); } + } - protected override void UninitializeForContextCore(VirtualizingLayoutContext context) - { - base.UninitializeForContextCore(context); + protected override void UninitializeForContextCore(VirtualizingLayoutContext context) + { + base.UninitializeForContextCore(context); - // clear any state - context.LayoutState = null; - } + // clear any state + context.LayoutState = null; + } - #endregion + #endregion - #region Layout + #region Layout - protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize) + protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize) + { + if (this.MinItemSize == Size.Empty) { - if (this.MinItemSize == Size.Empty) - { - var firstElement = context.GetOrCreateElementAt(0); - firstElement.Measure(new Size(float.PositiveInfinity, float.PositiveInfinity)); + var firstElement = context.GetOrCreateElementAt(0); + firstElement.Measure(new Size(float.PositiveInfinity, float.PositiveInfinity)); - // setting the member value directly to skip invalidating layout - this._minItemSize = firstElement.DesiredSize; - } + // setting the member value directly to skip invalidating layout + this._minItemSize = firstElement.DesiredSize; + } - // Determine which rows need to be realized. We know every row will have the same height and - // only contain 3 items. Use that to determine the index for the first and last item that - // will be within that realization rect. - var firstRowIndex = Math.Max( - (int)(context.RealizationRect.Y / (this.MinItemSize.Height + this.RowSpacing)) - 1, - 0); - var lastRowIndex = Math.Min( - (int)(context.RealizationRect.Bottom / (this.MinItemSize.Height + this.RowSpacing)) + 1, - (int)(context.ItemCount / 3)); - - // Determine which items will appear on those rows and what the rect will be for each item - var state = context.LayoutState as ActivityFeedLayoutState; - state.LayoutRects.Clear(); - - // Save the index of the first realized item. We'll use it as a starting point during arrange. - state.FirstRealizedIndex = firstRowIndex * 3; - - // ideal item width that will expand/shrink to fill available space - double desiredItemWidth = Math.Max(this.MinItemSize.Width, (availableSize.Width - this.ColumnSpacing * 3) / 4); - - // Foreach item between the first and last index, - // Call GetElementOrCreateElementAt which causes an element to either be realized or retrieved - // from a recycle pool - // Measure the element using an appropriate size - // - // Any element that was previously realized which we don't retrieve in this pass (via a call to - // GetElementOrCreateAt) will be automatically cleared and set aside for later re-use. - // Note: While this work fine, it does mean that more elements than are required may be - // created because it isn't until after our MeasureOverride completes that the unused elements - // will be recycled and available to use. We could avoid this by choosing to track the first/last - // index from the previous layout pass. The diff between the previous range and current range - // would represent the elements that we can pre-emptively make available for re-use by calling - // context.RecycleElement(element). - for (int rowIndex = firstRowIndex; rowIndex < lastRowIndex; rowIndex++) - { - int firstItemIndex = rowIndex * 3; - var boundsForCurrentRow = CalculateLayoutBoundsForRow(rowIndex, desiredItemWidth); + // Determine which rows need to be realized. We know every row will have the same height and + // only contain 3 items. Use that to determine the index for the first and last item that + // will be within that realization rect. + var firstRowIndex = Math.Max( + (int)(context.RealizationRect.Y / (this.MinItemSize.Height + this.RowSpacing)) - 1, + 0); + var lastRowIndex = Math.Min( + (int)(context.RealizationRect.Bottom / (this.MinItemSize.Height + this.RowSpacing)) + 1, + (int)(context.ItemCount / 3)); + + // Determine which items will appear on those rows and what the rect will be for each item + var state = context.LayoutState as ActivityFeedLayoutState; + state.LayoutRects.Clear(); + + // Save the index of the first realized item. We'll use it as a starting point during arrange. + state.FirstRealizedIndex = firstRowIndex * 3; + + // ideal item width that will expand/shrink to fill available space + double desiredItemWidth = Math.Max(this.MinItemSize.Width, (availableSize.Width - this.ColumnSpacing * 3) / 4); + + // Foreach item between the first and last index, + // Call GetElementOrCreateElementAt which causes an element to either be realized or retrieved + // from a recycle pool + // Measure the element using an appropriate size + // + // Any element that was previously realized which we don't retrieve in this pass (via a call to + // GetElementOrCreateAt) will be automatically cleared and set aside for later re-use. + // Note: While this work fine, it does mean that more elements than are required may be + // created because it isn't until after our MeasureOverride completes that the unused elements + // will be recycled and available to use. We could avoid this by choosing to track the first/last + // index from the previous layout pass. The diff between the previous range and current range + // would represent the elements that we can pre-emptively make available for re-use by calling + // context.RecycleElement(element). + for (int rowIndex = firstRowIndex; rowIndex < lastRowIndex; rowIndex++) + { + int firstItemIndex = rowIndex * 3; + var boundsForCurrentRow = CalculateLayoutBoundsForRow(rowIndex, desiredItemWidth); - for (int columnIndex = 0; columnIndex < 3; columnIndex++) - { - var index = firstItemIndex + columnIndex; - var container = context.GetOrCreateElementAt(index); + for (int columnIndex = 0; columnIndex < 3; columnIndex++) + { + var index = firstItemIndex + columnIndex; + var container = context.GetOrCreateElementAt(index); - container.Measure( - new Size(boundsForCurrentRow[columnIndex].Width, boundsForCurrentRow[columnIndex].Height)); + container.Measure( + new Size(boundsForCurrentRow[columnIndex].Width, boundsForCurrentRow[columnIndex].Height)); - state.LayoutRects.Add(boundsForCurrentRow[columnIndex]); - } + state.LayoutRects.Add(boundsForCurrentRow[columnIndex]); } - - // Calculate and return the size of all the content (realized or not) by figuring out - // what the bottom/right position of the last item would be. - var extentHeight = ((int)(context.ItemCount / 3) - 1) * (this.MinItemSize.Height + this.RowSpacing) + this.MinItemSize.Height; - - // Report this as the desired size for the layout - return new Size(desiredItemWidth * 4 + this.ColumnSpacing * 2, extentHeight); } - protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) - { - // walk through the cache of containers and arrange - var state = context.LayoutState as ActivityFeedLayoutState; - var virtualContext = context as VirtualizingLayoutContext; - int currentIndex = state.FirstRealizedIndex; + // Calculate and return the size of all the content (realized or not) by figuring out + // what the bottom/right position of the last item would be. + var extentHeight = ((int)(context.ItemCount / 3) - 1) * (this.MinItemSize.Height + this.RowSpacing) + this.MinItemSize.Height; - foreach (var arrangeRect in state.LayoutRects) - { - var container = virtualContext.GetOrCreateElementAt(currentIndex); - container.Arrange(arrangeRect); - currentIndex++; - } + // Report this as the desired size for the layout + return new Size(desiredItemWidth * 4 + this.ColumnSpacing * 2, extentHeight); + } - return finalSize; + protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) + { + // walk through the cache of containers and arrange + var state = context.LayoutState as ActivityFeedLayoutState; + var virtualContext = context as VirtualizingLayoutContext; + int currentIndex = state.FirstRealizedIndex; + + foreach (var arrangeRect in state.LayoutRects) + { + var container = virtualContext.GetOrCreateElementAt(currentIndex); + container.Arrange(arrangeRect); + currentIndex++; } - #endregion - #region Helper methods + return finalSize; + } - private Rect[] CalculateLayoutBoundsForRow(int rowIndex, double desiredItemWidth) - { - var boundsForRow = new Rect[3]; + #endregion + #region Helper methods - var yoffset = rowIndex * (this.MinItemSize.Height + this.RowSpacing); - boundsForRow[0].Y = boundsForRow[1].Y = boundsForRow[2].Y = yoffset; - boundsForRow[0].Height = boundsForRow[1].Height = boundsForRow[2].Height = this.MinItemSize.Height; + private Rect[] CalculateLayoutBoundsForRow(int rowIndex, double desiredItemWidth) + { + var boundsForRow = new Rect[3]; - if (rowIndex % 2 == 0) - { - // Left tile (narrow) - boundsForRow[0].X = 0; - boundsForRow[0].Width = desiredItemWidth; - // Middle tile (narrow) - boundsForRow[1].X = boundsForRow[0].Right + this.ColumnSpacing; - boundsForRow[1].Width = desiredItemWidth; - // Right tile (wide) - boundsForRow[2].X = boundsForRow[1].Right + this.ColumnSpacing; - boundsForRow[2].Width = desiredItemWidth * 2 + this.ColumnSpacing; - } - else - { - // Left tile (wide) - boundsForRow[0].X = 0; - boundsForRow[0].Width = (desiredItemWidth * 2 + this.ColumnSpacing); - // Middle tile (narrow) - boundsForRow[1].X = boundsForRow[0].Right + this.ColumnSpacing; - boundsForRow[1].Width = desiredItemWidth; - // Right tile (narrow) - boundsForRow[2].X = boundsForRow[1].Right + this.ColumnSpacing; - boundsForRow[2].Width = desiredItemWidth; - } + var yoffset = rowIndex * (this.MinItemSize.Height + this.RowSpacing); + boundsForRow[0].Y = boundsForRow[1].Y = boundsForRow[2].Y = yoffset; + boundsForRow[0].Height = boundsForRow[1].Height = boundsForRow[2].Height = this.MinItemSize.Height; - return boundsForRow; + if (rowIndex % 2 == 0) + { + // Left tile (narrow) + boundsForRow[0].X = 0; + boundsForRow[0].Width = desiredItemWidth; + // Middle tile (narrow) + boundsForRow[1].X = boundsForRow[0].Right + this.ColumnSpacing; + boundsForRow[1].Width = desiredItemWidth; + // Right tile (wide) + boundsForRow[2].X = boundsForRow[1].Right + this.ColumnSpacing; + boundsForRow[2].Width = desiredItemWidth * 2 + this.ColumnSpacing; + } + else + { + // Left tile (wide) + boundsForRow[0].X = 0; + boundsForRow[0].Width = (desiredItemWidth * 2 + this.ColumnSpacing); + // Middle tile (narrow) + boundsForRow[1].X = boundsForRow[0].Right + this.ColumnSpacing; + boundsForRow[1].Width = desiredItemWidth; + // Right tile (narrow) + boundsForRow[2].X = boundsForRow[1].Right + this.ColumnSpacing; + boundsForRow[2].Width = desiredItemWidth; } - #endregion + return boundsForRow; } - internal class ActivityFeedLayoutState - { - public int FirstRealizedIndex { get; set; } + #endregion +} + +internal class ActivityFeedLayoutState +{ + public int FirstRealizedIndex { get; set; } - /// - /// List of layout bounds for items starting with the - /// FirstRealizedIndex. - /// - public List LayoutRects + /// + /// List of layout bounds for items starting with the + /// FirstRealizedIndex. + /// + public List LayoutRects + { + get { - get + if (_layoutRects == null) { - if (_layoutRects == null) - { - _layoutRects = new List(); - } - - return _layoutRects; + _layoutRects = new List(); } - } - private List _layoutRects; + return _layoutRects; + } } + + private List _layoutRects; } diff --git a/WinUIGallery/Common/BooleanToInvertedVisibilityConverter.cs b/WinUIGallery/Common/BooleanToInvertedVisibilityConverter.cs index 7ea214c80..a7917cb9c 100644 --- a/WinUIGallery/Common/BooleanToInvertedVisibilityConverter.cs +++ b/WinUIGallery/Common/BooleanToInvertedVisibilityConverter.cs @@ -2,18 +2,17 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Data; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +public sealed class BooleanToInvertedVisibilityConverter: IValueConverter { - public sealed class BooleanToInvertedVisibilityConverter: IValueConverter + public object Convert(object value, Type targetType, object parameter, string language) { - public object Convert(object value, Type targetType, object parameter, string language) - { - return ((bool)value) ? Visibility.Collapsed : Visibility.Visible; - } + return ((bool)value) ? Visibility.Collapsed : Visibility.Visible; + } - public object ConvertBack(object value, Type targetType, object parameter, string language) - { - return (Visibility)value == Visibility.Collapsed; - } + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + return (Visibility)value == Visibility.Collapsed; } } diff --git a/WinUIGallery/Common/BooleanToValueConverter.cs b/WinUIGallery/Common/BooleanToValueConverter.cs index 1cf8cd9eb..3b103e1e6 100644 --- a/WinUIGallery/Common/BooleanToValueConverter.cs +++ b/WinUIGallery/Common/BooleanToValueConverter.cs @@ -1,18 +1,17 @@ -using System; +using System; using Microsoft.UI.Xaml.Data; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +public sealed class BooleanToValueConverter: IValueConverter { - public sealed class BooleanToValueConverter: IValueConverter + public object Convert(object value, Type targetType, object parameter, string language) { - public object Convert(object value, Type targetType, object parameter, string language) - { - return ((bool)value) ? parameter : null; - } + return ((bool)value) ? parameter : null; + } - public object ConvertBack(object value, Type targetType, object parameter, string language) - { - throw new NotImplementedException(); - } + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); } } diff --git a/WinUIGallery/Common/Category.cs b/WinUIGallery/Common/Category.cs index 5f941cef5..71aa483c6 100644 --- a/WinUIGallery/Common/Category.cs +++ b/WinUIGallery/Common/Category.cs @@ -1,22 +1,21 @@ using System; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.Common -{ +namespace WinUIGallery.Common; - public class CategoryBase { } - public class Category : CategoryBase - { - public string Name { get; set; } - public string Tooltip { get; set; } - public Symbol Glyph { get; set; } - } +public class CategoryBase { } - public class Separator : CategoryBase { } +public class Category : CategoryBase +{ + public string Name { get; set; } + public string Tooltip { get; set; } + public Symbol Glyph { get; set; } +} - public class Header : CategoryBase - { - public string Name { get; set; } - } +public class Separator : CategoryBase { } + +public class Header : CategoryBase +{ + public string Name { get; set; } } diff --git a/WinUIGallery/Common/ColorSlideTransitionHelper.cs b/WinUIGallery/Common/ColorSlideTransitionHelper.cs index 9a947e339..0270255d2 100644 --- a/WinUIGallery/Common/ColorSlideTransitionHelper.cs +++ b/WinUIGallery/Common/ColorSlideTransitionHelper.cs @@ -16,160 +16,159 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Hosting; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +/// +/// A helper class encapsulating the function and visuals for a Color Slide transition animation. +/// +public class ColorSlideTransitionHelper { - /// - /// A helper class encapsulating the function and visuals for a Color Slide transition animation. - /// - public class ColorSlideTransitionHelper - { - #region Member variables + #region Member variables - Compositor _compositor; - ContainerVisual _containerForVisuals; - ScalarKeyFrameAnimation _slideAnimation; - bool firstRun = true; + Compositor _compositor; + ContainerVisual _containerForVisuals; + ScalarKeyFrameAnimation _slideAnimation; + bool firstRun = true; - #endregion + #endregion - #region Ctor + #region Ctor - /// - /// Creates an instance of the ColorSlideTransitionHelper. - /// Any visuals to be later created and animated will be hosted within the specified UIElement. - /// - public ColorSlideTransitionHelper(UIElement hostForVisual) - { - // we have an element in the XAML tree that will host our Visuals - var visual = ElementCompositionPreview.GetElementVisual(hostForVisual); - _compositor = visual.Compositor; + /// + /// Creates an instance of the ColorSlideTransitionHelper. + /// Any visuals to be later created and animated will be hosted within the specified UIElement. + /// + public ColorSlideTransitionHelper(UIElement hostForVisual) + { + // we have an element in the XAML tree that will host our Visuals + var visual = ElementCompositionPreview.GetElementVisual(hostForVisual); + _compositor = visual.Compositor; - // create a container - // adding children to this container adds them to the live visual tree - _containerForVisuals = _compositor.CreateContainerVisual(); + // create a container + // adding children to this container adds them to the live visual tree + _containerForVisuals = _compositor.CreateContainerVisual(); - InitializeSlideAnimation(); + InitializeSlideAnimation(); - ElementCompositionPreview.SetElementChildVisual(hostForVisual, _containerForVisuals); - } + ElementCompositionPreview.SetElementChildVisual(hostForVisual, _containerForVisuals); + } - #endregion + #endregion - #region Public API surface + #region Public API surface - public delegate void ColorSlideTransitionCompletedEventHandler(object sender, EventArgs e); + public delegate void ColorSlideTransitionCompletedEventHandler(object sender, EventArgs e); - /// - /// Indicates that the color slide transition has completed. - /// - public event ColorSlideTransitionCompletedEventHandler ColorSlideTransitionCompleted; + /// + /// Indicates that the color slide transition has completed. + /// + public event ColorSlideTransitionCompletedEventHandler ColorSlideTransitionCompleted; - /// - /// Starts the color slide transition using the specified color and boundary sizes. - /// - /// The slide is achieved by creating a rectangular solid colored visual whose scale is progressively - /// animated to fully flood a given area. - /// - /// Using the specified color - /// The transition begins with a visual with these bounds and position - /// The transition ends when the visual has slid to an area of this bounding size - /// - public void Start(Windows.UI.Color color, Rect finalBounds) - { - var colorVisual = CreateVisualWithColorAndPosition(color, finalBounds); + /// + /// Starts the color slide transition using the specified color and boundary sizes. + /// + /// The slide is achieved by creating a rectangular solid colored visual whose scale is progressively + /// animated to fully flood a given area. + /// + /// Using the specified color + /// The transition begins with a visual with these bounds and position + /// The transition ends when the visual has slid to an area of this bounding size + /// + public void Start(Windows.UI.Color color, Rect finalBounds) + { + var colorVisual = CreateVisualWithColorAndPosition(color, finalBounds); - // add our solid colored rectangular visual to the live visual tree via the container - _containerForVisuals.Children.InsertAtTop(colorVisual); + // add our solid colored rectangular visual to the live visual tree via the container + _containerForVisuals.Children.InsertAtTop(colorVisual); - // now that we have a visual, let's run the animation - TriggerSlideAnimation(colorVisual); - } + // now that we have a visual, let's run the animation + TriggerSlideAnimation(colorVisual); + } - #endregion + #endregion - #region All the heavy lifting - /// - /// Creates a Visual using the specific color and constraints - /// - private SpriteVisual CreateVisualWithColorAndPosition(Windows.UI.Color color, - Windows.Foundation.Rect finalBounds) - { + #region All the heavy lifting + /// + /// Creates a Visual using the specific color and constraints + /// + private SpriteVisual CreateVisualWithColorAndPosition(Windows.UI.Color color, + Windows.Foundation.Rect finalBounds) + { - var offset = new Vector3((float)finalBounds.Left, (float)finalBounds.Top, 0f); - var size = new Vector2((float)finalBounds.Width, (float)finalBounds.Height); + var offset = new Vector3((float)finalBounds.Left, (float)finalBounds.Top, 0f); + var size = new Vector2((float)finalBounds.Width, (float)finalBounds.Height); - SpriteVisual coloredRectangle = _compositor.CreateSpriteVisual(); - coloredRectangle.Brush = _compositor.CreateColorBrush(color); - coloredRectangle.Offset = offset; - coloredRectangle.Size = size; + SpriteVisual coloredRectangle = _compositor.CreateSpriteVisual(); + coloredRectangle.Brush = _compositor.CreateColorBrush(color); + coloredRectangle.Offset = offset; + coloredRectangle.Size = size; - return coloredRectangle; + return coloredRectangle; - } + } - /// - /// Creates an animation template for a "color slide" type effect on a rectangular colored visual. - /// This is a sub-second animation on the Scale property of the visual. - /// - private void InitializeSlideAnimation() - { - _slideAnimation = _compositor.CreateScalarKeyFrameAnimation(); - _slideAnimation.InsertKeyFrame(1.0f, 0f); - _slideAnimation.Duration = TimeSpan.FromMilliseconds(800); // keeping this under a sec to not be obtrusive + /// + /// Creates an animation template for a "color slide" type effect on a rectangular colored visual. + /// This is a sub-second animation on the Scale property of the visual. + /// + private void InitializeSlideAnimation() + { + _slideAnimation = _compositor.CreateScalarKeyFrameAnimation(); + _slideAnimation.InsertKeyFrame(1.0f, 0f); + _slideAnimation.Duration = TimeSpan.FromMilliseconds(800); // keeping this under a sec to not be obtrusive - } + } - /// - /// Runs the animation - /// - private void TriggerSlideAnimation(SpriteVisual colorVisual) - { + /// + /// Runs the animation + /// + private void TriggerSlideAnimation(SpriteVisual colorVisual) + { - // animate the Scale of the visual within a scoped batch - // this gives us transactionality and allows us to do work once the transaction completes - var batchTransaction = _compositor.CreateScopedBatch(CompositionBatchTypes.Animation); + // animate the Scale of the visual within a scoped batch + // this gives us transactionality and allows us to do work once the transaction completes + var batchTransaction = _compositor.CreateScopedBatch(CompositionBatchTypes.Animation); - // as with all animations on Visuals, these too will run independent of the UI thread - // so if the UI thread is busy with app code or doing layout on state/page transition, - // this animation still run uninterruped and glitch free. - colorVisual.StartAnimation("Offset.Y", _slideAnimation); + // as with all animations on Visuals, these too will run independent of the UI thread + // so if the UI thread is busy with app code or doing layout on state/page transition, + // this animation still run uninterruped and glitch free. + colorVisual.StartAnimation("Offset.Y", _slideAnimation); - batchTransaction.Completed += SlideAnimationCompleted; + batchTransaction.Completed += SlideAnimationCompleted; - batchTransaction.End(); + batchTransaction.End(); - } + } - /// - /// Cleans up after the slide animation has ended - /// - private void SlideAnimationCompleted(object sender, CompositionBatchCompletedEventArgs args) + /// + /// Cleans up after the slide animation has ended + /// + private void SlideAnimationCompleted(object sender, CompositionBatchCompletedEventArgs args) + { + if (!firstRun) { - if (!firstRun) + foreach (var childVisual in _containerForVisuals.Children) { - foreach (var childVisual in _containerForVisuals.Children) - { - _containerForVisuals.Children.Remove(childVisual); - break; // we only need to remove the first child - } + _containerForVisuals.Children.Remove(childVisual); + break; // we only need to remove the first child } - else - { - firstRun = false; - } - - // notify interested parties - ColorSlideTransitionCompleted(this, EventArgs.Empty); + } + else + { + firstRun = false; } - #endregion - + // notify interested parties + ColorSlideTransitionCompleted(this, EventArgs.Empty); } + + #endregion + } diff --git a/WinUIGallery/Common/DefaultElementAnimator.cs b/WinUIGallery/Common/DefaultElementAnimator.cs index 62ae22976..113f0bf78 100644 --- a/WinUIGallery/Common/DefaultElementAnimator.cs +++ b/WinUIGallery/Common/DefaultElementAnimator.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.UI.Xaml.Controls; @@ -9,121 +9,120 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Hosting; -namespace WinUIGallery.Common -{ +namespace WinUIGallery.Common; + #if WINUI_PRERELEASE - public class DefaultElementAnimator : ElementAnimator +public class DefaultElementAnimator : ElementAnimator +{ + private const double DefaultAnimationDurationInMs = 300.0; + public static double AnimationSlowdownFactor { get; set; } + + static DefaultElementAnimator() { - private const double DefaultAnimationDurationInMs = 300.0; - public static double AnimationSlowdownFactor { get; set; } + AnimationSlowdownFactor = 1.0; + } - static DefaultElementAnimator() - { - AnimationSlowdownFactor = 1.0; - } + protected override bool HasShowAnimationCore(UIElement element, AnimationContext context) + { + return true; + } - protected override bool HasShowAnimationCore(UIElement element, AnimationContext context) - { - return true; - } + protected override bool HasHideAnimationCore(UIElement element, AnimationContext context) + { + return true; + } - protected override bool HasHideAnimationCore(UIElement element, AnimationContext context) - { - return true; - } + protected override bool HasBoundsChangeAnimationCore( + UIElement element, + AnimationContext context, + Rect oldBounds, + Rect newBounds) + { + return true; + } - protected override bool HasBoundsChangeAnimationCore( - UIElement element, - AnimationContext context, - Rect oldBounds, - Rect newBounds) + protected override void StartShowAnimation(UIElement element, AnimationContext context) + { + var visual = ElementCompositionPreview.GetElementVisual(element); + var compositor = visual.Compositor; + + var fadeInAnimation = compositor.CreateScalarKeyFrameAnimation(); + fadeInAnimation.InsertKeyFrame(0.0f, 0.0f); + + if (HasBoundsChangeAnimationsPending && HasHideAnimationsPending) { - return true; + fadeInAnimation.InsertKeyFrame(0.66f, 0.0f); } - - protected override void StartShowAnimation(UIElement element, AnimationContext context) + else if (HasBoundsChangeAnimationsPending || HasHideAnimationsPending) { - var visual = ElementCompositionPreview.GetElementVisual(element); - var compositor = visual.Compositor; - - var fadeInAnimation = compositor.CreateScalarKeyFrameAnimation(); - fadeInAnimation.InsertKeyFrame(0.0f, 0.0f); - - if (HasBoundsChangeAnimationsPending && HasHideAnimationsPending) - { - fadeInAnimation.InsertKeyFrame(0.66f, 0.0f); - } - else if (HasBoundsChangeAnimationsPending || HasHideAnimationsPending) - { - fadeInAnimation.InsertKeyFrame(0.5f, 0.0f); - } - - fadeInAnimation.InsertKeyFrame(1.0f, 1.0f); - fadeInAnimation.Duration = TimeSpan.FromMilliseconds( - DefaultAnimationDurationInMs * ((HasHideAnimationsPending ? 1 : 0) + (HasBoundsChangeAnimationsPending ? 1 : 0) + 1) * AnimationSlowdownFactor); - - var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation); - visual.StartAnimation("Opacity", fadeInAnimation); - batch.End(); - batch.Completed += delegate { OnShowAnimationCompleted(element); }; + fadeInAnimation.InsertKeyFrame(0.5f, 0.0f); } - protected override void StartHideAnimation(UIElement element, AnimationContext context) + fadeInAnimation.InsertKeyFrame(1.0f, 1.0f); + fadeInAnimation.Duration = TimeSpan.FromMilliseconds( + DefaultAnimationDurationInMs * ((HasHideAnimationsPending ? 1 : 0) + (HasBoundsChangeAnimationsPending ? 1 : 0) + 1) * AnimationSlowdownFactor); + + var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation); + visual.StartAnimation("Opacity", fadeInAnimation); + batch.End(); + batch.Completed += delegate { OnShowAnimationCompleted(element); }; + } + + protected override void StartHideAnimation(UIElement element, AnimationContext context) + { + var visual = ElementCompositionPreview.GetElementVisual(element); + var compositor = visual.Compositor; + + var fadeOutAnimation = compositor.CreateScalarKeyFrameAnimation(); + fadeOutAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue"); + fadeOutAnimation.InsertKeyFrame(1.0f, 0.0f); + fadeOutAnimation.Duration = TimeSpan.FromMilliseconds(DefaultAnimationDurationInMs * AnimationSlowdownFactor); + + var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation); + visual.StartAnimation("Opacity", fadeOutAnimation); + batch.End(); + batch.Completed += delegate { - var visual = ElementCompositionPreview.GetElementVisual(element); - var compositor = visual.Compositor; - - var fadeOutAnimation = compositor.CreateScalarKeyFrameAnimation(); - fadeOutAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue"); - fadeOutAnimation.InsertKeyFrame(1.0f, 0.0f); - fadeOutAnimation.Duration = TimeSpan.FromMilliseconds(DefaultAnimationDurationInMs * AnimationSlowdownFactor); - - var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation); - visual.StartAnimation("Opacity", fadeOutAnimation); - batch.End(); - batch.Completed += delegate - { - visual.Opacity = 1.0f; - OnHideAnimationCompleted(element); - }; - } + visual.Opacity = 1.0f; + OnHideAnimationCompleted(element); + }; + } - protected override void StartBoundsChangeAnimation(UIElement element, AnimationContext context, Rect oldBounds, Rect newBounds) + protected override void StartBoundsChangeAnimation(UIElement element, AnimationContext context, Rect oldBounds, Rect newBounds) + { + var visual = ElementCompositionPreview.GetElementVisual(element); + var compositor = visual.Compositor; + var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation); + + // Animate offset. + if (oldBounds.X != newBounds.X || + oldBounds.Y != newBounds.Y) { - var visual = ElementCompositionPreview.GetElementVisual(element); - var compositor = visual.Compositor; - var batch = compositor.CreateScopedBatch(CompositionBatchTypes.Animation); - - // Animate offset. - if (oldBounds.X != newBounds.X || - oldBounds.Y != newBounds.Y) - { - AnimateOffset(element, visual, compositor, oldBounds, newBounds); - } - - batch.End(); - batch.Completed += delegate { OnBoundsChangeAnimationCompleted(element); }; + AnimateOffset(element, visual, compositor, oldBounds, newBounds); } - private void AnimateOffset(UIElement element, Visual visual, Compositor compositor, Rect oldBounds, Rect newBounds) + batch.End(); + batch.Completed += delegate { OnBoundsChangeAnimationCompleted(element); }; + } + + private void AnimateOffset(UIElement element, Visual visual, Compositor compositor, Rect oldBounds, Rect newBounds) + { + var offsetAnimation = compositor.CreateVector2KeyFrameAnimation(); + + offsetAnimation.SetVector2Parameter("delta", new Vector2( + (float)(oldBounds.X - newBounds.X), + (float)(oldBounds.Y - newBounds.Y))); + offsetAnimation.SetVector2Parameter("final", new Vector2()); + offsetAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue + delta"); + if (HasHideAnimationsPending) { - var offsetAnimation = compositor.CreateVector2KeyFrameAnimation(); - - offsetAnimation.SetVector2Parameter("delta", new Vector2( - (float)(oldBounds.X - newBounds.X), - (float)(oldBounds.Y - newBounds.Y))); - offsetAnimation.SetVector2Parameter("final", new Vector2()); - offsetAnimation.InsertExpressionKeyFrame(0.0f, "this.CurrentValue + delta"); - if (HasHideAnimationsPending) - { - offsetAnimation.InsertExpressionKeyFrame(0.5f, "delta"); - } - offsetAnimation.InsertExpressionKeyFrame(1.0f, "final"); - offsetAnimation.Duration = TimeSpan.FromMilliseconds( - DefaultAnimationDurationInMs * ((HasHideAnimationsPending ? 1 : 0) + 1) * AnimationSlowdownFactor); - - visual.StartAnimation("TransformMatrix._41_42", offsetAnimation); + offsetAnimation.InsertExpressionKeyFrame(0.5f, "delta"); } + offsetAnimation.InsertExpressionKeyFrame(1.0f, "final"); + offsetAnimation.Duration = TimeSpan.FromMilliseconds( + DefaultAnimationDurationInMs * ((HasHideAnimationsPending ? 1 : 0) + 1) * AnimationSlowdownFactor); + + visual.StartAnimation("TransformMatrix._41_42", offsetAnimation); } -#endif } +#endif diff --git a/WinUIGallery/Common/DeviceFamilyTrigger.cs b/WinUIGallery/Common/DeviceFamilyTrigger.cs index 969c68d8e..7f7529652 100644 --- a/WinUIGallery/Common/DeviceFamilyTrigger.cs +++ b/WinUIGallery/Common/DeviceFamilyTrigger.cs @@ -1,23 +1,22 @@ using Windows.System.Profile; using Microsoft.UI.Xaml; -namespace WinUIGallery +namespace WinUIGallery; + +// https://learn.microsoft.com/windows/apps/design/devices/designing-for-tv#custom-visual-state-trigger-for-xbox +class DeviceFamilyTrigger : StateTriggerBase { - // https://learn.microsoft.com/windows/apps/design/devices/designing-for-tv#custom-visual-state-trigger-for-xbox - class DeviceFamilyTrigger : StateTriggerBase - { - private string _actualDeviceFamily; - private string _triggerDeviceFamily; + private string _actualDeviceFamily; + private string _triggerDeviceFamily; - public string DeviceFamily + public string DeviceFamily + { + get { return _triggerDeviceFamily; } + set { - get { return _triggerDeviceFamily; } - set - { - _triggerDeviceFamily = value; - _actualDeviceFamily = AnalyticsInfo.VersionInfo.DeviceFamily; - SetActive(_triggerDeviceFamily == _actualDeviceFamily); - } + _triggerDeviceFamily = value; + _actualDeviceFamily = AnalyticsInfo.VersionInfo.DeviceFamily; + SetActive(_triggerDeviceFamily == _actualDeviceFamily); } } } diff --git a/WinUIGallery/Common/DoubleToThicknessConverter.cs b/WinUIGallery/Common/DoubleToThicknessConverter.cs index 1df261a01..284c6868b 100644 --- a/WinUIGallery/Common/DoubleToThicknessConverter.cs +++ b/WinUIGallery/Common/DoubleToThicknessConverter.cs @@ -1,24 +1,23 @@ -using System; +using System; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Data; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +class DoubleToThicknessConverter : IValueConverter { - class DoubleToThicknessConverter : IValueConverter + public object Convert(object value, Type targetType, object parameter, string language) { - public object Convert(object value, Type targetType, object parameter, string language) + if (value is double?) { - if (value is double?) - { - var val = (double)value; - return new Thickness(val); - } - return false; + var val = (double)value; + return new Thickness(val); } + return false; + } - public object ConvertBack(object value, Type targetType, object parameter, string language) - { - throw new NotImplementedException(); - } + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); } } diff --git a/WinUIGallery/Common/EmptyStringToVisibilityConverter.cs b/WinUIGallery/Common/EmptyStringToVisibilityConverter.cs index 3210b5482..d9445ddca 100644 --- a/WinUIGallery/Common/EmptyStringToVisibilityConverter.cs +++ b/WinUIGallery/Common/EmptyStringToVisibilityConverter.cs @@ -2,33 +2,32 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Data; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +public class EmptyStringToVisibilityConverter : IValueConverter { - public class EmptyStringToVisibilityConverter : IValueConverter - { - public Visibility EmptyValue { get; set; } = Visibility.Collapsed; - public Visibility NonEmptyValue { get; set; } = Visibility.Visible; + public Visibility EmptyValue { get; set; } = Visibility.Collapsed; + public Visibility NonEmptyValue { get; set; } = Visibility.Visible; - public object Convert(object value, Type targetType, object parameter, string language) + public object Convert(object value, Type targetType, object parameter, string language) + { + if (value == null) { - if (value == null) - { - return EmptyValue; - } - else if(value is string stringValue && stringValue != "") - { - return NonEmptyValue; - } - else - { - return EmptyValue; - } + return EmptyValue; } - - public object ConvertBack(object value, Type targetType, object parameter, string language) + else if(value is string stringValue && stringValue != "") { - throw new NotImplementedException(); + return NonEmptyValue; } + else + { + return EmptyValue; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); } } diff --git a/WinUIGallery/Common/FileLoader.cs b/WinUIGallery/Common/FileLoader.cs index 8dbb517ef..c33f0c493 100644 --- a/WinUIGallery/Common/FileLoader.cs +++ b/WinUIGallery/Common/FileLoader.cs @@ -7,32 +7,31 @@ using System.IO; using System.Reflection; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +internal class FileLoader { - internal class FileLoader + public static async Task LoadText(string relativeFilePath) { - public static async Task LoadText(string relativeFilePath) + StorageFile file = null; + if (!NativeHelper.IsAppPackaged) { - StorageFile file = null; - if (!NativeHelper.IsAppPackaged) - { - var sourcePath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), relativeFilePath)); - file = await StorageFile.GetFileFromPathAsync(sourcePath); - - } - else - { - Uri sourceUri = new Uri("ms-appx:///" + relativeFilePath); - file = await StorageFile.GetFileFromApplicationUriAsync(sourceUri); + var sourcePath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), relativeFilePath)); + file = await StorageFile.GetFileFromPathAsync(sourcePath); - } - return await FileIO.ReadTextAsync(file); } - - public static async Task> LoadLines(string relativeFilePath) + else { - string fileContents = await LoadText(relativeFilePath); - return fileContents.Split(Environment.NewLine).ToList(); + Uri sourceUri = new Uri("ms-appx:///" + relativeFilePath); + file = await StorageFile.GetFileFromApplicationUriAsync(sourceUri); + } + return await FileIO.ReadTextAsync(file); + } + + public static async Task> LoadLines(string relativeFilePath) + { + string fileContents = await LoadText(relativeFilePath); + return fileContents.Split(Environment.NewLine).ToList(); } } diff --git a/WinUIGallery/Common/LanguageList.cs b/WinUIGallery/Common/LanguageList.cs index 70569a4cc..9f0b647f9 100644 --- a/WinUIGallery/Common/LanguageList.cs +++ b/WinUIGallery/Common/LanguageList.cs @@ -1,124 +1,123 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +class LanguageList { - class LanguageList + private List _languages; + public List Languages { + get { return _languages; } + } + + public LanguageList() { - private List _languages; - public List Languages { - get { return _languages; } + if (_languages == null) + { + _languages = new List(); } - public LanguageList() - { - if (_languages == null) - { - _languages = new List(); - } + _languages.Add(new Language("English", "en")); + _languages.Add(new Language("Arabic", "ar")); + _languages.Add(new Language("Afrikaans", "af")); + _languages.Add(new Language("Albanian", "sq")); + _languages.Add(new Language("Amharic", "am")); + _languages.Add(new Language("Armenian", "hy")); + _languages.Add(new Language("Assamese", "as")); + _languages.Add(new Language("Azerbaijani", "az")); + _languages.Add(new Language("Basque ", "eu")); + _languages.Add(new Language("Belarusian", "be")); + _languages.Add(new Language("Bangla", "bn")); + _languages.Add(new Language("Bosnian", "bs")); + _languages.Add(new Language("Bulgarian", "bg")); + _languages.Add(new Language("Catalan", "ca")); + _languages.Add(new Language("Chinese (Simplified)", "zh")); + _languages.Add(new Language("Croatian", "hr")); + _languages.Add(new Language("Czech", "cs")); + _languages.Add(new Language("Danish", "da")); + _languages.Add(new Language("Dari", "prs")); + _languages.Add(new Language("Dutch", "nl")); + _languages.Add(new Language("Estonian", "et")); + _languages.Add(new Language("Filipino", "fil")); + _languages.Add(new Language("Finnish", "fi")); + _languages.Add(new Language("French ", "fr")); + _languages.Add(new Language("Galician", "gl")); + _languages.Add(new Language("Georgian", "ka")); + _languages.Add(new Language("German", "de")); + _languages.Add(new Language("Greek", "el")); + _languages.Add(new Language("Gujarati", "gu")); + _languages.Add(new Language("Hausa", "ha")); + _languages.Add(new Language("Hebrew", "he")); + _languages.Add(new Language("Hindi", "hi")); + _languages.Add(new Language("Hungarian", "hu")); + _languages.Add(new Language("Icelandic", "is")); + _languages.Add(new Language("Indonesian", "id")); + _languages.Add(new Language("Irish", "ga")); + _languages.Add(new Language("isiXhosa", "xh")); + _languages.Add(new Language("isiZulu", "zu")); + _languages.Add(new Language("Italian", "it")); + _languages.Add(new Language("Japanese ", "ja")); + _languages.Add(new Language("Kannada", "kn")); + _languages.Add(new Language("Kazakh", "kk")); + _languages.Add(new Language("Khmer", "km")); + _languages.Add(new Language("Kinyarwanda", "rw")); + _languages.Add(new Language("KiSwahili", "sw")); + _languages.Add(new Language("Konkani", "kok")); + _languages.Add(new Language("Korean", "ko")); + _languages.Add(new Language("Lao", "lo")); + _languages.Add(new Language("Latvian", "lv")); + _languages.Add(new Language("Lithuanian", "lt")); + _languages.Add(new Language("Luxembourgish", "lb")); + _languages.Add(new Language("Macedonian", "mk")); + _languages.Add(new Language("Malay", "ms")); + _languages.Add(new Language("Malayalam", "ml")); + _languages.Add(new Language("Maltese", "mt")); + _languages.Add(new Language("Maori ", "mi")); + _languages.Add(new Language("Marathi", "mr")); + _languages.Add(new Language("Nepali", "ne")); + _languages.Add(new Language("Norwegian", "nb")); + _languages.Add(new Language("Odia", "or")); + _languages.Add(new Language("Persian", "fa")); + _languages.Add(new Language("Polish", "pl")); + _languages.Add(new Language("Portuguese", "pt")); + _languages.Add(new Language("Punjabi", "pa")); + _languages.Add(new Language("Quechua", "quz")); + _languages.Add(new Language("Romanian", "ro")); + _languages.Add(new Language("Russian", "ru")); + _languages.Add(new Language("Serbian (Latin)", "sr")); + _languages.Add(new Language("Sesotho sa Leboa", "nso")); + _languages.Add(new Language("Setswana", "tn")); + _languages.Add(new Language("Sinhala", "si")); + _languages.Add(new Language("Slovak ", "sk")); + _languages.Add(new Language("Slovenian", "sl")); + _languages.Add(new Language("Spanish", "es")); + _languages.Add(new Language("Swedish", "sv")); + _languages.Add(new Language("Tamil", "ta")); + _languages.Add(new Language("Telugu", "te")); + _languages.Add(new Language("Thai", "th")); + _languages.Add(new Language("Tigrinya", "ti")); + _languages.Add(new Language("Turkish", "tr")); + _languages.Add(new Language("Ukrainian", "uk")); + _languages.Add(new Language("Urdu", "ur")); + _languages.Add(new Language("Uzbek (Latin)", "uz")); + _languages.Add(new Language("Vietnamese", "vi")); + _languages.Add(new Language("Welsh", "cy")); + _languages.Add(new Language("Wolof", "wo")); + + } - _languages.Add(new Language("English", "en")); - _languages.Add(new Language("Arabic", "ar")); - _languages.Add(new Language("Afrikaans", "af")); - _languages.Add(new Language("Albanian", "sq")); - _languages.Add(new Language("Amharic", "am")); - _languages.Add(new Language("Armenian", "hy")); - _languages.Add(new Language("Assamese", "as")); - _languages.Add(new Language("Azerbaijani", "az")); - _languages.Add(new Language("Basque ", "eu")); - _languages.Add(new Language("Belarusian", "be")); - _languages.Add(new Language("Bangla", "bn")); - _languages.Add(new Language("Bosnian", "bs")); - _languages.Add(new Language("Bulgarian", "bg")); - _languages.Add(new Language("Catalan", "ca")); - _languages.Add(new Language("Chinese (Simplified)", "zh")); - _languages.Add(new Language("Croatian", "hr")); - _languages.Add(new Language("Czech", "cs")); - _languages.Add(new Language("Danish", "da")); - _languages.Add(new Language("Dari", "prs")); - _languages.Add(new Language("Dutch", "nl")); - _languages.Add(new Language("Estonian", "et")); - _languages.Add(new Language("Filipino", "fil")); - _languages.Add(new Language("Finnish", "fi")); - _languages.Add(new Language("French ", "fr")); - _languages.Add(new Language("Galician", "gl")); - _languages.Add(new Language("Georgian", "ka")); - _languages.Add(new Language("German", "de")); - _languages.Add(new Language("Greek", "el")); - _languages.Add(new Language("Gujarati", "gu")); - _languages.Add(new Language("Hausa", "ha")); - _languages.Add(new Language("Hebrew", "he")); - _languages.Add(new Language("Hindi", "hi")); - _languages.Add(new Language("Hungarian", "hu")); - _languages.Add(new Language("Icelandic", "is")); - _languages.Add(new Language("Indonesian", "id")); - _languages.Add(new Language("Irish", "ga")); - _languages.Add(new Language("isiXhosa", "xh")); - _languages.Add(new Language("isiZulu", "zu")); - _languages.Add(new Language("Italian", "it")); - _languages.Add(new Language("Japanese ", "ja")); - _languages.Add(new Language("Kannada", "kn")); - _languages.Add(new Language("Kazakh", "kk")); - _languages.Add(new Language("Khmer", "km")); - _languages.Add(new Language("Kinyarwanda", "rw")); - _languages.Add(new Language("KiSwahili", "sw")); - _languages.Add(new Language("Konkani", "kok")); - _languages.Add(new Language("Korean", "ko")); - _languages.Add(new Language("Lao", "lo")); - _languages.Add(new Language("Latvian", "lv")); - _languages.Add(new Language("Lithuanian", "lt")); - _languages.Add(new Language("Luxembourgish", "lb")); - _languages.Add(new Language("Macedonian", "mk")); - _languages.Add(new Language("Malay", "ms")); - _languages.Add(new Language("Malayalam", "ml")); - _languages.Add(new Language("Maltese", "mt")); - _languages.Add(new Language("Maori ", "mi")); - _languages.Add(new Language("Marathi", "mr")); - _languages.Add(new Language("Nepali", "ne")); - _languages.Add(new Language("Norwegian", "nb")); - _languages.Add(new Language("Odia", "or")); - _languages.Add(new Language("Persian", "fa")); - _languages.Add(new Language("Polish", "pl")); - _languages.Add(new Language("Portuguese", "pt")); - _languages.Add(new Language("Punjabi", "pa")); - _languages.Add(new Language("Quechua", "quz")); - _languages.Add(new Language("Romanian", "ro")); - _languages.Add(new Language("Russian", "ru")); - _languages.Add(new Language("Serbian (Latin)", "sr")); - _languages.Add(new Language("Sesotho sa Leboa", "nso")); - _languages.Add(new Language("Setswana", "tn")); - _languages.Add(new Language("Sinhala", "si")); - _languages.Add(new Language("Slovak ", "sk")); - _languages.Add(new Language("Slovenian", "sl")); - _languages.Add(new Language("Spanish", "es")); - _languages.Add(new Language("Swedish", "sv")); - _languages.Add(new Language("Tamil", "ta")); - _languages.Add(new Language("Telugu", "te")); - _languages.Add(new Language("Thai", "th")); - _languages.Add(new Language("Tigrinya", "ti")); - _languages.Add(new Language("Turkish", "tr")); - _languages.Add(new Language("Ukrainian", "uk")); - _languages.Add(new Language("Urdu", "ur")); - _languages.Add(new Language("Uzbek (Latin)", "uz")); - _languages.Add(new Language("Vietnamese", "vi")); - _languages.Add(new Language("Welsh", "cy")); - _languages.Add(new Language("Wolof", "wo")); - - } + public class Language + { + public string Name { get; set; } + public string Code { get; set; } - public class Language + public Language (string name, string code) { - public string Name { get; set; } - public string Code { get; set; } - - public Language (string name, string code) - { - this.Name = name; - this.Code = code; - } + this.Name = name; + this.Code = code; } } } diff --git a/WinUIGallery/Common/MenuItemTemplateSelector.cs b/WinUIGallery/Common/MenuItemTemplateSelector.cs index ef80ff773..b52b2ab9e 100644 --- a/WinUIGallery/Common/MenuItemTemplateSelector.cs +++ b/WinUIGallery/Common/MenuItemTemplateSelector.cs @@ -3,32 +3,31 @@ using Microsoft.UI.Xaml.Markup; using System; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + + +[ContentProperty(Name = "ItemTemplate")] +class MenuItemTemplateSelector : DataTemplateSelector { + public DataTemplate ItemTemplate { get; set; } - [ContentProperty(Name = "ItemTemplate")] - class MenuItemTemplateSelector : DataTemplateSelector + protected override DataTemplate SelectTemplateCore(object item) { - public DataTemplate ItemTemplate { get; set; } - - protected override DataTemplate SelectTemplateCore(object item) - { - return item is Separator ? SeparatorTemplate : item is Header ? HeaderTemplate : ItemTemplate; - } + return item is Separator ? SeparatorTemplate : item is Header ? HeaderTemplate : ItemTemplate; + } - protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) - { - return item is Separator ? SeparatorTemplate : item is Header ? HeaderTemplate : ItemTemplate; - } + protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) + { + return item is Separator ? SeparatorTemplate : item is Header ? HeaderTemplate : ItemTemplate; + } - internal DataTemplate HeaderTemplate = (DataTemplate)XamlReader.Load( - @" + internal DataTemplate HeaderTemplate = (DataTemplate)XamlReader.Load( + @" "); - internal DataTemplate SeparatorTemplate = (DataTemplate)XamlReader.Load( - @" + internal DataTemplate SeparatorTemplate = (DataTemplate)XamlReader.Load( + @" "); - } } diff --git a/WinUIGallery/Common/NullToVisibilityConverter.cs b/WinUIGallery/Common/NullToVisibilityConverter.cs index a3725ff15..6ac7991d9 100644 --- a/WinUIGallery/Common/NullToVisibilityConverter.cs +++ b/WinUIGallery/Common/NullToVisibilityConverter.cs @@ -1,23 +1,22 @@ -using System; +using System; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Data; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +public class NullToVisibilityConverter : IValueConverter { - public class NullToVisibilityConverter : IValueConverter - { - public Visibility NullValue { get; set; } = Visibility.Collapsed; - public Visibility NonNullValue { get; set; } = Visibility.Visible; + public Visibility NullValue { get; set; } = Visibility.Collapsed; + public Visibility NonNullValue { get; set; } = Visibility.Visible; - public object Convert(object value, Type targetType, object parameter, string language) - { - return (value == null) ? NullValue : NonNullValue; - } + public object Convert(object value, Type targetType, object parameter, string language) + { + return (value == null) ? NullValue : NonNullValue; + } - public object ConvertBack(object value, Type targetType, object parameter, string language) - { - throw new NotImplementedException(); - } + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); } } diff --git a/WinUIGallery/Common/NullableBooleanToBooleanConverter.cs b/WinUIGallery/Common/NullableBooleanToBooleanConverter.cs index 3edd29b7f..b9117c45b 100644 --- a/WinUIGallery/Common/NullableBooleanToBooleanConverter.cs +++ b/WinUIGallery/Common/NullableBooleanToBooleanConverter.cs @@ -1,28 +1,27 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.UI.Xaml.Data; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +public class NullableBooleanToBooleanConverter : IValueConverter { - public class NullableBooleanToBooleanConverter : IValueConverter + public object Convert(object value, Type targetType, object parameter, string language) { - public object Convert(object value, Type targetType, object parameter, string language) + if(value is bool?) { - if(value is bool?) - { - return (bool)value; - } - return false; + return (bool)value; } + return false; + } - public object ConvertBack(object value, Type targetType, object parameter, string language) - { - if (value is bool) - return (bool)value; - return false; - } + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + if (value is bool) + return (bool)value; + return false; } } diff --git a/WinUIGallery/Common/ObservableDictionary.cs b/WinUIGallery/Common/ObservableDictionary.cs index b062fdc2c..71033e35e 100644 --- a/WinUIGallery/Common/ObservableDictionary.cs +++ b/WinUIGallery/Common/ObservableDictionary.cs @@ -3,142 +3,141 @@ using System.Linq; using Windows.Foundation.Collections; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +/// +/// Implementation of IObservableMap that supports reentrancy for use as a default view +/// model. +/// +public class ObservableDictionary : IObservableMap { - /// - /// Implementation of IObservableMap that supports reentrancy for use as a default view - /// model. - /// - public class ObservableDictionary : IObservableMap + private class ObservableDictionaryChangedEventArgs : IMapChangedEventArgs { - private class ObservableDictionaryChangedEventArgs : IMapChangedEventArgs + public ObservableDictionaryChangedEventArgs(CollectionChange change, string key) { - public ObservableDictionaryChangedEventArgs(CollectionChange change, string key) - { - this.CollectionChange = change; - this.Key = key; - } - - public CollectionChange CollectionChange { get; private set; } - public string Key { get; private set; } + this.CollectionChange = change; + this.Key = key; } - private Dictionary _dictionary = new Dictionary(); - public event MapChangedEventHandler MapChanged; + public CollectionChange CollectionChange { get; private set; } + public string Key { get; private set; } + } - private void InvokeMapChanged(CollectionChange change, string key) - { - MapChanged?.Invoke(this, new ObservableDictionaryChangedEventArgs(change, key)); - } + private Dictionary _dictionary = new Dictionary(); + public event MapChangedEventHandler MapChanged; - public void Add(string key, object value) - { - this._dictionary.Add(key, value); - this.InvokeMapChanged(CollectionChange.ItemInserted, key); - } + private void InvokeMapChanged(CollectionChange change, string key) + { + MapChanged?.Invoke(this, new ObservableDictionaryChangedEventArgs(change, key)); + } - public void Add(KeyValuePair item) - { - this.Add(item.Key, item.Value); - } + public void Add(string key, object value) + { + this._dictionary.Add(key, value); + this.InvokeMapChanged(CollectionChange.ItemInserted, key); + } - public bool Remove(string key) - { - if (this._dictionary.Remove(key)) - { - this.InvokeMapChanged(CollectionChange.ItemRemoved, key); - return true; - } - return false; - } + public void Add(KeyValuePair item) + { + this.Add(item.Key, item.Value); + } - public bool Remove(KeyValuePair item) + public bool Remove(string key) + { + if (this._dictionary.Remove(key)) { - if (this._dictionary.TryGetValue(item.Key, out object currentValue) && - Object.Equals(item.Value, currentValue) && this._dictionary.Remove(item.Key)) - { - this.InvokeMapChanged(CollectionChange.ItemRemoved, item.Key); - return true; - } - return false; + this.InvokeMapChanged(CollectionChange.ItemRemoved, key); + return true; } + return false; + } - public object this[string key] + public bool Remove(KeyValuePair item) + { + if (this._dictionary.TryGetValue(item.Key, out object currentValue) && + Object.Equals(item.Value, currentValue) && this._dictionary.Remove(item.Key)) { - get - { - return this._dictionary[key]; - } - set - { - this._dictionary[key] = value; - this.InvokeMapChanged(CollectionChange.ItemChanged, key); - } + this.InvokeMapChanged(CollectionChange.ItemRemoved, item.Key); + return true; } + return false; + } - public void Clear() + public object this[string key] + { + get { - var priorKeys = this._dictionary.Keys.ToArray(); - this._dictionary.Clear(); - foreach (var key in priorKeys) - { - this.InvokeMapChanged(CollectionChange.ItemRemoved, key); - } + return this._dictionary[key]; } - - public ICollection Keys + set { - get { return this._dictionary.Keys; } + this._dictionary[key] = value; + this.InvokeMapChanged(CollectionChange.ItemChanged, key); } + } - public bool ContainsKey(string key) + public void Clear() + { + var priorKeys = this._dictionary.Keys.ToArray(); + this._dictionary.Clear(); + foreach (var key in priorKeys) { - return this._dictionary.ContainsKey(key); + this.InvokeMapChanged(CollectionChange.ItemRemoved, key); } + } - public bool TryGetValue(string key, out object value) - { - return this._dictionary.TryGetValue(key, out value); - } + public ICollection Keys + { + get { return this._dictionary.Keys; } + } - public ICollection Values - { - get { return this._dictionary.Values; } - } + public bool ContainsKey(string key) + { + return this._dictionary.ContainsKey(key); + } - public bool Contains(KeyValuePair item) - { - return this._dictionary.Contains(item); - } + public bool TryGetValue(string key, out object value) + { + return this._dictionary.TryGetValue(key, out value); + } - public int Count - { - get { return this._dictionary.Count; } - } + public ICollection Values + { + get { return this._dictionary.Values; } + } - public bool IsReadOnly - { - get { return false; } - } + public bool Contains(KeyValuePair item) + { + return this._dictionary.Contains(item); + } - public IEnumerator> GetEnumerator() - { - return this._dictionary.GetEnumerator(); - } + public int Count + { + get { return this._dictionary.Count; } + } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this._dictionary.GetEnumerator(); - } + public bool IsReadOnly + { + get { return false; } + } - public void CopyTo(KeyValuePair[] array, int arrayIndex) + public IEnumerator> GetEnumerator() + { + return this._dictionary.GetEnumerator(); + } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return this._dictionary.GetEnumerator(); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + int arraySize = array.Length; + foreach (var pair in this._dictionary) { - int arraySize = array.Length; - foreach (var pair in this._dictionary) - { - if (arrayIndex >= arraySize) break; - array[arrayIndex++] = pair; - } + if (arrayIndex >= arraySize) break; + array[arrayIndex++] = pair; } } } diff --git a/WinUIGallery/Common/OrientedSize.cs b/WinUIGallery/Common/OrientedSize.cs index ef385cdfc..f048629a8 100644 --- a/WinUIGallery/Common/OrientedSize.cs +++ b/WinUIGallery/Common/OrientedSize.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; @@ -6,138 +6,137 @@ using System.Threading.Tasks; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery +namespace WinUIGallery; + +/// +/// The OrientedSize structure is used to abstract the growth direction from +/// the layout algorithms of WrapPanel. When the growth direction is +/// oriented horizontally (ex: the next element is arranged on the side of +/// the previous element), then the Width grows directly with the placement +/// of elements and Height grows indirectly with the size of the largest +/// element in the row. When the orientation is reversed, so is the +/// directional growth with respect to Width and Height. +/// +/// Mature +[StructLayout(LayoutKind.Sequential)] +internal struct OrientedSize { /// - /// The OrientedSize structure is used to abstract the growth direction from - /// the layout algorithms of WrapPanel. When the growth direction is - /// oriented horizontally (ex: the next element is arranged on the side of - /// the previous element), then the Width grows directly with the placement - /// of elements and Height grows indirectly with the size of the largest - /// element in the row. When the orientation is reversed, so is the - /// directional growth with respect to Width and Height. + /// The orientation of the structure. + /// + private Orientation _orientation; + + /// + /// Gets the orientation of the structure. /// - /// Mature - [StructLayout(LayoutKind.Sequential)] - internal struct OrientedSize + public Orientation Orientation { - /// - /// The orientation of the structure. - /// - private Orientation _orientation; + get { return _orientation; } + } - /// - /// Gets the orientation of the structure. - /// - public Orientation Orientation - { - get { return _orientation; } - } + /// + /// The size dimension that grows directly with layout placement. + /// + private double _direct; - /// - /// The size dimension that grows directly with layout placement. - /// - private double _direct; + /// + /// Gets or sets the size dimension that grows directly with layout + /// placement. + /// + public double Direct + { + get { return _direct; } + set { _direct = value; } + } - /// - /// Gets or sets the size dimension that grows directly with layout - /// placement. - /// - public double Direct - { - get { return _direct; } - set { _direct = value; } - } + /// + /// The size dimension that grows indirectly with the maximum value of + /// the layout row or column. + /// + private double _indirect; - /// - /// The size dimension that grows indirectly with the maximum value of - /// the layout row or column. - /// - private double _indirect; + /// + /// Gets or sets the size dimension that grows indirectly with the + /// maximum value of the layout row or column. + /// + public double Indirect + { + get { return _indirect; } + set { _indirect = value; } + } - /// - /// Gets or sets the size dimension that grows indirectly with the - /// maximum value of the layout row or column. - /// - public double Indirect + /// + /// Gets or sets the width of the size. + /// + public double Width + { + get { - get { return _indirect; } - set { _indirect = value; } + return (Orientation == Orientation.Horizontal) ? + Direct : + Indirect; } - - /// - /// Gets or sets the width of the size. - /// - public double Width + set { - get + if (Orientation == Orientation.Horizontal) { - return (Orientation == Orientation.Horizontal) ? - Direct : - Indirect; + Direct = value; } - set + else { - if (Orientation == Orientation.Horizontal) - { - Direct = value; - } - else - { - Indirect = value; - } + Indirect = value; } } + } - /// - /// Gets or sets the height of the size. - /// - public double Height + /// + /// Gets or sets the height of the size. + /// + public double Height + { + get + { + return (Orientation != Orientation.Horizontal) ? + Direct : + Indirect; + } + set { - get + if (Orientation != Orientation.Horizontal) { - return (Orientation != Orientation.Horizontal) ? - Direct : - Indirect; + Direct = value; } - set + else { - if (Orientation != Orientation.Horizontal) - { - Direct = value; - } - else - { - Indirect = value; - } + Indirect = value; } } + } - /// - /// Initializes a new OrientedSize structure. - /// - /// Orientation of the structure. - public OrientedSize(Orientation orientation) : - this(orientation, 0.0, 0.0) - { - } + /// + /// Initializes a new OrientedSize structure. + /// + /// Orientation of the structure. + public OrientedSize(Orientation orientation) : + this(orientation, 0.0, 0.0) + { + } - /// - /// Initializes a new OrientedSize structure. - /// - /// Orientation of the structure. - /// Un-oriented width of the structure. - /// Un-oriented height of the structure. - public OrientedSize(Orientation orientation, double width, double height) - { - _orientation = orientation; + /// + /// Initializes a new OrientedSize structure. + /// + /// Orientation of the structure. + /// Un-oriented width of the structure. + /// Un-oriented height of the structure. + public OrientedSize(Orientation orientation, double width, double height) + { + _orientation = orientation; - // All fields must be initialized before we access the this pointer - _direct = 0.0; - _indirect = 0.0; + // All fields must be initialized before we access the this pointer + _direct = 0.0; + _indirect = 0.0; - Width = width; - Height = height; - } + Width = width; + Height = height; } } diff --git a/WinUIGallery/Common/RelayCommand.cs b/WinUIGallery/Common/RelayCommand.cs index b97f72d5e..0df2900a3 100644 --- a/WinUIGallery/Common/RelayCommand.cs +++ b/WinUIGallery/Common/RelayCommand.cs @@ -5,76 +5,75 @@ using System.Threading.Tasks; using System.Windows.Input; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +/// +/// A command whose sole purpose is to relay its functionality +/// to other objects by invoking delegates. +/// The default return value for the CanExecute method is 'true'. +/// needs to be called whenever +/// is expected to return a different value. +/// +public class RelayCommand : ICommand { + private readonly Action _execute; + private readonly Func _canExecute; + /// - /// A command whose sole purpose is to relay its functionality - /// to other objects by invoking delegates. - /// The default return value for the CanExecute method is 'true'. - /// needs to be called whenever - /// is expected to return a different value. + /// Raised when RaiseCanExecuteChanged is called. /// - public class RelayCommand : ICommand - { - private readonly Action _execute; - private readonly Func _canExecute; + public event EventHandler CanExecuteChanged; - /// - /// Raised when RaiseCanExecuteChanged is called. - /// - public event EventHandler CanExecuteChanged; - - /// - /// Creates a new command that can always execute. - /// - /// The execution logic. - public RelayCommand(Action execute) - : this(execute, null) - { - } + /// + /// Creates a new command that can always execute. + /// + /// The execution logic. + public RelayCommand(Action execute) + : this(execute, null) + { + } - /// - /// Creates a new command. - /// - /// The execution logic. - /// The execution status logic. - public RelayCommand(Action execute, Func canExecute) - { - _execute = execute ?? throw new ArgumentNullException("execute"); - _canExecute = canExecute; - } + /// + /// Creates a new command. + /// + /// The execution logic. + /// The execution status logic. + public RelayCommand(Action execute, Func canExecute) + { + _execute = execute ?? throw new ArgumentNullException("execute"); + _canExecute = canExecute; + } - /// - /// Determines whether this can execute in its current state. - /// - /// - /// Data used by the command. If the command does not require data to be passed, this object can be set to null. - /// - /// true if this command can be executed; otherwise, false. - public bool CanExecute(object parameter) - { - return _canExecute == null ? true : _canExecute(); - } + /// + /// Determines whether this can execute in its current state. + /// + /// + /// Data used by the command. If the command does not require data to be passed, this object can be set to null. + /// + /// true if this command can be executed; otherwise, false. + public bool CanExecute(object parameter) + { + return _canExecute == null ? true : _canExecute(); + } - /// - /// Executes the on the current command target. - /// - /// - /// Data used by the command. If the command does not require data to be passed, this object can be set to null. - /// - public void Execute(object parameter) - { - _execute(); - } + /// + /// Executes the on the current command target. + /// + /// + /// Data used by the command. If the command does not require data to be passed, this object can be set to null. + /// + public void Execute(object parameter) + { + _execute(); + } - /// - /// Method used to raise the event - /// to indicate that the return value of the - /// method has changed. - /// - public void RaiseCanExecuteChanged() - { - CanExecuteChanged?.Invoke(this, EventArgs.Empty); - } + /// + /// Method used to raise the event + /// to indicate that the return value of the + /// method has changed. + /// + public void RaiseCanExecuteChanged() + { + CanExecuteChanged?.Invoke(this, EventArgs.Empty); } } diff --git a/WinUIGallery/Common/SuspensionManager.cs b/WinUIGallery/Common/SuspensionManager.cs index 74057b0f1..615cd4933 100644 --- a/WinUIGallery/Common/SuspensionManager.cs +++ b/WinUIGallery/Common/SuspensionManager.cs @@ -10,251 +10,250 @@ using Microsoft.UI.Xaml.Controls; using WinUIGallery.Helper; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +/// +/// SuspensionManager captures global session state to simplify process lifetime management +/// for an application. Note that session state will be automatically cleared under a variety +/// of conditions and should only be used to store information that would be convenient to +/// carry across sessions, but that should be discarded when an application crashes or is +/// upgraded. +/// +internal sealed class SuspensionManager { + private static Dictionary _sessionState = new Dictionary(); + private static List _knownTypes = new List(); + private const string sessionStateFilename = "_sessionState.xml"; + /// - /// SuspensionManager captures global session state to simplify process lifetime management - /// for an application. Note that session state will be automatically cleared under a variety - /// of conditions and should only be used to store information that would be convenient to - /// carry across sessions, but that should be discarded when an application crashes or is - /// upgraded. + /// Provides access to global session state for the current session. This state is + /// serialized by and restored by + /// , so values must be serializable by + /// and should be as compact as possible. Strings + /// and other self-contained data types are strongly recommended. /// - internal sealed class SuspensionManager + public static Dictionary SessionState { - private static Dictionary _sessionState = new Dictionary(); - private static List _knownTypes = new List(); - private const string sessionStateFilename = "_sessionState.xml"; - - /// - /// Provides access to global session state for the current session. This state is - /// serialized by and restored by - /// , so values must be serializable by - /// and should be as compact as possible. Strings - /// and other self-contained data types are strongly recommended. - /// - public static Dictionary SessionState - { - get { return _sessionState; } - } + get { return _sessionState; } + } - /// - /// List of custom types provided to the when - /// reading and writing session state. Initially empty, additional types may be - /// added to customize the serialization process. - /// - public static List KnownTypes - { - get { return _knownTypes; } - } + /// + /// List of custom types provided to the when + /// reading and writing session state. Initially empty, additional types may be + /// added to customize the serialization process. + /// + public static List KnownTypes + { + get { return _knownTypes; } + } - /// - /// Save the current . Any instances - /// registered with will also preserve their current - /// navigation stack, which in turn gives their active an opportunity - /// to save its state. - /// - /// An asynchronous task that reflects when session state has been saved. - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", - Justification = "From manual inspection, _sessionState only serializes Dictionaries of strings")] - public static async Task SaveAsync() + /// + /// Save the current . Any instances + /// registered with will also preserve their current + /// navigation stack, which in turn gives their active an opportunity + /// to save its state. + /// + /// An asynchronous task that reflects when session state has been saved. + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", + Justification = "From manual inspection, _sessionState only serializes Dictionaries of strings")] + public static async Task SaveAsync() + { + try { - try + // Save the navigation state for all registered frames + foreach (var weakFrameReference in _registeredFrames) { - // Save the navigation state for all registered frames - foreach (var weakFrameReference in _registeredFrames) + if (weakFrameReference.TryGetTarget(out Frame frame)) { - if (weakFrameReference.TryGetTarget(out Frame frame)) - { - SaveFrameNavigationState(frame); - } + SaveFrameNavigationState(frame); } + } - // Serialize the session state synchronously to avoid asynchronous access to shared - // state - MemoryStream sessionData = new MemoryStream(); - DataContractSerializer serializer = new DataContractSerializer(typeof(Dictionary), _knownTypes); - serializer.WriteObject(sessionData, _sessionState); + // Serialize the session state synchronously to avoid asynchronous access to shared + // state + MemoryStream sessionData = new MemoryStream(); + DataContractSerializer serializer = new DataContractSerializer(typeof(Dictionary), _knownTypes); + serializer.WriteObject(sessionData, _sessionState); - // Get an output stream for the SessionState file and write the state asynchronously - StorageFolder localFolder = WindowHelper.GetAppLocalFolder(); - StorageFile file = await localFolder.CreateFileAsync(sessionStateFilename, CreationCollisionOption.ReplaceExisting); - using (Stream fileStream = await file.OpenStreamForWriteAsync()) - { - sessionData.Seek(0, SeekOrigin.Begin); - await sessionData.CopyToAsync(fileStream); - } - } - catch (Exception e) + // Get an output stream for the SessionState file and write the state asynchronously + StorageFolder localFolder = WindowHelper.GetAppLocalFolder(); + StorageFile file = await localFolder.CreateFileAsync(sessionStateFilename, CreationCollisionOption.ReplaceExisting); + using (Stream fileStream = await file.OpenStreamForWriteAsync()) { - throw new SuspensionManagerException(e); + sessionData.Seek(0, SeekOrigin.Begin); + await sessionData.CopyToAsync(fileStream); } } - - /// - /// Restores previously saved . Any instances - /// registered with will also restore their prior navigation - /// state, which in turn gives their active an opportunity restore its - /// state. - /// - /// An asynchronous task that reflects when session state has been read. The - /// content of should not be relied upon until this task - /// completes. - [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", - Justification = "From manual inspection, _sessionState only serializes Dictionaries of strings")] - public static async Task RestoreAsync() + catch (Exception e) { - _sessionState = new Dictionary(); - - try - { - // Get the input stream for the SessionState file - StorageFolder localFolder = WindowHelper.GetAppLocalFolder(); - - StorageFile file = await localFolder.GetFileAsync(sessionStateFilename); - using (IInputStream inStream = await file.OpenSequentialReadAsync()) - { - // Deserialize the Session State - DataContractSerializer serializer = new DataContractSerializer(typeof(Dictionary), _knownTypes); - _sessionState = (Dictionary)serializer.ReadObject(inStream.AsStreamForRead()); - } - - // Restore any registered frames to their saved state - foreach (var weakFrameReference in _registeredFrames) - { - if (weakFrameReference.TryGetTarget(out Frame frame)) - { - frame.ClearValue(FrameSessionStateProperty); - RestoreFrameNavigationState(frame); - } - } - } - catch (Exception e) - { - throw new SuspensionManagerException(e); - } + throw new SuspensionManagerException(e); } + } - private static DependencyProperty FrameSessionStateKeyProperty = - DependencyProperty.RegisterAttached("_FrameSessionStateKey", typeof(String), typeof(SuspensionManager), new PropertyMetadata(null)); - private static DependencyProperty FrameSessionStateProperty = - DependencyProperty.RegisterAttached("_FrameSessionState", typeof(Dictionary), typeof(SuspensionManager), new PropertyMetadata(null)); - private static List> _registeredFrames = new List>(); + /// + /// Restores previously saved . Any instances + /// registered with will also restore their prior navigation + /// state, which in turn gives their active an opportunity restore its + /// state. + /// + /// An asynchronous task that reflects when session state has been read. The + /// content of should not be relied upon until this task + /// completes. + [UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026", + Justification = "From manual inspection, _sessionState only serializes Dictionaries of strings")] + public static async Task RestoreAsync() + { + _sessionState = new Dictionary(); - /// - /// Registers a instance to allow its navigation history to be saved to - /// and restored from . Frames should be registered once - /// immediately after creation if they will participate in session state management. Upon - /// registration if state has already been restored for the specified key - /// the navigation history will immediately be restored. Subsequent invocations of - /// will also restore navigation history. - /// - /// An instance whose navigation history should be managed by - /// - /// A unique key into used to - /// store navigation-related information. - public static void RegisterFrame(Frame frame, string sessionStateKey) + try { - if (frame.GetValue(FrameSessionStateKeyProperty) != null) + // Get the input stream for the SessionState file + StorageFolder localFolder = WindowHelper.GetAppLocalFolder(); + + StorageFile file = await localFolder.GetFileAsync(sessionStateFilename); + using (IInputStream inStream = await file.OpenSequentialReadAsync()) { - throw new InvalidOperationException("Frames can only be registered to one session state key"); + // Deserialize the Session State + DataContractSerializer serializer = new DataContractSerializer(typeof(Dictionary), _knownTypes); + _sessionState = (Dictionary)serializer.ReadObject(inStream.AsStreamForRead()); } - if (frame.GetValue(FrameSessionStateProperty) != null) + // Restore any registered frames to their saved state + foreach (var weakFrameReference in _registeredFrames) { - throw new InvalidOperationException("Frames must be either be registered before accessing frame session state, or not registered at all"); + if (weakFrameReference.TryGetTarget(out Frame frame)) + { + frame.ClearValue(FrameSessionStateProperty); + RestoreFrameNavigationState(frame); + } } + } + catch (Exception e) + { + throw new SuspensionManagerException(e); + } + } - // Use a dependency property to associate the session key with a frame, and keep a list of frames whose - // navigation state should be managed - frame.SetValue(FrameSessionStateKeyProperty, sessionStateKey); - _registeredFrames.Add(new WeakReference(frame)); + private static DependencyProperty FrameSessionStateKeyProperty = + DependencyProperty.RegisterAttached("_FrameSessionStateKey", typeof(String), typeof(SuspensionManager), new PropertyMetadata(null)); + private static DependencyProperty FrameSessionStateProperty = + DependencyProperty.RegisterAttached("_FrameSessionState", typeof(Dictionary), typeof(SuspensionManager), new PropertyMetadata(null)); + private static List> _registeredFrames = new List>(); - // Check to see if navigation state can be restored - RestoreFrameNavigationState(frame); + /// + /// Registers a instance to allow its navigation history to be saved to + /// and restored from . Frames should be registered once + /// immediately after creation if they will participate in session state management. Upon + /// registration if state has already been restored for the specified key + /// the navigation history will immediately be restored. Subsequent invocations of + /// will also restore navigation history. + /// + /// An instance whose navigation history should be managed by + /// + /// A unique key into used to + /// store navigation-related information. + public static void RegisterFrame(Frame frame, string sessionStateKey) + { + if (frame.GetValue(FrameSessionStateKeyProperty) != null) + { + throw new InvalidOperationException("Frames can only be registered to one session state key"); } - /// - /// Disassociates a previously registered by - /// from . Any navigation state previously captured will be - /// removed. - /// - /// An instance whose navigation history should no longer be - /// managed. - public static void UnregisterFrame(Frame frame) + if (frame.GetValue(FrameSessionStateProperty) != null) { - // Remove session state and remove the frame from the list of frames whose navigation - // state will be saved (along with any weak references that are no longer reachable) - SessionState.Remove((string)frame.GetValue(FrameSessionStateKeyProperty)); - _registeredFrames.RemoveAll((weakFrameReference) => - { - return !weakFrameReference.TryGetTarget(out Frame testFrame) || testFrame == frame; - }); + throw new InvalidOperationException("Frames must be either be registered before accessing frame session state, or not registered at all"); } - /// - /// Provides storage for session state associated with the specified . - /// Frames that have been previously registered with have - /// their session state saved and restored automatically as a part of the global - /// . Frames that are not registered have transient state - /// that can still be useful when restoring pages that have been discarded from the - /// navigation cache. - /// - /// Apps may choose to rely on to manage - /// page-specific state instead of working with frame session state directly. - /// The instance for which session state is desired. - /// A collection of state subject to the same serialization mechanism as - /// . - public static Dictionary SessionStateForFrame(Frame frame) + // Use a dependency property to associate the session key with a frame, and keep a list of frames whose + // navigation state should be managed + frame.SetValue(FrameSessionStateKeyProperty, sessionStateKey); + _registeredFrames.Add(new WeakReference(frame)); + + // Check to see if navigation state can be restored + RestoreFrameNavigationState(frame); + } + + /// + /// Disassociates a previously registered by + /// from . Any navigation state previously captured will be + /// removed. + /// + /// An instance whose navigation history should no longer be + /// managed. + public static void UnregisterFrame(Frame frame) + { + // Remove session state and remove the frame from the list of frames whose navigation + // state will be saved (along with any weak references that are no longer reachable) + SessionState.Remove((string)frame.GetValue(FrameSessionStateKeyProperty)); + _registeredFrames.RemoveAll((weakFrameReference) => { - var frameState = (Dictionary)frame.GetValue(FrameSessionStateProperty); + return !weakFrameReference.TryGetTarget(out Frame testFrame) || testFrame == frame; + }); + } - if (frameState == null) + /// + /// Provides storage for session state associated with the specified . + /// Frames that have been previously registered with have + /// their session state saved and restored automatically as a part of the global + /// . Frames that are not registered have transient state + /// that can still be useful when restoring pages that have been discarded from the + /// navigation cache. + /// + /// Apps may choose to rely on to manage + /// page-specific state instead of working with frame session state directly. + /// The instance for which session state is desired. + /// A collection of state subject to the same serialization mechanism as + /// . + public static Dictionary SessionStateForFrame(Frame frame) + { + var frameState = (Dictionary)frame.GetValue(FrameSessionStateProperty); + + if (frameState == null) + { + var frameSessionKey = (string)frame.GetValue(FrameSessionStateKeyProperty); + if (frameSessionKey != null) { - var frameSessionKey = (string)frame.GetValue(FrameSessionStateKeyProperty); - if (frameSessionKey != null) + // Registered frames reflect the corresponding session state + if (!_sessionState.ContainsKey(frameSessionKey)) { - // Registered frames reflect the corresponding session state - if (!_sessionState.ContainsKey(frameSessionKey)) - { - _sessionState[frameSessionKey] = new Dictionary(); - } - frameState = (Dictionary)_sessionState[frameSessionKey]; + _sessionState[frameSessionKey] = new Dictionary(); } - else - { - // Frames that aren't registered have transient state - frameState = new Dictionary(); - } - frame.SetValue(FrameSessionStateProperty, frameState); + frameState = (Dictionary)_sessionState[frameSessionKey]; } - return frameState; - } - - private static void RestoreFrameNavigationState(Frame frame) - { - var frameState = SessionStateForFrame(frame); - if (frameState.ContainsKey("Navigation")) + else { - frame.SetNavigationState((string)frameState["Navigation"]); + // Frames that aren't registered have transient state + frameState = new Dictionary(); } + frame.SetValue(FrameSessionStateProperty, frameState); } + return frameState; + } - private static void SaveFrameNavigationState(Frame frame) + private static void RestoreFrameNavigationState(Frame frame) + { + var frameState = SessionStateForFrame(frame); + if (frameState.ContainsKey("Navigation")) { - var frameState = SessionStateForFrame(frame); - frameState["Navigation"] = frame.GetNavigationState(); + frame.SetNavigationState((string)frameState["Navigation"]); } } - public class SuspensionManagerException : Exception + + private static void SaveFrameNavigationState(Frame frame) { - public SuspensionManagerException() - { - } + var frameState = SessionStateForFrame(frame); + frameState["Navigation"] = frame.GetNavigationState(); + } +} +public class SuspensionManagerException : Exception +{ + public SuspensionManagerException() + { + } - public SuspensionManagerException(Exception e) - : base("SuspensionManager failed", e) - { + public SuspensionManagerException(Exception e) + : base("SuspensionManager failed", e) + { - } } } diff --git a/WinUIGallery/Common/VariedImageSizeLayout.cs b/WinUIGallery/Common/VariedImageSizeLayout.cs index 0a54afdb9..5775256d1 100644 --- a/WinUIGallery/Common/VariedImageSizeLayout.cs +++ b/WinUIGallery/Common/VariedImageSizeLayout.cs @@ -8,176 +8,175 @@ using VirtualizingLayout = Microsoft.UI.Xaml.Controls.VirtualizingLayout; using VirtualizingLayoutContext = Microsoft.UI.Xaml.Controls.VirtualizingLayoutContext; -namespace WinUIGallery.Common +namespace WinUIGallery.Common; + +public class VariedImageSizeLayout : VirtualizingLayout { - public class VariedImageSizeLayout : VirtualizingLayout + public double Width { get; set; } = 150; + protected override void OnItemsChangedCore(VirtualizingLayoutContext context, object source, NotifyCollectionChangedEventArgs args) + { + // The data collection has changed, so the bounds of all the indices are not valid anymore. + // We need to re-evaluate all the bounds and cache them during the next measure. + m_cachedBounds.Clear(); + m_firstIndex = m_lastIndex = 0; + cachedBoundsInvalid = true; + InvalidateMeasure(); + } + + protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize) { - public double Width { get; set; } = 150; - protected override void OnItemsChangedCore(VirtualizingLayoutContext context, object source, NotifyCollectionChangedEventArgs args) + var viewport = context.RealizationRect; + + if (availableSize.Width != m_lastAvailableWidth || cachedBoundsInvalid) { - // The data collection has changed, so the bounds of all the indices are not valid anymore. - // We need to re-evaluate all the bounds and cache them during the next measure. - m_cachedBounds.Clear(); - m_firstIndex = m_lastIndex = 0; - cachedBoundsInvalid = true; - InvalidateMeasure(); + UpdateCachedBounds(availableSize); + m_lastAvailableWidth = availableSize.Width; } - protected override Size MeasureOverride(VirtualizingLayoutContext context, Size availableSize) + // Initialize column offsets + int numColumns = Math.Max(1, (int)(availableSize.Width / Width)); + if (m_columnOffsets.Count == 0) { - var viewport = context.RealizationRect; - - if (availableSize.Width != m_lastAvailableWidth || cachedBoundsInvalid) + for (int i = 0; i < numColumns; i++) { - UpdateCachedBounds(availableSize); - m_lastAvailableWidth = availableSize.Width; + m_columnOffsets.Add(0); } + } - // Initialize column offsets - int numColumns = Math.Max(1, (int)(availableSize.Width / Width)); - if (m_columnOffsets.Count == 0) - { - for (int i = 0; i < numColumns; i++) - { - m_columnOffsets.Add(0); - } - } + m_firstIndex = GetStartIndex(viewport); + int currentIndex = m_firstIndex; + double nextOffset = -1.0; - m_firstIndex = GetStartIndex(viewport); - int currentIndex = m_firstIndex; - double nextOffset = -1.0; + // Measure items from start index to when we hit the end of the viewport. + while (currentIndex < context.ItemCount && nextOffset < viewport.Bottom) + { + var child = context.GetOrCreateElementAt(currentIndex); + child.Measure(new Size(Width, availableSize.Height)); - // Measure items from start index to when we hit the end of the viewport. - while (currentIndex < context.ItemCount && nextOffset < viewport.Bottom) + if (currentIndex >= m_cachedBounds.Count) { - var child = context.GetOrCreateElementAt(currentIndex); - child.Measure(new Size(Width, availableSize.Height)); - - if (currentIndex >= m_cachedBounds.Count) + // We do not have bounds for this index. Lay it out and cache it. + int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out nextOffset); + m_cachedBounds.Add(new Rect(columnIndex * Width, nextOffset, Width, child.DesiredSize.Height)); + m_columnOffsets[columnIndex] += child.DesiredSize.Height; + } + else + { + if (currentIndex + 1 == m_cachedBounds.Count) { - // We do not have bounds for this index. Lay it out and cache it. - int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out nextOffset); - m_cachedBounds.Add(new Rect(columnIndex * Width, nextOffset, Width, child.DesiredSize.Height)); - m_columnOffsets[columnIndex] += child.DesiredSize.Height; + // Last element. Use the next offset. + GetIndexOfLowestColumn(m_columnOffsets, out nextOffset); } else { - if (currentIndex + 1 == m_cachedBounds.Count) - { - // Last element. Use the next offset. - GetIndexOfLowestColumn(m_columnOffsets, out nextOffset); - } - else - { - nextOffset = m_cachedBounds[currentIndex + 1].Top; - } + nextOffset = m_cachedBounds[currentIndex + 1].Top; } - - m_lastIndex = currentIndex; - currentIndex++; } - var extent = GetExtentSize(availableSize); - return extent; + m_lastIndex = currentIndex; + currentIndex++; } - protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) + var extent = GetExtentSize(availableSize); + return extent; + } + + protected override Size ArrangeOverride(VirtualizingLayoutContext context, Size finalSize) + { + if (m_cachedBounds.Count > 0) { - if (m_cachedBounds.Count > 0) + for (int index = m_firstIndex; index <= m_lastIndex; index++) { - for (int index = m_firstIndex; index <= m_lastIndex; index++) - { - var child = context.GetOrCreateElementAt(index); - child.Arrange(m_cachedBounds[index]); - } + var child = context.GetOrCreateElementAt(index); + child.Arrange(m_cachedBounds[index]); } - return finalSize; } + return finalSize; + } - private void UpdateCachedBounds(Size availableSize) + private void UpdateCachedBounds(Size availableSize) + { + int numColumns = Math.Max(1, (int)(availableSize.Width / Width)); + m_columnOffsets.Clear(); + for (int i = 0; i < numColumns; i++) { - int numColumns = Math.Max(1, (int)(availableSize.Width / Width)); - m_columnOffsets.Clear(); - for (int i = 0; i < numColumns; i++) - { - m_columnOffsets.Add(0); - } - - for (int index = 0; index < m_cachedBounds.Count; index++) - { - int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out var nextOffset); - var oldHeight = m_cachedBounds[index].Height; - m_cachedBounds[index] = new Rect(columnIndex * Width, nextOffset, Width, oldHeight); - m_columnOffsets[columnIndex] += oldHeight; - } + m_columnOffsets.Add(0); + } - cachedBoundsInvalid = false; + for (int index = 0; index < m_cachedBounds.Count; index++) + { + int columnIndex = GetIndexOfLowestColumn(m_columnOffsets, out var nextOffset); + var oldHeight = m_cachedBounds[index].Height; + m_cachedBounds[index] = new Rect(columnIndex * Width, nextOffset, Width, oldHeight); + m_columnOffsets[columnIndex] += oldHeight; } - private int GetStartIndex(Rect viewport) + cachedBoundsInvalid = false; + } + + private int GetStartIndex(Rect viewport) + { + int startIndex = 0; + if (m_cachedBounds.Count == 0) { - int startIndex = 0; - if (m_cachedBounds.Count == 0) - { - startIndex = 0; - } - else + startIndex = 0; + } + else + { + // find first index that intersects the viewport + // perhaps this can be done more efficiently than walking + // from the start of the list. + for (int i = 0; i < m_cachedBounds.Count; i++) { - // find first index that intersects the viewport - // perhaps this can be done more efficiently than walking - // from the start of the list. - for (int i = 0; i < m_cachedBounds.Count; i++) + var currentBounds = m_cachedBounds[i]; + if (currentBounds.Y < viewport.Bottom && + currentBounds.Bottom > viewport.Top) { - var currentBounds = m_cachedBounds[i]; - if (currentBounds.Y < viewport.Bottom && - currentBounds.Bottom > viewport.Top) - { - startIndex = i; - break; - } + startIndex = i; + break; } } - - return startIndex; } - private int GetIndexOfLowestColumn(List columnOffsets, out double lowestOffset) + return startIndex; + } + + private int GetIndexOfLowestColumn(List columnOffsets, out double lowestOffset) + { + int lowestIndex = 0; + lowestOffset = columnOffsets[lowestIndex]; + for (int index = 0; index < columnOffsets.Count; index++) { - int lowestIndex = 0; - lowestOffset = columnOffsets[lowestIndex]; - for (int index = 0; index < columnOffsets.Count; index++) + var currentOffset = columnOffsets[index]; + if (lowestOffset > currentOffset) { - var currentOffset = columnOffsets[index]; - if (lowestOffset > currentOffset) - { - lowestOffset = currentOffset; - lowestIndex = index; - } + lowestOffset = currentOffset; + lowestIndex = index; } - - return lowestIndex; } + + return lowestIndex; + } - private Size GetExtentSize(Size availableSize) + private Size GetExtentSize(Size availableSize) + { + double largestColumnOffset = m_columnOffsets[0]; + for (int index = 0; index < m_columnOffsets.Count; index++) { - double largestColumnOffset = m_columnOffsets[0]; - for (int index = 0; index < m_columnOffsets.Count; index++) + var currentOffset = m_columnOffsets[index]; + if (largestColumnOffset < currentOffset) { - var currentOffset = m_columnOffsets[index]; - if (largestColumnOffset < currentOffset) - { - largestColumnOffset = currentOffset; - } + largestColumnOffset = currentOffset; } - - return new Size(availableSize.Width, largestColumnOffset); } - int m_firstIndex = 0; - int m_lastIndex = 0; - double m_lastAvailableWidth = 0.0; - List m_columnOffsets = new List(); - List m_cachedBounds = new List(); - private bool cachedBoundsInvalid = false; + return new Size(availableSize.Width, largestColumnOffset); } + + int m_firstIndex = 0; + int m_lastIndex = 0; + double m_lastAvailableWidth = 0.0; + List m_columnOffsets = new List(); + List m_cachedBounds = new List(); + private bool cachedBoundsInvalid = false; } diff --git a/WinUIGallery/Common/Win32.cs b/WinUIGallery/Common/Win32.cs index 526ab63a5..cd4e6d10f 100644 --- a/WinUIGallery/Common/Win32.cs +++ b/WinUIGallery/Common/Win32.cs @@ -2,78 +2,77 @@ using System.Runtime.InteropServices; using static WinUIGallery.App; -namespace WinUIGallery +namespace WinUIGallery; + +internal static class Win32 { - internal static class Win32 - { - [DllImport("user32.dll", CharSet = CharSet.Auto)] - public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, IntPtr lParam); + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, IntPtr lParam); - [DllImport("user32.dll")] - public static extern IntPtr LoadIcon(IntPtr hInstance, IntPtr lpIconName); + [DllImport("user32.dll")] + public static extern IntPtr LoadIcon(IntPtr hInstance, IntPtr lpIconName); - [DllImport("user32.dll")] - public static extern IntPtr GetActiveWindow(); + [DllImport("user32.dll")] + public static extern IntPtr GetActiveWindow(); - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - public static extern IntPtr GetModuleHandle(IntPtr moduleName); + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + public static extern IntPtr GetModuleHandle(IntPtr moduleName); - [DllImport("User32.dll")] - internal static extern int GetDpiForWindow(IntPtr hwnd); + [DllImport("User32.dll")] + internal static extern int GetDpiForWindow(IntPtr hwnd); - [DllImport("user32.dll", EntryPoint = "SetWindowLong")] - internal static extern int SetWindowLong32(IntPtr hWnd, WindowLongIndexFlags nIndex, WinProc newProc); + [DllImport("user32.dll", EntryPoint = "SetWindowLong")] + internal static extern int SetWindowLong32(IntPtr hWnd, WindowLongIndexFlags nIndex, WinProc newProc); - [DllImport("user32.dll", EntryPoint = "SetWindowLongPtr")] - internal static extern IntPtr SetWindowLongPtr64(IntPtr hWnd, WindowLongIndexFlags nIndex, WinProc newProc); + [DllImport("user32.dll", EntryPoint = "SetWindowLongPtr")] + internal static extern IntPtr SetWindowLongPtr64(IntPtr hWnd, WindowLongIndexFlags nIndex, WinProc newProc); - [DllImport("user32.dll")] - internal static extern IntPtr CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hWnd, WindowMessage Msg, IntPtr wParam, IntPtr lParam); + [DllImport("user32.dll")] + internal static extern IntPtr CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hWnd, WindowMessage Msg, IntPtr wParam, IntPtr lParam); - [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - private static extern uint GetCurrentThreadId(); + [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] + private static extern uint GetCurrentThreadId(); - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - private static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId); + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] + private static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hInstance, int threadId); - [DllImport("User32.dll", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern int CallNextHookEx(int idHook, int nCode, IntPtr wParam, IntPtr lParam); + [DllImport("User32.dll", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] + public static extern int CallNextHookEx(int idHook, int nCode, IntPtr wParam, IntPtr lParam); - public static int SetWindowKeyHook(HookProc hookProc) - { - return SetWindowsHookEx(WH_KEYBOARD, hookProc, GetModuleHandle(IntPtr.Zero), (int)GetCurrentThreadId()); - } + public static int SetWindowKeyHook(HookProc hookProc) + { + return SetWindowsHookEx(WH_KEYBOARD, hookProc, GetModuleHandle(IntPtr.Zero), (int)GetCurrentThreadId()); + } - public static bool IsKeyDownHook(IntPtr lWord) - { - // The 30th bit tells what the previous key state is with 0 being the "UP" state - // For more info see https://learn.microsoft.com/windows/win32/winmsg/keyboardproc#lparam-in - return (lWord >> 30 & 1) == 0; - } + public static bool IsKeyDownHook(IntPtr lWord) + { + // The 30th bit tells what the previous key state is with 0 being the "UP" state + // For more info see https://learn.microsoft.com/windows/win32/winmsg/keyboardproc#lparam-in + return (lWord >> 30 & 1) == 0; + } - public const int WM_ACTIVATE = 0x0006; - public const int WA_ACTIVE = 0x01; - public const int WA_INACTIVE = 0x00; - public const int WH_KEYBOARD = 2; - public const int WM_KEYDOWN = 0x0104; + public const int WM_ACTIVATE = 0x0006; + public const int WA_ACTIVE = 0x01; + public const int WA_INACTIVE = 0x00; + public const int WH_KEYBOARD = 2; + public const int WM_KEYDOWN = 0x0104; - public const int WM_SETICON = 0x0080; - public const int ICON_SMALL = 0; - public const int ICON_BIG = 1; + public const int WM_SETICON = 0x0080; + public const int ICON_SMALL = 0; + public const int ICON_BIG = 1; - internal delegate IntPtr WinProc(IntPtr hWnd, WindowMessage Msg, IntPtr wParam, IntPtr lParam); - public delegate int HookProc(int nCode, IntPtr wParam, IntPtr lParam); + internal delegate IntPtr WinProc(IntPtr hWnd, WindowMessage Msg, IntPtr wParam, IntPtr lParam); + public delegate int HookProc(int nCode, IntPtr wParam, IntPtr lParam); - [Flags] - internal enum WindowLongIndexFlags : int - { - GWL_WNDPROC = -4, - } + [Flags] + internal enum WindowLongIndexFlags : int + { + GWL_WNDPROC = -4, + } - internal enum WindowMessage : int - { - WM_GETMINMAXINFO = 0x0024, - } + internal enum WindowMessage : int + { + WM_GETMINMAXINFO = 0x0024, } } diff --git a/WinUIGallery/Common/WrapPanel.cs b/WinUIGallery/Common/WrapPanel.cs index 01eab3022..89ba4225e 100644 --- a/WinUIGallery/Common/WrapPanel.cs +++ b/WinUIGallery/Common/WrapPanel.cs @@ -10,552 +10,551 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery +namespace WinUIGallery; + +/// +/// Positions child elements sequentially from left to right or top to +/// bottom. When elements extend beyond the panel edge, elements are +/// positioned in the next row or column. +/// +/// Mature +public class WrapPanel : Panel { /// - /// Positions child elements sequentially from left to right or top to - /// bottom. When elements extend beyond the panel edge, elements are - /// positioned in the next row or column. + /// A value indicating whether a dependency property change handler + /// should ignore the next change notification. This is used to reset + /// the value of properties without performing any of the actions in + /// their change handlers. /// - /// Mature - public class WrapPanel : Panel + private bool _ignorePropertyChange; + + #region public double ItemHeight + /// + /// Gets or sets the height of the layout area for each item that is + /// contained in a . + /// + /// + /// The height applied to the layout area of each item that is contained + /// within a . The + /// default value is . + /// + public double ItemHeight { - /// - /// A value indicating whether a dependency property change handler - /// should ignore the next change notification. This is used to reset - /// the value of properties without performing any of the actions in - /// their change handlers. - /// - private bool _ignorePropertyChange; + get { return (double)GetValue(ItemHeightProperty); } + set { SetValue(ItemHeightProperty, value); } + } - #region public double ItemHeight - /// - /// Gets or sets the height of the layout area for each item that is - /// contained in a . - /// - /// - /// The height applied to the layout area of each item that is contained - /// within a . The - /// default value is . - /// - public double ItemHeight - { - get { return (double)GetValue(ItemHeightProperty); } - set { SetValue(ItemHeightProperty, value); } - } + /// + /// Identifies the + /// + /// dependency property. + /// + /// + /// The identifier for the + /// + /// dependency property + /// + public static readonly DependencyProperty ItemHeightProperty = + DependencyProperty.Register( + "ItemHeight", + typeof(double), + typeof(WrapPanel), + new PropertyMetadata(double.NaN, OnItemHeightOrWidthPropertyChanged)); + #endregion public double ItemHeight + + #region public double ItemWidth + /// + /// Gets or sets the width of the layout area for each item that is + /// contained in a . + /// + /// + /// The width that applies to the layout area of each item that is + /// contained in a . + /// The default value is . + /// + public double ItemWidth + { + get { return (double)GetValue(ItemWidthProperty); } + set { SetValue(ItemWidthProperty, value); } + } - /// - /// Identifies the - /// - /// dependency property. - /// - /// - /// The identifier for the - /// - /// dependency property - /// - public static readonly DependencyProperty ItemHeightProperty = - DependencyProperty.Register( - "ItemHeight", - typeof(double), - typeof(WrapPanel), - new PropertyMetadata(double.NaN, OnItemHeightOrWidthPropertyChanged)); - #endregion public double ItemHeight - - #region public double ItemWidth - /// - /// Gets or sets the width of the layout area for each item that is - /// contained in a . - /// - /// - /// The width that applies to the layout area of each item that is - /// contained in a . - /// The default value is . - /// - public double ItemWidth - { - get { return (double)GetValue(ItemWidthProperty); } - set { SetValue(ItemWidthProperty, value); } - } + /// + /// Identifies the + /// + /// dependency property. + /// + /// + /// The identifier for the + /// + /// dependency property. + /// + public static readonly DependencyProperty ItemWidthProperty = + DependencyProperty.Register( + "ItemWidth", + typeof(double), + typeof(WrapPanel), + new PropertyMetadata(double.NaN, OnItemHeightOrWidthPropertyChanged)); + #endregion public double ItemWidth + + #region public Orientation Orientation + /// + /// Gets or sets the direction in which child elements are arranged. + /// + /// + /// One of the + /// values. The default is + /// . + /// + public Orientation Orientation + { + get { return (Orientation)GetValue(OrientationProperty); } + set { SetValue(OrientationProperty, value); } + } - /// - /// Identifies the - /// - /// dependency property. - /// - /// - /// The identifier for the - /// - /// dependency property. - /// - public static readonly DependencyProperty ItemWidthProperty = - DependencyProperty.Register( - "ItemWidth", - typeof(double), - typeof(WrapPanel), - new PropertyMetadata(double.NaN, OnItemHeightOrWidthPropertyChanged)); - #endregion public double ItemWidth - - #region public Orientation Orientation - /// - /// Gets or sets the direction in which child elements are arranged. - /// - /// - /// One of the - /// values. The default is - /// . - /// - public Orientation Orientation + /// + /// Identifies the + /// + /// dependency property. + /// + /// + /// The identifier for the + /// + /// dependency property. + /// + public static readonly DependencyProperty OrientationProperty = + DependencyProperty.Register( + "Orientation", + typeof(Orientation), + typeof(WrapPanel), + new PropertyMetadata(Orientation.Horizontal, OnOrientationPropertyChanged)); + + /// + /// OrientationProperty property changed handler. + /// + /// WrapPanel that changed its Orientation. + /// Event arguments. + [SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Justification = "Almost always set from the CLR property.")] + private static void OnOrientationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + WrapPanel source = (WrapPanel)d; + Orientation value = (Orientation)e.NewValue; + + // Ignore the change if requested + if (source._ignorePropertyChange) { - get { return (Orientation)GetValue(OrientationProperty); } - set { SetValue(OrientationProperty, value); } + source._ignorePropertyChange = false; + return; } - /// - /// Identifies the - /// - /// dependency property. - /// - /// - /// The identifier for the - /// - /// dependency property. - /// - public static readonly DependencyProperty OrientationProperty = - DependencyProperty.Register( - "Orientation", - typeof(Orientation), - typeof(WrapPanel), - new PropertyMetadata(Orientation.Horizontal, OnOrientationPropertyChanged)); - - /// - /// OrientationProperty property changed handler. - /// - /// WrapPanel that changed its Orientation. - /// Event arguments. - [SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Justification = "Almost always set from the CLR property.")] - private static void OnOrientationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + // Validate the Orientation + if ((value != Orientation.Horizontal) && + (value != Orientation.Vertical)) { - WrapPanel source = (WrapPanel)d; - Orientation value = (Orientation)e.NewValue; + // Reset the property to its original state before throwing + source._ignorePropertyChange = true; + source.SetValue(OrientationProperty, (Orientation)e.OldValue); + + string message = string.Format( + CultureInfo.InvariantCulture, + "Properties.Resources.WrapPanel_OnOrientationPropertyChanged_InvalidValue", + value); + throw new ArgumentException(message, "value"); + } - // Ignore the change if requested - if (source._ignorePropertyChange) - { - source._ignorePropertyChange = false; - return; - } + // Orientation affects measuring. + source.InvalidateMeasure(); + } + #endregion public Orientation Orientation - // Validate the Orientation - if ((value != Orientation.Horizontal) && - (value != Orientation.Vertical)) - { - // Reset the property to its original state before throwing - source._ignorePropertyChange = true; - source.SetValue(OrientationProperty, (Orientation)e.OldValue); - - string message = string.Format( - CultureInfo.InvariantCulture, - "Properties.Resources.WrapPanel_OnOrientationPropertyChanged_InvalidValue", - value); - throw new ArgumentException(message, "value"); - } + /// + /// Initializes a new instance of the + /// class. + /// + public WrapPanel() + { + } - // Orientation affects measuring. - source.InvalidateMeasure(); - } - #endregion public Orientation Orientation + /// + /// Property changed handler for ItemHeight and ItemWidth. + /// + /// + /// WrapPanel that changed its ItemHeight or ItemWidth. + /// + /// Event arguments. + [SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Justification = "Almost always set from the CLR property.")] + private static void OnItemHeightOrWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + WrapPanel source = (WrapPanel)d; + double value = (double)e.NewValue; - /// - /// Initializes a new instance of the - /// class. - /// - public WrapPanel() + // Ignore the change if requested + if (source._ignorePropertyChange) { + source._ignorePropertyChange = false; + return; } - /// - /// Property changed handler for ItemHeight and ItemWidth. - /// - /// - /// WrapPanel that changed its ItemHeight or ItemWidth. - /// - /// Event arguments. - [SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Justification = "Almost always set from the CLR property.")] - private static void OnItemHeightOrWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + // Validate the length (which must either be NaN or a positive, + // finite number) + if (!double.IsNaN(value) && ((value <= 0.0) || double.IsPositiveInfinity(value))) { - WrapPanel source = (WrapPanel)d; - double value = (double)e.NewValue; + // Reset the property to its original state before throwing + source._ignorePropertyChange = true; + source.SetValue(e.Property, (double)e.OldValue); + + string message = string.Format( + CultureInfo.InvariantCulture, + "Properties.Resources.WrapPanel_OnItemHeightOrWidthPropertyChanged_InvalidValue", + value); + throw new ArgumentException(message, "value"); + } - // Ignore the change if requested - if (source._ignorePropertyChange) - { - source._ignorePropertyChange = false; - return; - } + // The length properties affect measuring. + source.InvalidateMeasure(); + } - // Validate the length (which must either be NaN or a positive, - // finite number) - if (!double.IsNaN(value) && ((value <= 0.0) || double.IsPositiveInfinity(value))) + /// + /// Measures the child elements of a + /// in anticipation + /// of arranging them during the + /// + /// pass. + /// + /// + /// The size available to child elements of the wrap panel. + /// + /// + /// The size required by the + /// and its + /// elements. + /// + [SuppressMessage("Microsoft.Naming", "CA1725:ParameterNamesShouldMatchBaseDeclaration", MessageId = "0#", Justification = "Compat with WPF.")] + protected override Size MeasureOverride(Size constraint) + { + // Variables tracking the size of the current line, the total size + // measured so far, and the maximum size available to fill. Note + // that the line might represent a row or a column depending on the + // orientation. + Orientation o = Orientation; + OrientedSize lineSize = new OrientedSize(o); + OrientedSize totalSize = new OrientedSize(o); + OrientedSize maximumSize = new OrientedSize(o, constraint.Width, constraint.Height); + + // Determine the constraints for individual items + double itemWidth = ItemWidth; + double itemHeight = ItemHeight; + bool hasFixedWidth = !double.IsNaN(itemWidth); + bool hasFixedHeight = !double.IsNaN(itemHeight); + Size itemSize = new Size( + hasFixedWidth ? itemWidth : constraint.Width, + hasFixedHeight ? itemHeight : constraint.Height); + + // Measure each of the Children + foreach (UIElement element in Children) + { + // Determine the size of the element + element.Measure(itemSize); + OrientedSize elementSize = new OrientedSize( + o, + hasFixedWidth ? itemWidth : element.DesiredSize.Width, + hasFixedHeight ? itemHeight : element.DesiredSize.Height); + + // If this element falls of the edge of the line + if (NumericExtensions.IsGreaterThan(lineSize.Direct + elementSize.Direct, maximumSize.Direct)) { - // Reset the property to its original state before throwing - source._ignorePropertyChange = true; - source.SetValue(e.Property, (double)e.OldValue); - - string message = string.Format( - CultureInfo.InvariantCulture, - "Properties.Resources.WrapPanel_OnItemHeightOrWidthPropertyChanged_InvalidValue", - value); - throw new ArgumentException(message, "value"); - } + // Update the total size with the direct and indirect growth + // for the current line + totalSize.Direct = Math.Max(lineSize.Direct, totalSize.Direct); + totalSize.Indirect += lineSize.Indirect; - // The length properties affect measuring. - source.InvalidateMeasure(); - } + // Move the element to a new line + lineSize = elementSize; - /// - /// Measures the child elements of a - /// in anticipation - /// of arranging them during the - /// - /// pass. - /// - /// - /// The size available to child elements of the wrap panel. - /// - /// - /// The size required by the - /// and its - /// elements. - /// - [SuppressMessage("Microsoft.Naming", "CA1725:ParameterNamesShouldMatchBaseDeclaration", MessageId = "0#", Justification = "Compat with WPF.")] - protected override Size MeasureOverride(Size constraint) - { - // Variables tracking the size of the current line, the total size - // measured so far, and the maximum size available to fill. Note - // that the line might represent a row or a column depending on the - // orientation. - Orientation o = Orientation; - OrientedSize lineSize = new OrientedSize(o); - OrientedSize totalSize = new OrientedSize(o); - OrientedSize maximumSize = new OrientedSize(o, constraint.Width, constraint.Height); - - // Determine the constraints for individual items - double itemWidth = ItemWidth; - double itemHeight = ItemHeight; - bool hasFixedWidth = !double.IsNaN(itemWidth); - bool hasFixedHeight = !double.IsNaN(itemHeight); - Size itemSize = new Size( - hasFixedWidth ? itemWidth : constraint.Width, - hasFixedHeight ? itemHeight : constraint.Height); - - // Measure each of the Children - foreach (UIElement element in Children) - { - // Determine the size of the element - element.Measure(itemSize); - OrientedSize elementSize = new OrientedSize( - o, - hasFixedWidth ? itemWidth : element.DesiredSize.Width, - hasFixedHeight ? itemHeight : element.DesiredSize.Height); - - // If this element falls of the edge of the line - if (NumericExtensions.IsGreaterThan(lineSize.Direct + elementSize.Direct, maximumSize.Direct)) + // If the current element is larger than the maximum size, + // place it on a line by itself + if (NumericExtensions.IsGreaterThan(elementSize.Direct, maximumSize.Direct)) { - // Update the total size with the direct and indirect growth - // for the current line - totalSize.Direct = Math.Max(lineSize.Direct, totalSize.Direct); - totalSize.Indirect += lineSize.Indirect; - - // Move the element to a new line - lineSize = elementSize; - - // If the current element is larger than the maximum size, - // place it on a line by itself - if (NumericExtensions.IsGreaterThan(elementSize.Direct, maximumSize.Direct)) - { - // Update the total size for the line occupied by this - // single element - totalSize.Direct = Math.Max(elementSize.Direct, totalSize.Direct); - totalSize.Indirect += elementSize.Indirect; - - // Move to a new line - lineSize = new OrientedSize(o); - } - } - else - { - // Otherwise just add the element to the end of the line - lineSize.Direct += elementSize.Direct; - lineSize.Indirect = Math.Max(lineSize.Indirect, elementSize.Indirect); + // Update the total size for the line occupied by this + // single element + totalSize.Direct = Math.Max(elementSize.Direct, totalSize.Direct); + totalSize.Indirect += elementSize.Indirect; + + // Move to a new line + lineSize = new OrientedSize(o); } } + else + { + // Otherwise just add the element to the end of the line + lineSize.Direct += elementSize.Direct; + lineSize.Indirect = Math.Max(lineSize.Indirect, elementSize.Indirect); + } + } - // Update the total size with the elements on the last line - totalSize.Direct = Math.Max(lineSize.Direct, totalSize.Direct); - totalSize.Indirect += lineSize.Indirect; + // Update the total size with the elements on the last line + totalSize.Direct = Math.Max(lineSize.Direct, totalSize.Direct); + totalSize.Indirect += lineSize.Indirect; - // Return the total size required as an un-oriented quantity - return new Size(totalSize.Width, totalSize.Height); - } + // Return the total size required as an un-oriented quantity + return new Size(totalSize.Width, totalSize.Height); + } - /// - /// Arranges and sizes the - /// control and its - /// child elements. - /// - /// - /// The area within the parent that the - /// should use - /// arrange itself and its children. - /// - /// - /// The actual size used by the - /// . - /// - protected override Size ArrangeOverride(Size finalSize) + /// + /// Arranges and sizes the + /// control and its + /// child elements. + /// + /// + /// The area within the parent that the + /// should use + /// arrange itself and its children. + /// + /// + /// The actual size used by the + /// . + /// + protected override Size ArrangeOverride(Size finalSize) + { + // Variables tracking the size of the current line, and the maximum + // size available to fill. Note that the line might represent a row + // or a column depending on the orientation. + Orientation o = Orientation; + OrientedSize lineSize = new OrientedSize(o); + OrientedSize maximumSize = new OrientedSize(o, finalSize.Width, finalSize.Height); + + // Determine the constraints for individual items + double itemWidth = ItemWidth; + double itemHeight = ItemHeight; + bool hasFixedWidth = !double.IsNaN(itemWidth); + bool hasFixedHeight = !double.IsNaN(itemHeight); + double indirectOffset = 0; + double? directDelta = (o == Orientation.Horizontal) ? + (hasFixedWidth ? (double?)itemWidth : null) : + (hasFixedHeight ? (double?)itemHeight : null); + + // Measure each of the Children. We will process the elements one + // line at a time, just like during measure, but we will wait until + // we've completed an entire line of elements before arranging them. + // The lineStart and lineEnd variables track the size of the + // currently arranged line. + UIElementCollection children = Children; + int count = children.Count; + int lineStart = 0; + for (int lineEnd = 0; lineEnd < count; lineEnd++) { - // Variables tracking the size of the current line, and the maximum - // size available to fill. Note that the line might represent a row - // or a column depending on the orientation. - Orientation o = Orientation; - OrientedSize lineSize = new OrientedSize(o); - OrientedSize maximumSize = new OrientedSize(o, finalSize.Width, finalSize.Height); - - // Determine the constraints for individual items - double itemWidth = ItemWidth; - double itemHeight = ItemHeight; - bool hasFixedWidth = !double.IsNaN(itemWidth); - bool hasFixedHeight = !double.IsNaN(itemHeight); - double indirectOffset = 0; - double? directDelta = (o == Orientation.Horizontal) ? - (hasFixedWidth ? (double?)itemWidth : null) : - (hasFixedHeight ? (double?)itemHeight : null); - - // Measure each of the Children. We will process the elements one - // line at a time, just like during measure, but we will wait until - // we've completed an entire line of elements before arranging them. - // The lineStart and lineEnd variables track the size of the - // currently arranged line. - UIElementCollection children = Children; - int count = children.Count; - int lineStart = 0; - for (int lineEnd = 0; lineEnd < count; lineEnd++) + UIElement element = children[lineEnd]; + + // Get the size of the element + OrientedSize elementSize = new OrientedSize( + o, + hasFixedWidth ? itemWidth : element.DesiredSize.Width, + hasFixedHeight ? itemHeight : element.DesiredSize.Height); + + // If this element falls of the edge of the line + if (NumericExtensions.IsGreaterThan(lineSize.Direct + elementSize.Direct, maximumSize.Direct)) { - UIElement element = children[lineEnd]; + // Then we just completed a line and we should arrange it + ArrangeLine(lineStart, lineEnd, directDelta, indirectOffset, lineSize.Indirect); - // Get the size of the element - OrientedSize elementSize = new OrientedSize( - o, - hasFixedWidth ? itemWidth : element.DesiredSize.Width, - hasFixedHeight ? itemHeight : element.DesiredSize.Height); + // Move the current element to a new line + indirectOffset += lineSize.Indirect; + lineSize = elementSize; - // If this element falls of the edge of the line - if (NumericExtensions.IsGreaterThan(lineSize.Direct + elementSize.Direct, maximumSize.Direct)) + // If the current element is larger than the maximum size + if (NumericExtensions.IsGreaterThan(elementSize.Direct, maximumSize.Direct)) { - // Then we just completed a line and we should arrange it - ArrangeLine(lineStart, lineEnd, directDelta, indirectOffset, lineSize.Indirect); + // Arrange the element as a single line + ArrangeLine(lineEnd, ++lineEnd, directDelta, indirectOffset, elementSize.Indirect); - // Move the current element to a new line + // Move to a new line indirectOffset += lineSize.Indirect; - lineSize = elementSize; - - // If the current element is larger than the maximum size - if (NumericExtensions.IsGreaterThan(elementSize.Direct, maximumSize.Direct)) - { - // Arrange the element as a single line - ArrangeLine(lineEnd, ++lineEnd, directDelta, indirectOffset, elementSize.Indirect); - - // Move to a new line - indirectOffset += lineSize.Indirect; - lineSize = new OrientedSize(o); - } - - // Advance the start index to a new line after arranging - lineStart = lineEnd; + lineSize = new OrientedSize(o); } - else - { - // Otherwise just add the element to the end of the line - lineSize.Direct += elementSize.Direct; - lineSize.Indirect = Math.Max(lineSize.Indirect, elementSize.Indirect); - } - } - // Arrange any elements on the last line - if (lineStart < count) + // Advance the start index to a new line after arranging + lineStart = lineEnd; + } + else { - ArrangeLine(lineStart, count, directDelta, indirectOffset, lineSize.Indirect); + // Otherwise just add the element to the end of the line + lineSize.Direct += elementSize.Direct; + lineSize.Indirect = Math.Max(lineSize.Indirect, elementSize.Indirect); } - - return finalSize; } - /// - /// Arrange a sequence of elements in a single line. - /// - /// - /// Index of the first element in the sequence to arrange. - /// - /// - /// Index of the last element in the sequence to arrange. - /// - /// - /// Optional fixed growth in the primary direction. - /// - /// - /// Offset of the line in the indirect direction. - /// - /// - /// Shared indirect growth of the elements on this line. - /// - private void ArrangeLine(int lineStart, int lineEnd, double? directDelta, double indirectOffset, double indirectGrowth) + // Arrange any elements on the last line + if (lineStart < count) { - double directOffset = 0.0; - - Orientation o = Orientation; - bool isHorizontal = o == Orientation.Horizontal; - - UIElementCollection children = Children; - for (int index = lineStart; index < lineEnd; index++) - { - // Get the size of the element - UIElement element = children[index]; - OrientedSize elementSize = new OrientedSize(o, element.DesiredSize.Width, element.DesiredSize.Height); - - // Determine if we should use the element's desired size or the - // fixed item width or height - double directGrowth = directDelta != null ? - directDelta.Value : - elementSize.Direct; - - // Arrange the element - Rect bounds = isHorizontal ? - new Rect(directOffset, indirectOffset, directGrowth, indirectGrowth) : - new Rect(indirectOffset, directOffset, indirectGrowth, directGrowth); - element.Arrange(bounds); - - directOffset += directGrowth; - } + ArrangeLine(lineStart, count, directDelta, indirectOffset, lineSize.Indirect); } + + return finalSize; } /// - /// Numeric utility methods used by controls. These methods are similar in - /// scope to the WPF DoubleUtil class. + /// Arrange a sequence of elements in a single line. /// - internal static class NumericExtensions + /// + /// Index of the first element in the sequence to arrange. + /// + /// + /// Index of the last element in the sequence to arrange. + /// + /// + /// Optional fixed growth in the primary direction. + /// + /// + /// Offset of the line in the indirect direction. + /// + /// + /// Shared indirect growth of the elements on this line. + /// + private void ArrangeLine(int lineStart, int lineEnd, double? directDelta, double indirectOffset, double indirectGrowth) { - /// - /// NanUnion is a C++ style type union used for efficiently converting - /// a double into an unsigned long, whose bits can be easily - /// manipulated. - /// - [StructLayout(LayoutKind.Explicit)] - private struct NanUnion + double directOffset = 0.0; + + Orientation o = Orientation; + bool isHorizontal = o == Orientation.Horizontal; + + UIElementCollection children = Children; + for (int index = lineStart; index < lineEnd; index++) { - /// - /// Floating point representation of the union. - /// - [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "It is accessed through the other member of the union")] - [FieldOffset(0)] - internal double FloatingValue; - - /// - /// Integer representation of the union. - /// - [FieldOffset(0)] - internal ulong IntegerValue; + // Get the size of the element + UIElement element = children[index]; + OrientedSize elementSize = new OrientedSize(o, element.DesiredSize.Width, element.DesiredSize.Height); + + // Determine if we should use the element's desired size or the + // fixed item width or height + double directGrowth = directDelta != null ? + directDelta.Value : + elementSize.Direct; + + // Arrange the element + Rect bounds = isHorizontal ? + new Rect(directOffset, indirectOffset, directGrowth, indirectGrowth) : + new Rect(indirectOffset, directOffset, indirectGrowth, directGrowth); + element.Arrange(bounds); + + directOffset += directGrowth; } + } +} -#if !WINDOWS_PHONE +/// +/// Numeric utility methods used by controls. These methods are similar in +/// scope to the WPF DoubleUtil class. +/// +internal static class NumericExtensions +{ + /// + /// NanUnion is a C++ style type union used for efficiently converting + /// a double into an unsigned long, whose bits can be easily + /// manipulated. + /// + [StructLayout(LayoutKind.Explicit)] + private struct NanUnion + { /// - /// Check if a number is zero. + /// Floating point representation of the union. /// - /// The number to check. - /// True if the number is zero, false otherwise. - public static bool IsZero(this double value) - { - // We actually consider anything within an order of magnitude of - // epsilon to be zero - return Math.Abs(value) < 2.2204460492503131E-15; - } -#endif + [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "It is accessed through the other member of the union")] + [FieldOffset(0)] + internal double FloatingValue; /// - /// Check if a number isn't really a number. + /// Integer representation of the union. /// - /// The number to check. - /// - /// True if the number is not a number, false if it is a number. - /// - public static bool IsNaN(this double value) - { - // Get the double as an unsigned long - NanUnion union = new NanUnion { FloatingValue = value }; + [FieldOffset(0)] + internal ulong IntegerValue; + } - // An IEEE 754 double precision floating point number is NaN if its - // exponent equals 2047 and it has a non-zero mantissa. - ulong exponent = union.IntegerValue & 0xfff0000000000000L; - if ((exponent != 0x7ff0000000000000L) && (exponent != 0xfff0000000000000L)) - { - return false; - } - ulong mantissa = union.IntegerValue & 0x000fffffffffffffL; - return mantissa != 0L; - } +#if !WINDOWS_PHONE + /// + /// Check if a number is zero. + /// + /// The number to check. + /// True if the number is zero, false otherwise. + public static bool IsZero(this double value) + { + // We actually consider anything within an order of magnitude of + // epsilon to be zero + return Math.Abs(value) < 2.2204460492503131E-15; + } +#endif - /// - /// Determine if one number is greater than another. - /// - /// First number. - /// Second number. - /// - /// True if the first number is greater than the second, false - /// otherwise. - /// - public static bool IsGreaterThan(double left, double right) + /// + /// Check if a number isn't really a number. + /// + /// The number to check. + /// + /// True if the number is not a number, false if it is a number. + /// + public static bool IsNaN(this double value) + { + // Get the double as an unsigned long + NanUnion union = new NanUnion { FloatingValue = value }; + + // An IEEE 754 double precision floating point number is NaN if its + // exponent equals 2047 and it has a non-zero mantissa. + ulong exponent = union.IntegerValue & 0xfff0000000000000L; + if ((exponent != 0x7ff0000000000000L) && (exponent != 0xfff0000000000000L)) { - return (left > right) && !AreClose(left, right); + return false; } + ulong mantissa = union.IntegerValue & 0x000fffffffffffffL; + return mantissa != 0L; + } - /// - /// Determine if two numbers are close in value. - /// - /// First number. - /// Second number. - /// - /// True if the first number is close in value to the second, false - /// otherwise. - /// - public static bool AreClose(double left, double right) - { - // ReSharper disable CompareOfFloatsByEqualityOperator - if (left == right) - // ReSharper restore CompareOfFloatsByEqualityOperator - { - return true; - } + /// + /// Determine if one number is greater than another. + /// + /// First number. + /// Second number. + /// + /// True if the first number is greater than the second, false + /// otherwise. + /// + public static bool IsGreaterThan(double left, double right) + { + return (left > right) && !AreClose(left, right); + } - double a = (Math.Abs(left) + Math.Abs(right) + 10.0) * 2.2204460492503131E-16; - double b = left - right; - return (-a < b) && (a > b); + /// + /// Determine if two numbers are close in value. + /// + /// First number. + /// Second number. + /// + /// True if the first number is close in value to the second, false + /// otherwise. + /// + public static bool AreClose(double left, double right) + { + // ReSharper disable CompareOfFloatsByEqualityOperator + if (left == right) + // ReSharper restore CompareOfFloatsByEqualityOperator + { + return true; } + double a = (Math.Abs(left) + Math.Abs(right) + 10.0) * 2.2204460492503131E-16; + double b = left - right; + return (-a < b) && (a > b); + } + #if !WINDOWS_PHONE - /// - /// Determine if one number is less than or close to another. - /// - /// First number. - /// Second number. - /// - /// True if the first number is less than or close to the second, false - /// otherwise. - /// - public static bool IsLessThanOrClose(double left, double right) - { - return (left < right) || AreClose(left, right); - } -#endif + /// + /// Determine if one number is less than or close to another. + /// + /// First number. + /// Second number. + /// + /// True if the first number is less than or close to the second, false + /// otherwise. + /// + public static bool IsLessThanOrClose(double left, double right) + { + return (left < right) || AreClose(left, right); } +#endif } diff --git a/WinUIGallery/ConnectedAnimationPages/CardPage.xaml.cs b/WinUIGallery/ConnectedAnimationPages/CardPage.xaml.cs index 0fecd2465..e7282ff61 100644 --- a/WinUIGallery/ConnectedAnimationPages/CardPage.xaml.cs +++ b/WinUIGallery/ConnectedAnimationPages/CardPage.xaml.cs @@ -1,78 +1,77 @@ -using System; +using System; using System.Collections.Generic; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media.Animation; using Windows.Foundation.Metadata; -namespace WinUIGallery.ConnectedAnimationPages +namespace WinUIGallery.ConnectedAnimationPages; + +public sealed partial class CardPage : Page { - public sealed partial class CardPage : Page + int _storedItem; + + public CardPage() { - int _storedItem; + this.InitializeComponent(); - public CardPage() + // Populate the collection with some items. + var items = new List(); + for (int i = 0; i < 30; i++) { - this.InitializeComponent(); - - // Populate the collection with some items. - var items = new List(); - for (int i = 0; i < 30; i++) - { - items.Add(i); - } - - collection.ItemsSource = items; + items.Add(i); } - private async void BackButton_Click(object sender, RoutedEventArgs e) - { - ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("backwardsAnimation", destinationElement); - SmokeGrid.Children.Remove(destinationElement); - - // Collapse the smoke when the animation completes. - animation.Completed += Animation_Completed; + collection.ItemsSource = items; + } - // If the connected item appears outside the viewport, scroll it into view. - collection.ScrollIntoView(_storedItem, ScrollIntoViewAlignment.Default); - collection.UpdateLayout(); + private async void BackButton_Click(object sender, RoutedEventArgs e) + { + ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("backwardsAnimation", destinationElement); + SmokeGrid.Children.Remove(destinationElement); - // Use the Direct configuration to go back (if the API is available). - if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) - { - animation.Configuration = new DirectConnectedAnimationConfiguration(); - } + // Collapse the smoke when the animation completes. + animation.Completed += Animation_Completed; - // Play the second connected animation. - await collection.TryStartConnectedAnimationAsync(animation, _storedItem, "connectedElement"); - } + // If the connected item appears outside the viewport, scroll it into view. + collection.ScrollIntoView(_storedItem, ScrollIntoViewAlignment.Default); + collection.UpdateLayout(); - private void Animation_Completed(ConnectedAnimation sender, object args) + // Use the Direct configuration to go back (if the API is available). + if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) { - SmokeGrid.Visibility = Visibility.Collapsed; - SmokeGrid.Children.Add(destinationElement); + animation.Configuration = new DirectConnectedAnimationConfiguration(); } - private void TipsGrid_ItemClick(object sender, ItemClickEventArgs e) - { - ConnectedAnimation animation = null; + // Play the second connected animation. + await collection.TryStartConnectedAnimationAsync(animation, _storedItem, "connectedElement"); + } - // Get the collection item corresponding to the clicked item. - if (collection.ContainerFromItem(e.ClickedItem) is GridViewItem container) - { - // Stash the clicked item for use later. We'll need it when we connect back from the detailpage. - _storedItem = Convert.ToInt32(container.Content); + private void Animation_Completed(ConnectedAnimation sender, object args) + { + SmokeGrid.Visibility = Visibility.Collapsed; + SmokeGrid.Children.Add(destinationElement); + } - // Prepare the connected animation. - // Notice that the stored item is passed in, as well as the name of the connected element. - // The animation will actually start on the Detailed info page. - animation = collection.PrepareConnectedAnimation("forwardAnimation", _storedItem, "connectedElement"); + private void TipsGrid_ItemClick(object sender, ItemClickEventArgs e) + { + ConnectedAnimation animation = null; - } + // Get the collection item corresponding to the clicked item. + if (collection.ContainerFromItem(e.ClickedItem) is GridViewItem container) + { + // Stash the clicked item for use later. We'll need it when we connect back from the detailpage. + _storedItem = Convert.ToInt32(container.Content); - SmokeGrid.Visibility = Visibility.Visible; + // Prepare the connected animation. + // Notice that the stored item is passed in, as well as the name of the connected element. + // The animation will actually start on the Detailed info page. + animation = collection.PrepareConnectedAnimation("forwardAnimation", _storedItem, "connectedElement"); - animation.TryStart(destinationElement); } + + SmokeGrid.Visibility = Visibility.Visible; + + animation.TryStart(destinationElement); } } diff --git a/WinUIGallery/ConnectedAnimationPages/CollectionPage.xaml.cs b/WinUIGallery/ConnectedAnimationPages/CollectionPage.xaml.cs index b31dd6243..3e1c26648 100644 --- a/WinUIGallery/ConnectedAnimationPages/CollectionPage.xaml.cs +++ b/WinUIGallery/ConnectedAnimationPages/CollectionPage.xaml.cs @@ -6,73 +6,72 @@ using WinUIGallery.ControlPages; using Windows.Foundation.Metadata; -namespace WinUIGallery.ConnectedAnimationPages +namespace WinUIGallery.ConnectedAnimationPages; + +public sealed partial class CollectionPage : Page { - public sealed partial class CollectionPage : Page - { - CustomDataObject _storeditem; + CustomDataObject _storeditem; - public CollectionPage() - { - this.InitializeComponent(); + public CollectionPage() + { + this.InitializeComponent(); - // Ensure that the MainPage is only created once, and cached during navigation. - this.NavigationCacheMode = NavigationCacheMode.Enabled; + // Ensure that the MainPage is only created once, and cached during navigation. + this.NavigationCacheMode = NavigationCacheMode.Enabled; - collection.ItemsSource = WinUIGallery.ControlPages.CustomDataObject.GetDataObjects(); - } + collection.ItemsSource = WinUIGallery.ControlPages.CustomDataObject.GetDataObjects(); + } - private async void collection_Loaded(object sender, RoutedEventArgs e) + private async void collection_Loaded(object sender, RoutedEventArgs e) + { + if (_storeditem != null) { - if (_storeditem != null) - { - // If the connected item appears outside the viewport, scroll it into view. - collection.ScrollIntoView(_storeditem, ScrollIntoViewAlignment.Default); - collection.UpdateLayout(); + // If the connected item appears outside the viewport, scroll it into view. + collection.ScrollIntoView(_storeditem, ScrollIntoViewAlignment.Default); + collection.UpdateLayout(); - // Play the second connected animation. - ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("BackConnectedAnimation"); - if (animation != null) + // Play the second connected animation. + ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("BackConnectedAnimation"); + if (animation != null) + { + // Setup the "back" configuration if the API is present. + if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) { - // Setup the "back" configuration if the API is present. - if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) - { - animation.Configuration = new DirectConnectedAnimationConfiguration(); - } - - await collection.TryStartConnectedAnimationAsync(animation, _storeditem, "connectedElement"); + animation.Configuration = new DirectConnectedAnimationConfiguration(); } - // Set focus on the list - collection.Focus(FocusState.Programmatic); + await collection.TryStartConnectedAnimationAsync(animation, _storeditem, "connectedElement"); } + + // Set focus on the list + collection.Focus(FocusState.Programmatic); } + } - private void collection_ItemClick(object sender, ItemClickEventArgs e) + private void collection_ItemClick(object sender, ItemClickEventArgs e) + { + // Get the collection item corresponding to the clicked item. + if (collection.ContainerFromItem(e.ClickedItem) is ListViewItem container) { - // Get the collection item corresponding to the clicked item. - if (collection.ContainerFromItem(e.ClickedItem) is ListViewItem container) - { - // Stash the clicked item for use later. We'll need it when we connect back from the detailpage. - _storeditem = container.Content as CustomDataObject; - - // Prepare the connected animation. - // Notice that the stored item is passed in, as well as the name of the connected element. - // The animation will actually start on the Detailed info page. - collection.PrepareConnectedAnimation("ForwardConnectedAnimation", _storeditem, "connectedElement"); - } + // Stash the clicked item for use later. We'll need it when we connect back from the detailpage. + _storeditem = container.Content as CustomDataObject; - // Navigate to the DetailedInfoPage. - // Note that we suppress the default animation. - Frame.Navigate(typeof(DetailedInfoPage), _storeditem, new SuppressNavigationTransitionInfo()); + // Prepare the connected animation. + // Notice that the stored item is passed in, as well as the name of the connected element. + // The animation will actually start on the Detailed info page. + collection.PrepareConnectedAnimation("ForwardConnectedAnimation", _storeditem, "connectedElement"); } - private void TextBlock_IsTextTrimmedChanged(TextBlock sender, IsTextTrimmedChangedEventArgs args) - { - var textBlock = sender as TextBlock; - var text = textBlock.IsTextTrimmed ? textBlock.Text : string.Empty; + // Navigate to the DetailedInfoPage. + // Note that we suppress the default animation. + Frame.Navigate(typeof(DetailedInfoPage), _storeditem, new SuppressNavigationTransitionInfo()); + } - ToolTipService.SetToolTip(textBlock, text); - } + private void TextBlock_IsTextTrimmedChanged(TextBlock sender, IsTextTrimmedChangedEventArgs args) + { + var textBlock = sender as TextBlock; + var text = textBlock.IsTextTrimmed ? textBlock.Text : string.Empty; + + ToolTipService.SetToolTip(textBlock, text); } } diff --git a/WinUIGallery/ConnectedAnimationPages/DetailedInfoPage.xaml.cs b/WinUIGallery/ConnectedAnimationPages/DetailedInfoPage.xaml.cs index a6d28d46b..5ada0a47c 100644 --- a/WinUIGallery/ConnectedAnimationPages/DetailedInfoPage.xaml.cs +++ b/WinUIGallery/ConnectedAnimationPages/DetailedInfoPage.xaml.cs @@ -1,53 +1,52 @@ -using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; using WinUIGallery.ControlPages; using Microsoft.UI.Xaml.Media.Animation; -namespace WinUIGallery.ConnectedAnimationPages +namespace WinUIGallery.ConnectedAnimationPages; + +public sealed partial class DetailedInfoPage : Page { - public sealed partial class DetailedInfoPage : Page + public CustomDataObject DetailedObject { get; set; } + public DetailedInfoPage() { - public CustomDataObject DetailedObject { get; set; } - public DetailedInfoPage() - { - this.InitializeComponent(); - GoBackButton.Loaded += GoBackButton_Loaded; - } + this.InitializeComponent(); + GoBackButton.Loaded += GoBackButton_Loaded; + } - private void GoBackButton_Loaded(object sender, RoutedEventArgs e) - { - // When we land in page, put focus on the back button - GoBackButton.Focus(FocusState.Programmatic); - } + private void GoBackButton_Loaded(object sender, RoutedEventArgs e) + { + // When we land in page, put focus on the back button + GoBackButton.Focus(FocusState.Programmatic); + } - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); + protected override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); - // Store the item to be used in binding to UI - DetailedObject = e.Parameter as CustomDataObject; + // Store the item to be used in binding to UI + DetailedObject = e.Parameter as CustomDataObject; - ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("ForwardConnectedAnimation"); - if (imageAnimation != null) - { - // Connected animation + coordinated animation - imageAnimation.TryStart(detailedImage, new UIElement[] { coordinatedPanel }); + ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("ForwardConnectedAnimation"); + if (imageAnimation != null) + { + // Connected animation + coordinated animation + imageAnimation.TryStart(detailedImage, new UIElement[] { coordinatedPanel }); - } } + } - // Create connected animation back to collection page. - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - base.OnNavigatingFrom(e); + // Create connected animation back to collection page. + protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) + { + base.OnNavigatingFrom(e); - ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("BackConnectedAnimation", detailedImage); - } + ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("BackConnectedAnimation", detailedImage); + } - private void BackButton_Click(object sender, RoutedEventArgs e) - { - Frame.GoBack(); - } + private void BackButton_Click(object sender, RoutedEventArgs e) + { + Frame.GoBack(); } } diff --git a/WinUIGallery/ControlPages/Accessibility/AccessibilityColorContrastPage.xaml.cs b/WinUIGallery/ControlPages/Accessibility/AccessibilityColorContrastPage.xaml.cs index 46509b694..2e3be4556 100644 --- a/WinUIGallery/ControlPages/Accessibility/AccessibilityColorContrastPage.xaml.cs +++ b/WinUIGallery/ControlPages/Accessibility/AccessibilityColorContrastPage.xaml.cs @@ -14,84 +14,83 @@ using Microsoft.UI.Xaml.Shapes; using Windows.UI; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AccessibilityColorContrastPage : Page { - public sealed partial class AccessibilityColorContrastPage : Page + public AccessibilityColorContrastPage() { - public AccessibilityColorContrastPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void RecalculateContrastRatio() - { - var textColor = TextColorPicker.Color; - var backgroundColor = BackgroundColorPicker.Color; + private void RecalculateContrastRatio() + { + var textColor = TextColorPicker.Color; + var backgroundColor = BackgroundColorPicker.Color; - var ratio = CalculateContrastRatio(textColor, backgroundColor); - ContrastRatioPresenter.Text = Math.Round(ratio, 2).ToString() + ":1"; + var ratio = CalculateContrastRatio(textColor, backgroundColor); + ContrastRatioPresenter.Text = Math.Round(ratio, 2).ToString() + ":1"; - SetCheckState(NormalTextCheckEllipse, NormalTextCheckIcon, NormalTextCheckResult, ratio >= 4.5); - SetCheckState(LargeTextCheckEllipse, LargeTextCheckIcon, LargeTextCheckResult, ratio >= 3.0); - SetCheckState(ComponentsCheckEllipse, ComponentsCheckIcon, ComponentsCheckResult, ratio >= 3.0); - } + SetCheckState(NormalTextCheckEllipse, NormalTextCheckIcon, NormalTextCheckResult, ratio >= 4.5); + SetCheckState(LargeTextCheckEllipse, LargeTextCheckIcon, LargeTextCheckResult, ratio >= 3.0); + SetCheckState(ComponentsCheckEllipse, ComponentsCheckIcon, ComponentsCheckResult, ratio >= 3.0); + } - private void SetCheckState(Ellipse background, FontIcon icon, TextBlock resultName, bool passed) + private void SetCheckState(Ellipse background, FontIcon icon, TextBlock resultName, bool passed) + { + if (passed) { - if (passed) - { - background.Fill = new SolidColorBrush(Microsoft.UI.Colors.DarkGreen); - icon.Glyph = "\uE73E"; - resultName.Text = "Pass"; - } - else - { - background.Fill = new SolidColorBrush(Microsoft.UI.Colors.DarkRed); - icon.Glyph = "\uE711"; - resultName.Text = "Fail"; - } + background.Fill = new SolidColorBrush(Microsoft.UI.Colors.DarkGreen); + icon.Glyph = "\uE73E"; + resultName.Text = "Pass"; } - - public static SolidColorBrush GetSolidColorBrush(string hex) + else { - hex = hex.Replace("#", string.Empty); - byte r = (byte)(Convert.ToUInt32(hex.Substring(0, 2), 16)); - byte g = (byte)(Convert.ToUInt32(hex.Substring(2, 2), 16)); - byte b = (byte)(Convert.ToUInt32(hex.Substring(4, 2), 16)); - SolidColorBrush myBrush = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, r, g, b)); - return myBrush; + background.Fill = new SolidColorBrush(Microsoft.UI.Colors.DarkRed); + icon.Glyph = "\uE711"; + resultName.Text = "Fail"; } + } - // Find the contrast ratio: https://www.w3.org/WAI/GL/wiki/Contrast_ratio - public static double CalculateContrastRatio(Color first, Color second) - { - var relLuminanceOne = GetRelativeLuminance(first); - var relLuminanceTwo = GetRelativeLuminance(second); - return (Math.Max(relLuminanceOne, relLuminanceTwo) + 0.05) - / (Math.Min(relLuminanceOne, relLuminanceTwo) + 0.05); - } + public static SolidColorBrush GetSolidColorBrush(string hex) + { + hex = hex.Replace("#", string.Empty); + byte r = (byte)(Convert.ToUInt32(hex.Substring(0, 2), 16)); + byte g = (byte)(Convert.ToUInt32(hex.Substring(2, 2), 16)); + byte b = (byte)(Convert.ToUInt32(hex.Substring(4, 2), 16)); + SolidColorBrush myBrush = new SolidColorBrush(Microsoft.UI.ColorHelper.FromArgb(255, r, g, b)); + return myBrush; + } - // Get relative luminance: https://www.w3.org/WAI/GL/wiki/Relative_luminance - public static double GetRelativeLuminance(Color c) - { - var rSRGB = c.R / 255.0; - var gSRGB = c.G / 255.0; - var bSRGB = c.B / 255.0; + // Find the contrast ratio: https://www.w3.org/WAI/GL/wiki/Contrast_ratio + public static double CalculateContrastRatio(Color first, Color second) + { + var relLuminanceOne = GetRelativeLuminance(first); + var relLuminanceTwo = GetRelativeLuminance(second); + return (Math.Max(relLuminanceOne, relLuminanceTwo) + 0.05) + / (Math.Min(relLuminanceOne, relLuminanceTwo) + 0.05); + } - var r = rSRGB <= 0.04045 ? rSRGB / 12.92 : Math.Pow(((rSRGB + 0.055) / 1.055), 2.4); - var g = gSRGB <= 0.04045 ? gSRGB / 12.92 : Math.Pow(((gSRGB + 0.055) / 1.055), 2.4); - var b = bSRGB <= 0.04045 ? bSRGB / 12.92 : Math.Pow(((bSRGB + 0.055) / 1.055), 2.4); - return 0.2126 * r + 0.7152 * g + 0.0722 * b; - } + // Get relative luminance: https://www.w3.org/WAI/GL/wiki/Relative_luminance + public static double GetRelativeLuminance(Color c) + { + var rSRGB = c.R / 255.0; + var gSRGB = c.G / 255.0; + var bSRGB = c.B / 255.0; - private void BackgroundColorPicker_ColorChanged(object sender, Color e) - { - RecalculateContrastRatio(); - } + var r = rSRGB <= 0.04045 ? rSRGB / 12.92 : Math.Pow(((rSRGB + 0.055) / 1.055), 2.4); + var g = gSRGB <= 0.04045 ? gSRGB / 12.92 : Math.Pow(((gSRGB + 0.055) / 1.055), 2.4); + var b = bSRGB <= 0.04045 ? bSRGB / 12.92 : Math.Pow(((bSRGB + 0.055) / 1.055), 2.4); + return 0.2126 * r + 0.7152 * g + 0.0722 * b; + } - private void TextColorPicker_ColorChanged(object sender, Color e) - { - RecalculateContrastRatio(); - } + private void BackgroundColorPicker_ColorChanged(object sender, Color e) + { + RecalculateContrastRatio(); + } + + private void TextColorPicker_ColorChanged(object sender, Color e) + { + RecalculateContrastRatio(); } } diff --git a/WinUIGallery/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml.cs b/WinUIGallery/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml.cs index 78a60e6dd..71887d27d 100644 --- a/WinUIGallery/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml.cs +++ b/WinUIGallery/ControlPages/Accessibility/AccessibilityKeyboardPage.xaml.cs @@ -13,26 +13,25 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AccessibilityKeyboardPage : Page { - public sealed partial class AccessibilityKeyboardPage : Page + public AccessibilityKeyboardPage() { - public AccessibilityKeyboardPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void MakeRedButton_Click(object sender, RoutedEventArgs e) - { - ColorRectangle.Fill = new SolidColorBrush(Colors.Red); - } - private void MakeBlueButton_Click(object sender, RoutedEventArgs e) - { - ColorRectangle.Fill = new SolidColorBrush(Colors.Blue); - } - private void MakeChartreuseButton_Click(object sender, RoutedEventArgs e) - { - ColorRectangle.Fill = new SolidColorBrush(Colors.Chartreuse); - } + private void MakeRedButton_Click(object sender, RoutedEventArgs e) + { + ColorRectangle.Fill = new SolidColorBrush(Colors.Red); + } + private void MakeBlueButton_Click(object sender, RoutedEventArgs e) + { + ColorRectangle.Fill = new SolidColorBrush(Colors.Blue); + } + private void MakeChartreuseButton_Click(object sender, RoutedEventArgs e) + { + ColorRectangle.Fill = new SolidColorBrush(Colors.Chartreuse); } } diff --git a/WinUIGallery/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml.cs b/WinUIGallery/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml.cs index 971b82e26..167eed05b 100644 --- a/WinUIGallery/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml.cs +++ b/WinUIGallery/ControlPages/Accessibility/AccessibilityScreenReaderPage.xaml.cs @@ -10,13 +10,12 @@ using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AccessibilityScreenReaderPage : Page { - public sealed partial class AccessibilityScreenReaderPage : Page + public AccessibilityScreenReaderPage() { - public AccessibilityScreenReaderPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/AcrylicPage.xaml.cs b/WinUIGallery/ControlPages/AcrylicPage.xaml.cs index f187897b5..6f77d1d7f 100644 --- a/WinUIGallery/ControlPages/AcrylicPage.xaml.cs +++ b/WinUIGallery/ControlPages/AcrylicPage.xaml.cs @@ -1,53 +1,52 @@ -using System.Linq; +using System.Linq; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Shapes; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AcrylicPage : Page { - public sealed partial class AcrylicPage : Page + public AcrylicPage() + { + this.InitializeComponent(); + Loaded += AcrylicPage_Loaded; + } + + private void AcrylicPage_Loaded(object sender, RoutedEventArgs e) + { + ColorSelectorInApp.SelectedIndex = 0; + FallbackColorSelectorInApp.SelectedIndex = 0; + OpacitySliderInApp.Value = OpacitySliderLumin.Value = 0.8; + LuminositySlider.Value = 0.8; + } + + private void Slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) + { + Rectangle shape = CustomAcrylicShapeInApp; + if ((Slider)sender == OpacitySliderLumin) + shape = CustomAcrylicShapeLumin; + + ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).TintOpacity = e.NewValue; + } + + private void ColorSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + Rectangle shape = CustomAcrylicShapeInApp; + ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).TintColor = ((SolidColorBrush)e.AddedItems.First()).Color; + } + + private void FallbackColorSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + Rectangle shape = CustomAcrylicShapeInApp; + ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).FallbackColor = ((SolidColorBrush)e.AddedItems.First()).Color; + } + + private void LuminositySlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) { - public AcrylicPage() - { - this.InitializeComponent(); - Loaded += AcrylicPage_Loaded; - } - - private void AcrylicPage_Loaded(object sender, RoutedEventArgs e) - { - ColorSelectorInApp.SelectedIndex = 0; - FallbackColorSelectorInApp.SelectedIndex = 0; - OpacitySliderInApp.Value = OpacitySliderLumin.Value = 0.8; - LuminositySlider.Value = 0.8; - } - - private void Slider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) - { - Rectangle shape = CustomAcrylicShapeInApp; - if ((Slider)sender == OpacitySliderLumin) - shape = CustomAcrylicShapeLumin; - - ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).TintOpacity = e.NewValue; - } - - private void ColorSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - Rectangle shape = CustomAcrylicShapeInApp; - ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).TintColor = ((SolidColorBrush)e.AddedItems.First()).Color; - } - - private void FallbackColorSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - Rectangle shape = CustomAcrylicShapeInApp; - ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).FallbackColor = ((SolidColorBrush)e.AddedItems.First()).Color; - } - - private void LuminositySlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) - { - Rectangle shape = CustomAcrylicShapeLumin; - ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).TintLuminosityOpacity = e.NewValue; - } + Rectangle shape = CustomAcrylicShapeLumin; + ((Microsoft.UI.Xaml.Media.AcrylicBrush)shape.Fill).TintLuminosityOpacity = e.NewValue; } } diff --git a/WinUIGallery/ControlPages/AnimatedIconPage.xaml.cs b/WinUIGallery/ControlPages/AnimatedIconPage.xaml.cs index 90e0929ce..65839fa61 100644 --- a/WinUIGallery/ControlPages/AnimatedIconPage.xaml.cs +++ b/WinUIGallery/ControlPages/AnimatedIconPage.xaml.cs @@ -14,39 +14,38 @@ using Microsoft.UI.Xaml.Navigation; using Microsoft.UI.Xaml.Controls.AnimatedVisuals; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AnimatedIconPage : Page { - public sealed partial class AnimatedIconPage : Page + public AnimatedIconPage() { - public AnimatedIconPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void Button_PointerEntered(object sender, PointerRoutedEventArgs e) - { - AnimatedIcon.SetState(this.SearchAnimatedIcon, "PointerOver"); - } + private void Button_PointerEntered(object sender, PointerRoutedEventArgs e) + { + AnimatedIcon.SetState(this.SearchAnimatedIcon, "PointerOver"); + } - private void Button_PointerExited(object sender, PointerRoutedEventArgs e) - { - AnimatedIcon.SetState(this.SearchAnimatedIcon, "Normal"); - } + private void Button_PointerExited(object sender, PointerRoutedEventArgs e) + { + AnimatedIcon.SetState(this.SearchAnimatedIcon, "Normal"); + } - public static IAnimatedVisualSource2 GetAnimationSourceFromString(object selection) - { - string name = (string)selection; - switch (name) - { - case "AnimatedBackVisualSource": return new AnimatedBackVisualSource(); - case "AnimatedChevronDownSmallVisualSource": return new AnimatedChevronDownSmallVisualSource(); - case "AnimatedChevronRightDownSmallVisualSource": return new AnimatedChevronRightDownSmallVisualSource(); - case "AnimatedChevronUpDownSmallVisualSource": return new AnimatedChevronUpDownSmallVisualSource(); - case "AnimatedFindVisualSource": return new AnimatedFindVisualSource(); - case "AnimatedGlobalNavigationButtonVisualSource": return new AnimatedGlobalNavigationButtonVisualSource(); - case "AnimatedSettingsVisualSource": return new AnimatedSettingsVisualSource(); - default: return null; - } + public static IAnimatedVisualSource2 GetAnimationSourceFromString(object selection) + { + string name = (string)selection; + switch (name) + { + case "AnimatedBackVisualSource": return new AnimatedBackVisualSource(); + case "AnimatedChevronDownSmallVisualSource": return new AnimatedChevronDownSmallVisualSource(); + case "AnimatedChevronRightDownSmallVisualSource": return new AnimatedChevronRightDownSmallVisualSource(); + case "AnimatedChevronUpDownSmallVisualSource": return new AnimatedChevronUpDownSmallVisualSource(); + case "AnimatedFindVisualSource": return new AnimatedFindVisualSource(); + case "AnimatedGlobalNavigationButtonVisualSource": return new AnimatedGlobalNavigationButtonVisualSource(); + case "AnimatedSettingsVisualSource": return new AnimatedSettingsVisualSource(); + default: return null; } } } diff --git a/WinUIGallery/ControlPages/AnimatedVisualPlayerPage.xaml.cs b/WinUIGallery/ControlPages/AnimatedVisualPlayerPage.xaml.cs index 2a98ebfb9..aa40581a7 100644 --- a/WinUIGallery/ControlPages/AnimatedVisualPlayerPage.xaml.cs +++ b/WinUIGallery/ControlPages/AnimatedVisualPlayerPage.xaml.cs @@ -1,65 +1,64 @@ -using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AnimatedVisualPlayerPage : Page { - public sealed partial class AnimatedVisualPlayerPage : Page + public AnimatedVisualPlayerPage() { - public AnimatedVisualPlayerPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void PlayButton_Click(object sender, RoutedEventArgs e) - { - // Set forward playback rate. - // NOTE: This property is live, which means it takes effect even if the animation is playing. - Player.PlaybackRate = 1; - EnsurePlaying(); - } + private void PlayButton_Click(object sender, RoutedEventArgs e) + { + // Set forward playback rate. + // NOTE: This property is live, which means it takes effect even if the animation is playing. + Player.PlaybackRate = 1; + EnsurePlaying(); + } - private void PauseButton_Checked(object sender, RoutedEventArgs e) - { - // Pause the animation, if playing. - // NOTE: Pausing does not cause PlayAsync to complete. - Player.Pause(); - } + private void PauseButton_Checked(object sender, RoutedEventArgs e) + { + // Pause the animation, if playing. + // NOTE: Pausing does not cause PlayAsync to complete. + Player.Pause(); + } - private void PauseButton_Unchecked(object sender, RoutedEventArgs e) - { - // Resume playing current animation. - Player.Resume(); - } + private void PauseButton_Unchecked(object sender, RoutedEventArgs e) + { + // Resume playing current animation. + Player.Resume(); + } - private void StopButton_Click(object sender, RoutedEventArgs e) - { - // Stop the animation, which completes PlayAsync and resets to initial frame. - Player.Stop(); - PauseButton.IsChecked = false; - } + private void StopButton_Click(object sender, RoutedEventArgs e) + { + // Stop the animation, which completes PlayAsync and resets to initial frame. + Player.Stop(); + PauseButton.IsChecked = false; + } + + private void ReverseButton_Click(object sender, RoutedEventArgs e) + { + // Set reverse playback rate. + // NOTE: This property is live, which means it takes effect even if the animation is playing. + Player.PlaybackRate = -1; + EnsurePlaying(); + } - private void ReverseButton_Click(object sender, RoutedEventArgs e) + private void EnsurePlaying() + { + if (PauseButton.IsChecked.Value) { - // Set reverse playback rate. - // NOTE: This property is live, which means it takes effect even if the animation is playing. - Player.PlaybackRate = -1; - EnsurePlaying(); + // Resume playing the animation, if paused. + PauseButton.IsChecked = false; } - - private void EnsurePlaying() + else { - if (PauseButton.IsChecked.Value) - { - // Resume playing the animation, if paused. - PauseButton.IsChecked = false; - } - else + if (!Player.IsPlaying) { - if (!Player.IsPlaying) - { - // Play the animation at the currently specified playback rate. - _ = Player.PlayAsync(fromProgress: 0, toProgress: 1, looped: false); - } + // Play the animation at the currently specified playback rate. + _ = Player.PlayAsync(fromProgress: 0, toProgress: 1, looped: false); } } } diff --git a/WinUIGallery/ControlPages/AnnotatedScrollBarPage.xaml.cs b/WinUIGallery/ControlPages/AnnotatedScrollBarPage.xaml.cs index b4b6abf85..3e265ba62 100644 --- a/WinUIGallery/ControlPages/AnnotatedScrollBarPage.xaml.cs +++ b/WinUIGallery/ControlPages/AnnotatedScrollBarPage.xaml.cs @@ -14,175 +14,174 @@ using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Media; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AnnotatedScrollBarPage : Page { - public sealed partial class AnnotatedScrollBarPage : Page + // Define the number of items present in each section of the source collection. + private const int AzureCount = 32; + private const int CrimsonCount = 50; + private const int CyanCount = 8; + private const int FuchsiaCount = 70; + private const int GoldCount = 90; + + // Each item is sized 120x90 in the ItemsRepeater. + private const int ItemWidth = 120; + private const int ItemHeight = 90; + + // ItemsRepeater's ItemsSource. + public ObservableCollection ColorCollection = new ObservableCollection(); + + public AnnotatedScrollBarPage() { - // Define the number of items present in each section of the source collection. - private const int AzureCount = 32; - private const int CrimsonCount = 50; - private const int CyanCount = 8; - private const int FuchsiaCount = 70; - private const int GoldCount = 90; + this.InitializeComponent(); + this.DataContext = this; + this.Loaded += AnnotatedScrollBarPage_Loaded; - // Each item is sized 120x90 in the ItemsRepeater. - private const int ItemWidth = 120; - private const int ItemHeight = 90; + PopulateColorCollection(); + } - // ItemsRepeater's ItemsSource. - public ObservableCollection ColorCollection = new ObservableCollection(); + private void AnnotatedScrollBarPage_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + // Connect the ScrollView and AnnotatedScrollBar controls. The AnnotatedScrollBar provides + // an IScrollController implementation, while the ScrollView consumes it. + scrollView.ScrollPresenter.VerticalScrollController = annotatedScrollBar.ScrollController; + } - public AnnotatedScrollBarPage() - { - this.InitializeComponent(); - this.DataContext = this; - this.Loaded += AnnotatedScrollBarPage_Loaded; + private void AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs e) + { + // Provide a string as the tooltip content when hovering the mouse over the AnnotatedScrollBar's vertical rail. The string simply + // represents the color of the last item in the row computed from AnnotatedScrollBarDetailLabelRequestedEventArgs.ScrollOffset. + e.Content = GetOffsetLabel(e.ScrollOffset); + } - PopulateColorCollection(); - } + private void ItemsRepeater_SizeChanged(object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e) + { + // When the ItemsRepeater is resized, its items layout may change and thus require an update of + // the AnnotatedScrollBar label positions. + PopulateLabelCollection(); + } - private void AnnotatedScrollBarPage_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + private void AnnotatedScrollBarMaxHeightSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) + { + if (annotatedScrollBar != null) { - // Connect the ScrollView and AnnotatedScrollBar controls. The AnnotatedScrollBar provides - // an IScrollController implementation, while the ScrollView consumes it. - scrollView.ScrollPresenter.VerticalScrollController = annotatedScrollBar.ScrollController; + // Changing the height of the AnnotatedScrollBar to illustrate how labels + // are hidden to avoid collisions when the available room shrinks too much. + annotatedScrollBar.MaxHeight = (sender as Slider).Value; } + } - private void AnnotatedScrollBar_DetailLabelRequested(object sender, AnnotatedScrollBarDetailLabelRequestedEventArgs e) - { - // Provide a string as the tooltip content when hovering the mouse over the AnnotatedScrollBar's vertical rail. The string simply - // represents the color of the last item in the row computed from AnnotatedScrollBarDetailLabelRequestedEventArgs.ScrollOffset. - e.Content = GetOffsetLabel(e.ScrollOffset); - } + private void PopulateColorCollection() + { + SolidColorBrush solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Azure); - private void ItemsRepeater_SizeChanged(object sender, Microsoft.UI.Xaml.SizeChangedEventArgs e) + for (int colorInstance = 0; colorInstance < AzureCount; colorInstance++) { - // When the ItemsRepeater is resized, its items layout may change and thus require an update of - // the AnnotatedScrollBar label positions. - PopulateLabelCollection(); + this.ColorCollection.Add(solidColorBrush); } - private void AnnotatedScrollBarMaxHeightSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) + solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Crimson); + + for (int colorInstance = 0; colorInstance < CrimsonCount; colorInstance++) { - if (annotatedScrollBar != null) - { - // Changing the height of the AnnotatedScrollBar to illustrate how labels - // are hidden to avoid collisions when the available room shrinks too much. - annotatedScrollBar.MaxHeight = (sender as Slider).Value; - } + this.ColorCollection.Add(solidColorBrush); } - private void PopulateColorCollection() - { - SolidColorBrush solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Azure); + solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Cyan); - for (int colorInstance = 0; colorInstance < AzureCount; colorInstance++) - { - this.ColorCollection.Add(solidColorBrush); - } + for (int colorInstance = 0; colorInstance < CyanCount; colorInstance++) + { + this.ColorCollection.Add(solidColorBrush); + } - solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Crimson); + solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Fuchsia); - for (int colorInstance = 0; colorInstance < CrimsonCount; colorInstance++) - { - this.ColorCollection.Add(solidColorBrush); - } + for (int colorInstance = 0; colorInstance < FuchsiaCount; colorInstance++) + { + this.ColorCollection.Add(solidColorBrush); + } - solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Cyan); + solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Gold); - for (int colorInstance = 0; colorInstance < CyanCount; colorInstance++) - { - this.ColorCollection.Add(solidColorBrush); - } + for (int colorInstance = 0; colorInstance < GoldCount; colorInstance++) + { + this.ColorCollection.Add(solidColorBrush); + } + } - solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Fuchsia); + private void PopulateLabelCollection() + { + if (annotatedScrollBar != null) + { + // Get rid of the labels that may have been defined earlier. + annotatedScrollBar.Labels.Clear(); + + // A new label is associated with the first item of each color section. + // The offset value of a label is function of the row that item belongs to. + annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Azure", GetOffsetOfItem(0))); + annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Crimson", GetOffsetOfItem(AzureCount))); + annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Cyan", GetOffsetOfItem(AzureCount + CrimsonCount))); + annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Fuchsia", GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount))); + annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Gold", GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount + FuchsiaCount))); + } + } - for (int colorInstance = 0; colorInstance < FuchsiaCount; colorInstance++) - { - this.ColorCollection.Add(solidColorBrush); - } + private string GetOffsetLabel(double offset) + { + if (offset <= GetOffsetOfItem(AzureCount - 1)) + { + return GetItemColor(AzureCount - 1); + } + else if (offset <= GetOffsetOfItem(AzureCount + CrimsonCount - 1)) + { + return GetItemColor(AzureCount + CrimsonCount - 1); + } + else if (offset <= GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount - 1)) + { + return GetItemColor(AzureCount + CrimsonCount + CyanCount - 1); + } + else if (offset <= GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount + FuchsiaCount - 1)) + { + return GetItemColor(AzureCount + CrimsonCount + CyanCount + FuchsiaCount - 1); + } + else + { + return GetItemColor(AzureCount + CrimsonCount + CyanCount + FuchsiaCount); + } + } - solidColorBrush = new SolidColorBrush(Microsoft.UI.Colors.Gold); + private int GetOffsetOfItem(int itemIndex) + { + return ItemHeight * (itemIndex / GetItemsPerRow()); + } - for (int colorInstance = 0; colorInstance < GoldCount; colorInstance++) - { - this.ColorCollection.Add(solidColorBrush); - } + private string GetItemColor(int itemIndex) + { + if (itemIndex < AzureCount) + { + return "Azure"; } - - private void PopulateLabelCollection() + else if (itemIndex < AzureCount + CrimsonCount) { - if (annotatedScrollBar != null) - { - // Get rid of the labels that may have been defined earlier. - annotatedScrollBar.Labels.Clear(); - - // A new label is associated with the first item of each color section. - // The offset value of a label is function of the row that item belongs to. - annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Azure", GetOffsetOfItem(0))); - annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Crimson", GetOffsetOfItem(AzureCount))); - annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Cyan", GetOffsetOfItem(AzureCount + CrimsonCount))); - annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Fuchsia", GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount))); - annotatedScrollBar.Labels.Add(new AnnotatedScrollBarLabel("Gold", GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount + FuchsiaCount))); - } + return "Crimson"; } - - private string GetOffsetLabel(double offset) + else if (itemIndex < AzureCount + CrimsonCount + CyanCount) { - if (offset <= GetOffsetOfItem(AzureCount - 1)) - { - return GetItemColor(AzureCount - 1); - } - else if (offset <= GetOffsetOfItem(AzureCount + CrimsonCount - 1)) - { - return GetItemColor(AzureCount + CrimsonCount - 1); - } - else if (offset <= GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount - 1)) - { - return GetItemColor(AzureCount + CrimsonCount + CyanCount - 1); - } - else if (offset <= GetOffsetOfItem(AzureCount + CrimsonCount + CyanCount + FuchsiaCount - 1)) - { - return GetItemColor(AzureCount + CrimsonCount + CyanCount + FuchsiaCount - 1); - } - else - { - return GetItemColor(AzureCount + CrimsonCount + CyanCount + FuchsiaCount); - } + return "Cyan"; } - - private int GetOffsetOfItem(int itemIndex) + else if (itemIndex < AzureCount + CrimsonCount + CyanCount + FuchsiaCount) { - return ItemHeight * (itemIndex / GetItemsPerRow()); + return "Fuchsia"; } - - private string GetItemColor(int itemIndex) + else { - if (itemIndex < AzureCount) - { - return "Azure"; - } - else if (itemIndex < AzureCount + CrimsonCount) - { - return "Crimson"; - } - else if (itemIndex < AzureCount + CrimsonCount + CyanCount) - { - return "Cyan"; - } - else if (itemIndex < AzureCount + CrimsonCount + CyanCount + FuchsiaCount) - { - return "Fuchsia"; - } - else - { - return "Gold"; - } - } - - private int GetItemsPerRow() - { - return (itemsRepeater == null || itemsRepeater.ActualWidth == 0) ? 1 : (int) Math.Max(itemsRepeater.ActualWidth / ItemWidth, 1); + return "Gold"; } } + + private int GetItemsPerRow() + { + return (itemsRepeater == null || itemsRepeater.ActualWidth == 0) ? 1 : (int) Math.Max(itemsRepeater.ActualWidth / ItemWidth, 1); + } } diff --git a/WinUIGallery/ControlPages/AppBarButtonPage.xaml.cs b/WinUIGallery/ControlPages/AppBarButtonPage.xaml.cs index 8d34e4328..c19e570ac 100644 --- a/WinUIGallery/ControlPages/AppBarButtonPage.xaml.cs +++ b/WinUIGallery/ControlPages/AppBarButtonPage.xaml.cs @@ -13,44 +13,43 @@ using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AppBarButtonPage : Page { - public sealed partial class AppBarButtonPage : Page + public AppBarButtonPage() { - public AppBarButtonPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void AppBarButton_Click(object sender, RoutedEventArgs e) + private void AppBarButton_Click(object sender, RoutedEventArgs e) + { + if (sender is Button b) { - if (sender is Button b) - { - string name = b.Name; + string name = b.Name; - switch (name) - { - case "Button1": - Control1Output.Text = "You clicked: " + name; - UIHelper.AnnounceActionForAccessibility(Button1, Control1Output.Text, "AppBarButtonSuccessNotificationId"); - break; - case "Button2": - Control2Output.Text = "You clicked: " + name; - UIHelper.AnnounceActionForAccessibility(Button2, Control2Output.Text, "AppBarButtonSuccessNotificationId"); - break; - case "Button3": - Control3Output.Text = "You clicked: " + name; - UIHelper.AnnounceActionForAccessibility(Button3, Control3Output.Text, "AppBarButtonSuccessNotificationId"); - break; - case "Button4": - Control4Output.Text = "You clicked: " + name; - UIHelper.AnnounceActionForAccessibility(Button4, Control4Output.Text, "AppBarButtonSuccessNotificationId"); - break; - case "Button5": - Control5Output.Text = "You clicked: " + name; - UIHelper.AnnounceActionForAccessibility(Button5, Control5Output.Text, "AppBarButtonSuccessNotificationId"); - break; - } + switch (name) + { + case "Button1": + Control1Output.Text = "You clicked: " + name; + UIHelper.AnnounceActionForAccessibility(Button1, Control1Output.Text, "AppBarButtonSuccessNotificationId"); + break; + case "Button2": + Control2Output.Text = "You clicked: " + name; + UIHelper.AnnounceActionForAccessibility(Button2, Control2Output.Text, "AppBarButtonSuccessNotificationId"); + break; + case "Button3": + Control3Output.Text = "You clicked: " + name; + UIHelper.AnnounceActionForAccessibility(Button3, Control3Output.Text, "AppBarButtonSuccessNotificationId"); + break; + case "Button4": + Control4Output.Text = "You clicked: " + name; + UIHelper.AnnounceActionForAccessibility(Button4, Control4Output.Text, "AppBarButtonSuccessNotificationId"); + break; + case "Button5": + Control5Output.Text = "You clicked: " + name; + UIHelper.AnnounceActionForAccessibility(Button5, Control5Output.Text, "AppBarButtonSuccessNotificationId"); + break; } } } diff --git a/WinUIGallery/ControlPages/AppBarSeparatorPage.xaml.cs b/WinUIGallery/ControlPages/AppBarSeparatorPage.xaml.cs index 212197f68..50f85b0b1 100644 --- a/WinUIGallery/ControlPages/AppBarSeparatorPage.xaml.cs +++ b/WinUIGallery/ControlPages/AppBarSeparatorPage.xaml.cs @@ -12,13 +12,12 @@ using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages -{ - public sealed partial class AppBarSeparatorPage : Page - { - public AppBarSeparatorPage() - { - this.InitializeComponent(); - } +namespace WinUIGallery.ControlPages; + +public sealed partial class AppBarSeparatorPage : Page +{ + public AppBarSeparatorPage() + { + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/AppBarToggleButtonPage.xaml.cs b/WinUIGallery/ControlPages/AppBarToggleButtonPage.xaml.cs index 4b7e3a7df..5ab6efb64 100644 --- a/WinUIGallery/ControlPages/AppBarToggleButtonPage.xaml.cs +++ b/WinUIGallery/ControlPages/AppBarToggleButtonPage.xaml.cs @@ -12,36 +12,35 @@ using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AppBarToggleButtonPage : Page { - public sealed partial class AppBarToggleButtonPage : Page + public AppBarToggleButtonPage() { - public AppBarToggleButtonPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void AppBarButton_Click(object sender, RoutedEventArgs e) + private void AppBarButton_Click(object sender, RoutedEventArgs e) + { + if (sender is AppBarToggleButton b) { - if (sender is AppBarToggleButton b) - { - string name = b.Name; + string name = b.Name; - switch (name) - { - case "Button1": - Control1Output.Text = "IsChecked = " + b.IsChecked.ToString(); - break; - case "Button2": - Control2Output.Text = "IsChecked = " + b.IsChecked.ToString(); - break; - case "Button3": - Control3Output.Text = "IsChecked = " + b.IsChecked.ToString(); - break; - case "Button4": - Control4Output.Text = "IsChecked = " + b.IsChecked.ToString(); - break; - } + switch (name) + { + case "Button1": + Control1Output.Text = "IsChecked = " + b.IsChecked.ToString(); + break; + case "Button2": + Control2Output.Text = "IsChecked = " + b.IsChecked.ToString(); + break; + case "Button3": + Control3Output.Text = "IsChecked = " + b.IsChecked.ToString(); + break; + case "Button4": + Control4Output.Text = "IsChecked = " + b.IsChecked.ToString(); + break; } } } diff --git a/WinUIGallery/ControlPages/AutoSuggestBoxPage.xaml.cs b/WinUIGallery/ControlPages/AutoSuggestBoxPage.xaml.cs index bd0f4e89b..ad8d2a3df 100644 --- a/WinUIGallery/ControlPages/AutoSuggestBoxPage.xaml.cs +++ b/WinUIGallery/ControlPages/AutoSuggestBoxPage.xaml.cs @@ -17,263 +17,262 @@ using System.Threading.Tasks; using Microsoft.UI.Xaml.Media.Imaging; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class AutoSuggestBoxPage : Page { - public sealed partial class AutoSuggestBoxPage : Page + private List Cats = new List() { - private List Cats = new List() - { - "Abyssinian", - "Aegean", - "American Bobtail", - "American Curl", - "American Ringtail", - "American Shorthair", - "American Wirehair", - "Aphrodite Giant", - "Arabian Mau", - "Asian cat", - "Asian Semi-longhair", - "Australian Mist", - "Balinese", - "Bambino", - "Bengal", - "Birman", - "Brazilian Shorthair", - "British Longhair", - "British Shorthair", - "Burmese", - "Burmilla", - "California Spangled", - "Chantilly-Tiffany", - "Chartreux", - "Chausie", - "Colorpoint Shorthair", - "Cornish Rex", - "Cymric", - "Cyprus", - "Devon Rex", - "Donskoy", - "Dragon Li", - "Dwelf", - "Egyptian Mau", - "European Shorthair", - "Exotic Shorthair", - "Foldex", - "German Rex", - "Havana Brown", - "Highlander", - "Himalayan", - "Japanese Bobtail", - "Javanese", - "Kanaani", - "Khao Manee", - "Kinkalow", - "Korat", - "Korean Bobtail", - "Korn Ja", - "Kurilian Bobtail", - "Lambkin", - "LaPerm", - "Lykoi", - "Maine Coon", - "Manx", - "Mekong Bobtail", - "Minskin", - "Napoleon", - "Munchkin", - "Nebelung", - "Norwegian Forest Cat", - "Ocicat", - "Ojos Azules", - "Oregon Rex", - "Persian (modern)", - "Persian (traditional)", - "Peterbald", - "Pixie-bob", - "Ragamuffin", - "Ragdoll", - "Raas", - "Russian Blue", - "Russian White", - "Sam Sawet", - "Savannah", - "Scottish Fold", - "Selkirk Rex", - "Serengeti", - "Serrade Petit", - "Siamese", - "Siberian or´Siberian Forest Cat", - "Singapura", - "Snowshoe", - "Sokoke", - "Somali", - "Sphynx", - "Suphalak", - "Thai", - "Thai Lilac", - "Tonkinese", - "Toyger", - "Turkish Angora", - "Turkish Van", - "Turkish Vankedisi", - "Ukrainian Levkoy", - "Wila Krungthep", - "York Chocolate" - }; + "Abyssinian", + "Aegean", + "American Bobtail", + "American Curl", + "American Ringtail", + "American Shorthair", + "American Wirehair", + "Aphrodite Giant", + "Arabian Mau", + "Asian cat", + "Asian Semi-longhair", + "Australian Mist", + "Balinese", + "Bambino", + "Bengal", + "Birman", + "Brazilian Shorthair", + "British Longhair", + "British Shorthair", + "Burmese", + "Burmilla", + "California Spangled", + "Chantilly-Tiffany", + "Chartreux", + "Chausie", + "Colorpoint Shorthair", + "Cornish Rex", + "Cymric", + "Cyprus", + "Devon Rex", + "Donskoy", + "Dragon Li", + "Dwelf", + "Egyptian Mau", + "European Shorthair", + "Exotic Shorthair", + "Foldex", + "German Rex", + "Havana Brown", + "Highlander", + "Himalayan", + "Japanese Bobtail", + "Javanese", + "Kanaani", + "Khao Manee", + "Kinkalow", + "Korat", + "Korean Bobtail", + "Korn Ja", + "Kurilian Bobtail", + "Lambkin", + "LaPerm", + "Lykoi", + "Maine Coon", + "Manx", + "Mekong Bobtail", + "Minskin", + "Napoleon", + "Munchkin", + "Nebelung", + "Norwegian Forest Cat", + "Ocicat", + "Ojos Azules", + "Oregon Rex", + "Persian (modern)", + "Persian (traditional)", + "Peterbald", + "Pixie-bob", + "Ragamuffin", + "Ragdoll", + "Raas", + "Russian Blue", + "Russian White", + "Sam Sawet", + "Savannah", + "Scottish Fold", + "Selkirk Rex", + "Serengeti", + "Serrade Petit", + "Siamese", + "Siberian or´Siberian Forest Cat", + "Singapura", + "Snowshoe", + "Sokoke", + "Somali", + "Sphynx", + "Suphalak", + "Thai", + "Thai Lilac", + "Tonkinese", + "Toyger", + "Turkish Angora", + "Turkish Van", + "Turkish Vankedisi", + "Ukrainian Levkoy", + "Wila Krungthep", + "York Chocolate" + }; - public AutoSuggestBoxPage() - { - this.InitializeComponent(); - } + public AutoSuggestBoxPage() + { + this.InitializeComponent(); + } - private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) + private void AutoSuggestBox_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) + { + // Since selecting an item will also change the text, + // only listen to changes caused by user entering text. + if(args.Reason == AutoSuggestionBoxTextChangeReason.UserInput) { - // Since selecting an item will also change the text, - // only listen to changes caused by user entering text. - if(args.Reason == AutoSuggestionBoxTextChangeReason.UserInput) + var suitableItems = new List(); + var splitText = sender.Text.ToLower().Split(" "); + foreach(var cat in Cats) { - var suitableItems = new List(); - var splitText = sender.Text.ToLower().Split(" "); - foreach(var cat in Cats) + var found = splitText.All((key)=> { - var found = splitText.All((key)=> - { - return cat.ToLower().Contains(key); - }); - if(found) - { - suitableItems.Add(cat); - } - } - if(suitableItems.Count == 0) + return cat.ToLower().Contains(key); + }); + if(found) { - suitableItems.Add("No results found"); + suitableItems.Add(cat); } - sender.ItemsSource = suitableItems; } + if(suitableItems.Count == 0) + { + suitableItems.Add("No results found"); + } + sender.ItemsSource = suitableItems; } + } - private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) - { - SuggestionOutput.Text = args.SelectedItem.ToString(); - } + private void AutoSuggestBox_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) + { + SuggestionOutput.Text = args.SelectedItem.ToString(); + } - /// - /// This event gets fired anytime the text in the TextBox gets updated. - /// It is recommended to check the reason for the text changing by checking against args.Reason - /// - /// The AutoSuggestBox whose text got changed. - /// The event arguments. - private void Control2_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) + /// + /// This event gets fired anytime the text in the TextBox gets updated. + /// It is recommended to check the reason for the text changing by checking against args.Reason + /// + /// The AutoSuggestBox whose text got changed. + /// The event arguments. + private void Control2_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) + { + //We only want to get results when it was a user typing, + //otherwise we assume the value got filled in by TextMemberPath + //or the handler for SuggestionChosen + if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput) { - //We only want to get results when it was a user typing, - //otherwise we assume the value got filled in by TextMemberPath - //or the handler for SuggestionChosen - if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput) - { - var suggestions = SearchControls(sender.Text); + var suggestions = SearchControls(sender.Text); - if (suggestions.Count > 0) - sender.ItemsSource = suggestions; - else - sender.ItemsSource = new string[] { "No results found" }; - } + if (suggestions.Count > 0) + sender.ItemsSource = suggestions; + else + sender.ItemsSource = new string[] { "No results found" }; } + } - /// - /// This event gets fired when: - /// * a user presses Enter while focus is in the TextBox - /// * a user clicks or tabs to and invokes the query button (defined using the QueryIcon API) - /// * a user presses selects (clicks/taps/presses Enter) a suggestion - /// - /// The AutoSuggestBox that fired the event. - /// The args contain the QueryText, which is the text in the TextBox, - /// and also ChosenSuggestion, which is only non-null when a user selects an item in the list. - private void Control2_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) + /// + /// This event gets fired when: + /// * a user presses Enter while focus is in the TextBox + /// * a user clicks or tabs to and invokes the query button (defined using the QueryIcon API) + /// * a user presses selects (clicks/taps/presses Enter) a suggestion + /// + /// The AutoSuggestBox that fired the event. + /// The args contain the QueryText, which is the text in the TextBox, + /// and also ChosenSuggestion, which is only non-null when a user selects an item in the list. + private void Control2_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) + { + if (args.ChosenSuggestion != null && args.ChosenSuggestion is ControlInfoDataItem) { - if (args.ChosenSuggestion != null && args.ChosenSuggestion is ControlInfoDataItem) - { - //User selected an item, take an action - SelectControl(args.ChosenSuggestion as ControlInfoDataItem); - } - else if (!string.IsNullOrEmpty(args.QueryText)) + //User selected an item, take an action + SelectControl(args.ChosenSuggestion as ControlInfoDataItem); + } + else if (!string.IsNullOrEmpty(args.QueryText)) + { + //Do a fuzzy search based on the text + var suggestions = SearchControls(sender.Text); + if(suggestions.Count > 0) { - //Do a fuzzy search based on the text - var suggestions = SearchControls(sender.Text); - if(suggestions.Count > 0) - { - SelectControl(suggestions.FirstOrDefault()); - } + SelectControl(suggestions.FirstOrDefault()); } } + } - /// - /// This event gets fired as the user keys through the list, or taps on a suggestion. - /// This allows you to change the text in the TextBox to reflect the item in the list. - /// Alternatively you can use TextMemberPath. - /// - /// The AutoSuggestBox that fired the event. - /// The args contain SelectedItem, which contains the data item of the item that is currently highlighted. - private void Control2_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) + /// + /// This event gets fired as the user keys through the list, or taps on a suggestion. + /// This allows you to change the text in the TextBox to reflect the item in the list. + /// Alternatively you can use TextMemberPath. + /// + /// The AutoSuggestBox that fired the event. + /// The args contain SelectedItem, which contains the data item of the item that is currently highlighted. + private void Control2_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args) + { + //Don't autocomplete the TextBox when we are showing "no results" + if (args.SelectedItem is ControlInfoDataItem control) { - //Don't autocomplete the TextBox when we are showing "no results" - if (args.SelectedItem is ControlInfoDataItem control) - { - sender.Text = control.Title; - } + sender.Text = control.Title; } + } - /// - /// This - /// - /// - private void SelectControl(ControlInfoDataItem control) + /// + /// This + /// + /// + private void SelectControl(ControlInfoDataItem control) + { + if (control != null) { - if (control != null) - { - ControlDetails.Visibility = Visibility.Visible; + ControlDetails.Visibility = Visibility.Visible; - BitmapImage image = control.IconGlyph == null? null : new BitmapImage(new Uri(control.IconGlyph)); - ControlImage.Source = image; + BitmapImage image = control.IconGlyph == null? null : new BitmapImage(new Uri(control.IconGlyph)); + ControlImage.Source = image; - ControlTitle.Text = control.Title; - ControlSubtitle.Text = control.Subtitle; - } + ControlTitle.Text = control.Title; + ControlSubtitle.Text = control.Subtitle; } + } - private List SearchControls(string query) - { - var suggestions = new List(); + private List SearchControls(string query) + { + var suggestions = new List(); - var querySplit = query.Split(" "); - foreach (var group in ControlInfoDataSource.Instance.Groups) - { - var matchingItems = group.Items.Where( - item => + var querySplit = query.Split(" "); + foreach (var group in ControlInfoDataSource.Instance.Groups) + { + var matchingItems = group.Items.Where( + item => + { + // Idea: check for every word entered (separated by space) if it is in the name, + // e.g. for query "split button" the only result should "SplitButton" since its the only query to contain "split" and "button" + // If any of the sub tokens is not in the string, we ignore the item. So the search gets more precise with more words + bool flag = item.IncludedInBuild; + foreach (string queryToken in querySplit) { - // Idea: check for every word entered (separated by space) if it is in the name, - // e.g. for query "split button" the only result should "SplitButton" since its the only query to contain "split" and "button" - // If any of the sub tokens is not in the string, we ignore the item. So the search gets more precise with more words - bool flag = item.IncludedInBuild; - foreach (string queryToken in querySplit) + // Check if token is not in string + if (item.Title.IndexOf(queryToken, StringComparison.CurrentCultureIgnoreCase) < 0) { - // Check if token is not in string - if (item.Title.IndexOf(queryToken, StringComparison.CurrentCultureIgnoreCase) < 0) - { - // Token is not in string, so we ignore this item. - flag = false; - } + // Token is not in string, so we ignore this item. + flag = false; } - return flag; - }); - foreach (var item in matchingItems) - { - suggestions.Add(item); - } + } + return flag; + }); + foreach (var item in matchingItems) + { + suggestions.Add(item); } - return suggestions.OrderByDescending(i => i.Title.StartsWith(query, StringComparison.CurrentCultureIgnoreCase)).ThenBy(i => i.Title).ToList(); } + return suggestions.OrderByDescending(i => i.Title.StartsWith(query, StringComparison.CurrentCultureIgnoreCase)).ThenBy(i => i.Title).ToList(); } } diff --git a/WinUIGallery/ControlPages/BorderPage.xaml.cs b/WinUIGallery/ControlPages/BorderPage.xaml.cs index fa159cf54..83144f4c4 100644 --- a/WinUIGallery/ControlPages/BorderPage.xaml.cs +++ b/WinUIGallery/ControlPages/BorderPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -13,63 +13,62 @@ using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Media; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class BorderPage : Page { - public sealed partial class BorderPage : Page + public BorderPage() { - public BorderPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void ThicknessSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) - { - if (Control1 != null) Control1.BorderThickness = new Thickness(e.NewValue); - } + private void ThicknessSlider_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) + { + if (Control1 != null) Control1.BorderThickness = new Thickness(e.NewValue); + } - private void BGRadioButton_Checked(object sender, RoutedEventArgs e) + private void BGRadioButton_Checked(object sender, RoutedEventArgs e) + { + if (sender is RadioButton rb && Control1 != null) { - if (sender is RadioButton rb && Control1 != null) + string colorName = rb.Content.ToString(); + switch (colorName) { - string colorName = rb.Content.ToString(); - switch (colorName) - { - case "Yellow": - Control1.Background = new SolidColorBrush(Colors.Yellow); - break; - case "Green": - Control1.Background = new SolidColorBrush(Colors.Green); - break; - case "Blue": - Control1.Background = new SolidColorBrush(Colors.Blue); - break; - case "White": - Control1.Background = new SolidColorBrush(Colors.White); - break; - } + case "Yellow": + Control1.Background = new SolidColorBrush(Colors.Yellow); + break; + case "Green": + Control1.Background = new SolidColorBrush(Colors.Green); + break; + case "Blue": + Control1.Background = new SolidColorBrush(Colors.Blue); + break; + case "White": + Control1.Background = new SolidColorBrush(Colors.White); + break; } } + } - private void RadioButton_Checked(object sender, RoutedEventArgs e) + private void RadioButton_Checked(object sender, RoutedEventArgs e) + { + if (sender is RadioButton rb && Control1 != null) { - if (sender is RadioButton rb && Control1 != null) + string colorName = rb.Content.ToString(); + switch (colorName) { - string colorName = rb.Content.ToString(); - switch (colorName) - { - case "Yellow": - Control1.BorderBrush = new SolidColorBrush(Colors.Gold); - break; - case "Green": - Control1.BorderBrush = new SolidColorBrush(Colors.DarkGreen); - break; - case "Blue": - Control1.BorderBrush = new SolidColorBrush(Colors.DarkBlue); - break; - case "White": - Control1.BorderBrush = new SolidColorBrush(Colors.White); - break; - } + case "Yellow": + Control1.BorderBrush = new SolidColorBrush(Colors.Gold); + break; + case "Green": + Control1.BorderBrush = new SolidColorBrush(Colors.DarkGreen); + break; + case "Blue": + Control1.BorderBrush = new SolidColorBrush(Colors.DarkBlue); + break; + case "White": + Control1.BorderBrush = new SolidColorBrush(Colors.White); + break; } } } diff --git a/WinUIGallery/ControlPages/BreadcrumbBarPage.xaml.cs b/WinUIGallery/ControlPages/BreadcrumbBarPage.xaml.cs index 4d3c09137..a0b0b25da 100644 --- a/WinUIGallery/ControlPages/BreadcrumbBarPage.xaml.cs +++ b/WinUIGallery/ControlPages/BreadcrumbBarPage.xaml.cs @@ -3,50 +3,49 @@ using Microsoft.UI.Xaml.Controls; using WinUIGallery.Helper; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class BreadcrumbBarPage : Page { - public sealed partial class BreadcrumbBarPage : Page + readonly List folders = new() { + new Folder { Name = "Home"}, + new Folder { Name = "Folder1" }, + new Folder { Name = "Folder2" }, + new Folder { Name = "Folder3" }, + }; + + public BreadcrumbBarPage() { - readonly List folders = new() { - new Folder { Name = "Home"}, - new Folder { Name = "Folder1" }, - new Folder { Name = "Folder2" }, - new Folder { Name = "Folder3" }, - }; - - public BreadcrumbBarPage() - { - this.InitializeComponent(); - BreadcrumbBar1.ItemsSource = new string[] { "Home", "Documents", "Design", "Northwind", "Images", "Folder1", "Folder2", "Folder3" }; + this.InitializeComponent(); + BreadcrumbBar1.ItemsSource = new string[] { "Home", "Documents", "Design", "Northwind", "Images", "Folder1", "Folder2", "Folder3" }; - BreadcrumbBar2.ItemsSource = new ObservableCollection(folders); - BreadcrumbBar2.ItemClicked += BreadcrumbBar2_ItemClicked; - } + BreadcrumbBar2.ItemsSource = new ObservableCollection(folders); + BreadcrumbBar2.ItemClicked += BreadcrumbBar2_ItemClicked; + } - private void BreadcrumbBar2_ItemClicked(BreadcrumbBar sender, BreadcrumbBarItemClickedEventArgs args) + private void BreadcrumbBar2_ItemClicked(BreadcrumbBar sender, BreadcrumbBarItemClickedEventArgs args) + { + var items = BreadcrumbBar2.ItemsSource as ObservableCollection; + for (int i = items.Count - 1; i >= args.Index + 1; i--) { - var items = BreadcrumbBar2.ItemsSource as ObservableCollection; - for (int i = items.Count - 1; i >= args.Index + 1; i--) - { - items.RemoveAt(i); - } + items.RemoveAt(i); } + } - private void ResetSampleButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + private void ResetSampleButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + var items = BreadcrumbBar2.ItemsSource as ObservableCollection; + for (int i = items.Count; i < folders.Count; i++) { - var items = BreadcrumbBar2.ItemsSource as ObservableCollection; - for (int i = items.Count; i < folders.Count; i++) - { - items.Add(folders[i]); - } - - // Announce reset success notifiication. - UIHelper.AnnounceActionForAccessibility(ResetSampleBtn, "BreadcrumbBar sample reset successful.", "BreadCrumbBarSampleResetNotificationId"); + items.Add(folders[i]); } - } - public class Folder - { - public string Name { get; set; } + // Announce reset success notifiication. + UIHelper.AnnounceActionForAccessibility(ResetSampleBtn, "BreadcrumbBar sample reset successful.", "BreadCrumbBarSampleResetNotificationId"); } } + +public class Folder +{ + public string Name { get; set; } +} diff --git a/WinUIGallery/ControlPages/ButtonPage.xaml.cs b/WinUIGallery/ControlPages/ButtonPage.xaml.cs index 20101eb4c..91fd975e6 100644 --- a/WinUIGallery/ControlPages/ButtonPage.xaml.cs +++ b/WinUIGallery/ControlPages/ButtonPage.xaml.cs @@ -10,31 +10,30 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ButtonPage : Page { - public sealed partial class ButtonPage : Page + public ButtonPage() { - public ButtonPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void Button_Click(object sender, RoutedEventArgs e) + private void Button_Click(object sender, RoutedEventArgs e) + { + if (sender is Button b) { - if (sender is Button b) - { - string name = b.Name; + string name = b.Name; - switch (name) - { - case "Button1": - Control1Output.Text = "You clicked: " + name; - break; - case "Button2": - Control2Output.Text = "You clicked: " + name; - break; - - } + switch (name) + { + case "Button1": + Control1Output.Text = "You clicked: " + name; + break; + case "Button2": + Control2Output.Text = "You clicked: " + name; + break; + } } } diff --git a/WinUIGallery/ControlPages/CalendarDatePickerPage.xaml.cs b/WinUIGallery/ControlPages/CalendarDatePickerPage.xaml.cs index 130290016..9502e6280 100644 --- a/WinUIGallery/ControlPages/CalendarDatePickerPage.xaml.cs +++ b/WinUIGallery/ControlPages/CalendarDatePickerPage.xaml.cs @@ -1,12 +1,11 @@ -using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CalendarDatePickerPage : Page { - public sealed partial class CalendarDatePickerPage : Page + public CalendarDatePickerPage() { - public CalendarDatePickerPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/CalendarViewPage.xaml.cs b/WinUIGallery/ControlPages/CalendarViewPage.xaml.cs index 8bec4eed2..f45ec32ea 100644 --- a/WinUIGallery/ControlPages/CalendarViewPage.xaml.cs +++ b/WinUIGallery/ControlPages/CalendarViewPage.xaml.cs @@ -17,50 +17,49 @@ using Windows.UI.Popups; using WinUIGallery.Common; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CalendarViewPage : Page { - public sealed partial class CalendarViewPage : Page + public CalendarViewPage() { - public CalendarViewPage() - { - this.InitializeComponent(); + this.InitializeComponent(); - List calendarIdentifiers = new List() - { - CalendarIdentifiers.Gregorian, - CalendarIdentifiers.Hebrew, - CalendarIdentifiers.Hijri, - CalendarIdentifiers.Japanese, - CalendarIdentifiers.Julian, - CalendarIdentifiers.Korean, - CalendarIdentifiers.Persian, - CalendarIdentifiers.Taiwan, - CalendarIdentifiers.Thai, - CalendarIdentifiers.UmAlQura, - }; + List calendarIdentifiers = new List() + { + CalendarIdentifiers.Gregorian, + CalendarIdentifiers.Hebrew, + CalendarIdentifiers.Hijri, + CalendarIdentifiers.Japanese, + CalendarIdentifiers.Julian, + CalendarIdentifiers.Korean, + CalendarIdentifiers.Persian, + CalendarIdentifiers.Taiwan, + CalendarIdentifiers.Thai, + CalendarIdentifiers.UmAlQura, + }; - calendarIdentifier.ItemsSource = calendarIdentifiers; - calendarIdentifier.SelectedItem = CalendarIdentifiers.Gregorian; + calendarIdentifier.ItemsSource = calendarIdentifiers; + calendarIdentifier.SelectedItem = CalendarIdentifiers.Gregorian; - var langs = new LanguageList(); - calendarLanguages.ItemsSource = langs.Languages; - } + var langs = new LanguageList(); + calendarLanguages.ItemsSource = langs.Languages; + } - private void SelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void SelectionMode_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (Enum.TryParse((sender as ComboBox).SelectedItem.ToString(), out CalendarViewSelectionMode selectionMode)) { - if (Enum.TryParse((sender as ComboBox).SelectedItem.ToString(), out CalendarViewSelectionMode selectionMode)) - { - Control1.SelectionMode = selectionMode; - } + Control1.SelectionMode = selectionMode; } + } - private void calendarLanguages_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void calendarLanguages_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + string selectedLang = calendarLanguages.SelectedValue.ToString(); + if (Windows.Globalization.Language.IsWellFormed(selectedLang)) { - string selectedLang = calendarLanguages.SelectedValue.ToString(); - if (Windows.Globalization.Language.IsWellFormed(selectedLang)) - { - Control1.Language = selectedLang; - } + Control1.Language = selectedLang; } } } diff --git a/WinUIGallery/ControlPages/CanvasPage.xaml.cs b/WinUIGallery/ControlPages/CanvasPage.xaml.cs index 4ad17c404..205784099 100644 --- a/WinUIGallery/ControlPages/CanvasPage.xaml.cs +++ b/WinUIGallery/ControlPages/CanvasPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -22,13 +22,12 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CanvasPage : Page { - public sealed partial class CanvasPage : Page + public CanvasPage() { - public CanvasPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/CaptureElementPreviewPage.xaml.cs b/WinUIGallery/ControlPages/CaptureElementPreviewPage.xaml.cs index 3ef43a808..438f2563b 100644 --- a/WinUIGallery/ControlPages/CaptureElementPreviewPage.xaml.cs +++ b/WinUIGallery/ControlPages/CaptureElementPreviewPage.xaml.cs @@ -21,122 +21,121 @@ using WinUIGallery.Helper; using System.Threading.Tasks; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CaptureElementPreviewPage : Page, INotifyPropertyChanged { - public sealed partial class CaptureElementPreviewPage : Page, INotifyPropertyChanged + public CaptureElementPreviewPage() { - public CaptureElementPreviewPage() - { - this.InitializeComponent(); + this.InitializeComponent(); - StartCaptureElement(); + StartCaptureElement(); - // Move the ScrollViewer from the captureContainer under an ExpandToFillContainer. - // This will allow the snapshots column to use all available height without - // influencing the height. - var expandToFillContainer = new ExpandToFillContainer(); - var sv = captureContainer.Children[0]; - captureContainer.Children.Remove(sv); - captureContainer.Children.Add(expandToFillContainer); - expandToFillContainer.Children.Add(sv); + // Move the ScrollViewer from the captureContainer under an ExpandToFillContainer. + // This will allow the snapshots column to use all available height without + // influencing the height. + var expandToFillContainer = new ExpandToFillContainer(); + var sv = captureContainer.Children[0]; + captureContainer.Children.Remove(sv); + captureContainer.Children.Add(expandToFillContainer); + expandToFillContainer.Children.Add(sv); - this.Unloaded += this.CaptureElementPreviewPage_Unloaded; - } + this.Unloaded += this.CaptureElementPreviewPage_Unloaded; + } - private void CaptureElementPreviewPage_Unloaded(object sender, RoutedEventArgs e) + private void CaptureElementPreviewPage_Unloaded(object sender, RoutedEventArgs e) + { + // Needs to run as task to unblock UI thread + if (mediaCapture != null) { - // Needs to run as task to unblock UI thread - if (mediaCapture != null) - { - new Task(mediaCapture.Dispose).Start(); - } + new Task(mediaCapture.Dispose).Start(); } + } - private MediaFrameSourceGroup mediaFrameSourceGroup; - private MediaCapture mediaCapture; + private MediaFrameSourceGroup mediaFrameSourceGroup; + private MediaCapture mediaCapture; - async private void StartCaptureElement() + async private void StartCaptureElement() + { + var groups = await MediaFrameSourceGroup.FindAllAsync(); + if (groups.Count == 0) { - var groups = await MediaFrameSourceGroup.FindAllAsync(); - if (groups.Count == 0) - { - frameSourceName.Text = "No camera devices found."; - return; - } - mediaFrameSourceGroup = groups.First(); - - frameSourceName.Text = "Viewing: " + mediaFrameSourceGroup.DisplayName; - mediaCapture = new MediaCapture(); - var mediaCaptureInitializationSettings = new MediaCaptureInitializationSettings() - { - SourceGroup = this.mediaFrameSourceGroup, - SharingMode = MediaCaptureSharingMode.SharedReadOnly, - StreamingCaptureMode = StreamingCaptureMode.Video, - MemoryPreference = MediaCaptureMemoryPreference.Cpu - }; - await mediaCapture.InitializeAsync(mediaCaptureInitializationSettings); - - // Set the MediaPlayerElement's Source property to the MediaSource for the mediaCapture. - var frameSource = mediaCapture.FrameSources[this.mediaFrameSourceGroup.SourceInfos[0].Id]; - captureElement.Source = Windows.Media.Core.MediaSource.CreateFromMediaFrameSource(frameSource); + frameSourceName.Text = "No camera devices found."; + return; } + mediaFrameSourceGroup = groups.First(); + + frameSourceName.Text = "Viewing: " + mediaFrameSourceGroup.DisplayName; + mediaCapture = new MediaCapture(); + var mediaCaptureInitializationSettings = new MediaCaptureInitializationSettings() + { + SourceGroup = this.mediaFrameSourceGroup, + SharingMode = MediaCaptureSharingMode.SharedReadOnly, + StreamingCaptureMode = StreamingCaptureMode.Video, + MemoryPreference = MediaCaptureMemoryPreference.Cpu + }; + await mediaCapture.InitializeAsync(mediaCaptureInitializationSettings); + + // Set the MediaPlayerElement's Source property to the MediaSource for the mediaCapture. + var frameSource = mediaCapture.FrameSources[this.mediaFrameSourceGroup.SourceInfos[0].Id]; + captureElement.Source = Windows.Media.Core.MediaSource.CreateFromMediaFrameSource(frameSource); + } - public string MirrorTextReplacement = ""; // starts not mirrored, so no text in that case + public string MirrorTextReplacement = ""; // starts not mirrored, so no text in that case - public event PropertyChangedEventHandler PropertyChanged; + public event PropertyChangedEventHandler PropertyChanged; - public void OnPropertyChanged(string PropertyName) + public void OnPropertyChanged(string PropertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(PropertyName)); + } + + private void MirrorToggleSwitch_Toggled(object sender, RoutedEventArgs e) + { + if (mirrorSwitch.IsOn) { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(PropertyName)); + captureElement.RenderTransform = new ScaleTransform() { ScaleX = -1 }; + captureElement.RenderTransformOrigin = new Point(0.5, 0.5); + MirrorTextReplacement = + "\n" + + " // Mirror the preview\n" + + " captureElement.RenderTransform = new ScaleTransform() { ScaleX = -1 };\n" + + " captureElement.RenderTransformOrigin = new Point(0.5, 0.5);\n"; } - - private void MirrorToggleSwitch_Toggled(object sender, RoutedEventArgs e) + else { - if (mirrorSwitch.IsOn) - { - captureElement.RenderTransform = new ScaleTransform() { ScaleX = -1 }; - captureElement.RenderTransformOrigin = new Point(0.5, 0.5); - MirrorTextReplacement = - "\n" + - " // Mirror the preview\n" + - " captureElement.RenderTransform = new ScaleTransform() { ScaleX = -1 };\n" + - " captureElement.RenderTransformOrigin = new Point(0.5, 0.5);\n"; - } - else - { - captureElement.RenderTransform = null; - MirrorTextReplacement = ""; - } - OnPropertyChanged("MirrorTextReplacement"); + captureElement.RenderTransform = null; + MirrorTextReplacement = ""; } + OnPropertyChanged("MirrorTextReplacement"); + } - async private void CapturePhoto_Click(object sender, RoutedEventArgs e) - { - // Capture a photo to a stream - var imgFormat = ImageEncodingProperties.CreateJpeg(); - var stream = new InMemoryRandomAccessStream(); - await mediaCapture.CapturePhotoToStreamAsync(imgFormat, stream); - stream.Seek(0); + async private void CapturePhoto_Click(object sender, RoutedEventArgs e) + { + // Capture a photo to a stream + var imgFormat = ImageEncodingProperties.CreateJpeg(); + var stream = new InMemoryRandomAccessStream(); + await mediaCapture.CapturePhotoToStreamAsync(imgFormat, stream); + stream.Seek(0); - // Show the photo in an Image element - BitmapImage bmpImage = new BitmapImage(); - await bmpImage.SetSourceAsync(stream); - var image = new Image() { Source = bmpImage }; - snapshots.Children.Insert(0, image); + // Show the photo in an Image element + BitmapImage bmpImage = new BitmapImage(); + await bmpImage.SetSourceAsync(stream); + var image = new Image() { Source = bmpImage }; + snapshots.Children.Insert(0, image); - capturedText.Visibility = Visibility.Visible; + capturedText.Visibility = Visibility.Visible; - UIHelper.AnnounceActionForAccessibility(captureButton, "Photo successfully captured.", "CameraPreviewSampleCaptureNotificationId"); - } + UIHelper.AnnounceActionForAccessibility(captureButton, "Photo successfully captured.", "CameraPreviewSampleCaptureNotificationId"); } +} - class ExpandToFillContainer : Grid +class ExpandToFillContainer : Grid +{ + protected override Size MeasureOverride(Size availableSize) { - protected override Size MeasureOverride(Size availableSize) - { - // Measure with the minimum height so it will just expand to whatever space is available. - var desiredSize = base.MeasureOverride(new Size(availableSize.Width, 100)); - return desiredSize; - } + // Measure with the minimum height so it will just expand to whatever space is available. + var desiredSize = base.MeasureOverride(new Size(availableSize.Width, 100)); + return desiredSize; } } diff --git a/WinUIGallery/ControlPages/CheckBoxPage.xaml.cs b/WinUIGallery/ControlPages/CheckBoxPage.xaml.cs index f7ee37a9c..de7ebd81c 100644 --- a/WinUIGallery/ControlPages/CheckBoxPage.xaml.cs +++ b/WinUIGallery/ControlPages/CheckBoxPage.xaml.cs @@ -11,110 +11,109 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CheckBoxPage : Page { - public sealed partial class CheckBoxPage : Page + public CheckBoxPage() { - public CheckBoxPage() - { - this.InitializeComponent(); - Loaded += CheckBoxPage_Loaded; - } + this.InitializeComponent(); + Loaded += CheckBoxPage_Loaded; + } - void CheckBoxPage_Loaded(object sender, RoutedEventArgs e) - { - SetCheckedState(); - } + void CheckBoxPage_Loaded(object sender, RoutedEventArgs e) + { + SetCheckedState(); + } - private void TwoState_Checked(object sender, RoutedEventArgs e) - { - TwoStateOutput.Text = "You checked the box."; - } + private void TwoState_Checked(object sender, RoutedEventArgs e) + { + TwoStateOutput.Text = "You checked the box."; + } - private void TwoState_Unchecked(object sender, RoutedEventArgs e) - { - TwoStateOutput.Text = "You unchecked the box."; - } + private void TwoState_Unchecked(object sender, RoutedEventArgs e) + { + TwoStateOutput.Text = "You unchecked the box."; + } - private void ThreeState_Checked(object sender, RoutedEventArgs e) - { - ThreeStateOutput.Text = "CheckBox is checked."; - } + private void ThreeState_Checked(object sender, RoutedEventArgs e) + { + ThreeStateOutput.Text = "CheckBox is checked."; + } - private void ThreeState_Unchecked(object sender, RoutedEventArgs e) - { - ThreeStateOutput.Text = "CheckBox is unchecked."; - } + private void ThreeState_Unchecked(object sender, RoutedEventArgs e) + { + ThreeStateOutput.Text = "CheckBox is unchecked."; + } - private void ThreeState_Indeterminate(object sender, RoutedEventArgs e) - { - ThreeStateOutput.Text = "CheckBox state is indeterminate."; - } + private void ThreeState_Indeterminate(object sender, RoutedEventArgs e) + { + ThreeStateOutput.Text = "CheckBox state is indeterminate."; + } - #region SelectAllMethods - private void SelectAll_Checked(object sender, RoutedEventArgs e) - { - Option1CheckBox.IsChecked = Option2CheckBox.IsChecked = Option3CheckBox.IsChecked = true; - } + #region SelectAllMethods + private void SelectAll_Checked(object sender, RoutedEventArgs e) + { + Option1CheckBox.IsChecked = Option2CheckBox.IsChecked = Option3CheckBox.IsChecked = true; + } - private void SelectAll_Unchecked(object sender, RoutedEventArgs e) + private void SelectAll_Unchecked(object sender, RoutedEventArgs e) + { + Option1CheckBox.IsChecked = Option2CheckBox.IsChecked = Option3CheckBox.IsChecked = false; + } + + private void SelectAll_Indeterminate(object sender, RoutedEventArgs e) + { + // If the SelectAll box is checked (all options are selected), + // clicking the box will change it to its indeterminate state. + // Instead, we want to uncheck all the boxes, + // so we do this programatically. The indeterminate state should + // only be set programatically, not by the user. + + if (Option1CheckBox.IsChecked == true && + Option2CheckBox.IsChecked == true && + Option3CheckBox.IsChecked == true) { - Option1CheckBox.IsChecked = Option2CheckBox.IsChecked = Option3CheckBox.IsChecked = false; + // This will cause SelectAll_Unchecked to be executed, so + // we don't need to uncheck the other boxes here. + OptionsAllCheckBox.IsChecked = false; } + } - private void SelectAll_Indeterminate(object sender, RoutedEventArgs e) + private void SetCheckedState() + { + // Controls are null the first time this is called, so we just + // need to perform a null check on any one of the controls. + if (Option1CheckBox != null) { - // If the SelectAll box is checked (all options are selected), - // clicking the box will change it to its indeterminate state. - // Instead, we want to uncheck all the boxes, - // so we do this programatically. The indeterminate state should - // only be set programatically, not by the user. - if (Option1CheckBox.IsChecked == true && Option2CheckBox.IsChecked == true && Option3CheckBox.IsChecked == true) { - // This will cause SelectAll_Unchecked to be executed, so - // we don't need to uncheck the other boxes here. + OptionsAllCheckBox.IsChecked = true; + } + else if (Option1CheckBox.IsChecked == false && + Option2CheckBox.IsChecked == false && + Option3CheckBox.IsChecked == false) + { OptionsAllCheckBox.IsChecked = false; } - } - - private void SetCheckedState() - { - // Controls are null the first time this is called, so we just - // need to perform a null check on any one of the controls. - if (Option1CheckBox != null) + else { - if (Option1CheckBox.IsChecked == true && - Option2CheckBox.IsChecked == true && - Option3CheckBox.IsChecked == true) - { - OptionsAllCheckBox.IsChecked = true; - } - else if (Option1CheckBox.IsChecked == false && - Option2CheckBox.IsChecked == false && - Option3CheckBox.IsChecked == false) - { - OptionsAllCheckBox.IsChecked = false; - } - else - { - // Set third state (indeterminate) by setting IsChecked to null. - OptionsAllCheckBox.IsChecked = null; - } + // Set third state (indeterminate) by setting IsChecked to null. + OptionsAllCheckBox.IsChecked = null; } } + } - private void Option_Checked(object sender, RoutedEventArgs e) - { - SetCheckedState(); - } + private void Option_Checked(object sender, RoutedEventArgs e) + { + SetCheckedState(); + } - private void Option_Unchecked(object sender, RoutedEventArgs e) - { - SetCheckedState(); - } - #endregion + private void Option_Unchecked(object sender, RoutedEventArgs e) + { + SetCheckedState(); } + #endregion } diff --git a/WinUIGallery/ControlPages/ClipboardPage.xaml.cs b/WinUIGallery/ControlPages/ClipboardPage.xaml.cs index 37a68f54a..4048c645e 100644 --- a/WinUIGallery/ControlPages/ClipboardPage.xaml.cs +++ b/WinUIGallery/ControlPages/ClipboardPage.xaml.cs @@ -6,56 +6,55 @@ using Microsoft.UI.Xaml.Controls; using Windows.ApplicationModel.DataTransfer; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ClipboardPage : Page { - public sealed partial class ClipboardPage : Page - { - private string textToCopy = ""; + private string textToCopy = ""; - public ClipboardPage() - { - this.InitializeComponent(); - richEditBox.Document.SetText(Microsoft.UI.Text.TextSetOptions.None, "This text will be copied to the clipboard."); + public ClipboardPage() + { + this.InitializeComponent(); + richEditBox.Document.SetText(Microsoft.UI.Text.TextSetOptions.None, "This text will be copied to the clipboard."); - } + } - private void CopyText_Click(object sender, RoutedEventArgs args) - { - richEditBox.Document.GetText(Microsoft.UI.Text.TextGetOptions.None, out textToCopy); - var package = new DataPackage(); - package.SetText(textToCopy); - Clipboard.SetContent(package); + private void CopyText_Click(object sender, RoutedEventArgs args) + { + richEditBox.Document.GetText(Microsoft.UI.Text.TextGetOptions.None, out textToCopy); + var package = new DataPackage(); + package.SetText(textToCopy); + Clipboard.SetContent(package); - UIHelper.AnnounceActionForAccessibility(sender as Button, "Text copied to clipboard", "TextCopiedSuccessNotificationId"); + UIHelper.AnnounceActionForAccessibility(sender as Button, "Text copied to clipboard", "TextCopiedSuccessNotificationId"); - VisualStateManager.GoToState(this, "ConfirmationClipboardVisible", false); - Microsoft.UI.Dispatching.DispatcherQueue dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); + VisualStateManager.GoToState(this, "ConfirmationClipboardVisible", false); + Microsoft.UI.Dispatching.DispatcherQueue dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); - // Automatically hide the confirmation text after 2 seconds - if (dispatcherQueue != null) + // Automatically hide the confirmation text after 2 seconds + if (dispatcherQueue != null) + { + dispatcherQueue.TryEnqueue(async () => { - dispatcherQueue.TryEnqueue(async () => - { - await Task.Delay(2000); - VisualStateManager.GoToState(this, "ConfirmationClipboardCollapsed", false); - }); - } - + await Task.Delay(2000); + VisualStateManager.GoToState(this, "ConfirmationClipboardCollapsed", false); + }); } - private async void PasteText_Click(object sender, RoutedEventArgs args) - { - var package = Clipboard.GetContent(); - if (package.Contains(StandardDataFormats.Text)) - { - var text = await package.GetTextAsync(); - PasteClipboard2.Text = text; + } - UIHelper.AnnounceActionForAccessibility(sender as Button, "Text pasted from clipboard", "TextPastedSuccessNotificationId"); - } + private async void PasteText_Click(object sender, RoutedEventArgs args) + { + var package = Clipboard.GetContent(); + if (package.Contains(StandardDataFormats.Text)) + { + var text = await package.GetTextAsync(); + PasteClipboard2.Text = text; + UIHelper.AnnounceActionForAccessibility(sender as Button, "Text pasted from clipboard", "TextPastedSuccessNotificationId"); } } + } diff --git a/WinUIGallery/ControlPages/ColorPickerPage.xaml.cs b/WinUIGallery/ControlPages/ColorPickerPage.xaml.cs index af691d1eb..6eab918a3 100644 --- a/WinUIGallery/ControlPages/ColorPickerPage.xaml.cs +++ b/WinUIGallery/ControlPages/ColorPickerPage.xaml.cs @@ -1,25 +1,24 @@ using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ColorPickerPage : Page { - public sealed partial class ColorPickerPage : Page + public ColorPickerPage() { - public ColorPickerPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void ColorSpectrumShapeRadioButtons_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void ColorSpectrumShapeRadioButtons_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + switch(ColorSpectrumShapeRadioButtons.SelectedItem) { - switch(ColorSpectrumShapeRadioButtons.SelectedItem) - { - case "Box": - colorPicker.ColorSpectrumShape = Microsoft.UI.Xaml.Controls.ColorSpectrumShape.Box; - break; - default: - colorPicker.ColorSpectrumShape = Microsoft.UI.Xaml.Controls.ColorSpectrumShape.Ring; - break; - } + case "Box": + colorPicker.ColorSpectrumShape = Microsoft.UI.Xaml.Controls.ColorSpectrumShape.Box; + break; + default: + colorPicker.ColorSpectrumShape = Microsoft.UI.Xaml.Controls.ColorSpectrumShape.Ring; + break; } } } diff --git a/WinUIGallery/ControlPages/ComboBoxPage.xaml.cs b/WinUIGallery/ControlPages/ComboBoxPage.xaml.cs index 8f5f07f3a..84d23bf39 100644 --- a/WinUIGallery/ControlPages/ComboBoxPage.xaml.cs +++ b/WinUIGallery/ControlPages/ComboBoxPage.xaml.cs @@ -15,108 +15,107 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; -namespace WinUIGallery.ControlPages -{ - public sealed partial class ComboBoxPage : Page - { - public List> Fonts { get; } = new List>() - { - new Tuple("Arial", new FontFamily("Arial")), - new Tuple("Comic Sans MS", new FontFamily("Comic Sans MS")), - new Tuple("Courier New", new FontFamily("Courier New")), - new Tuple("Segoe UI", new FontFamily("Segoe UI")), - new Tuple("Times New Roman", new FontFamily("Times New Roman")) - }; - - public List FontSizes { get; } = new List() - { - 8, - 9, - 10, - 11, - 12, - 14, - 16, - 18, - 20, - 24, - 28, - 36, - 48, - 72 - }; +namespace WinUIGallery.ControlPages; - public ComboBoxPage() +public sealed partial class ComboBoxPage : Page +{ + public List> Fonts { get; } = new List>() { - this.InitializeComponent(); - } + new Tuple("Arial", new FontFamily("Arial")), + new Tuple("Comic Sans MS", new FontFamily("Comic Sans MS")), + new Tuple("Courier New", new FontFamily("Courier New")), + new Tuple("Segoe UI", new FontFamily("Segoe UI")), + new Tuple("Times New Roman", new FontFamily("Times New Roman")) + }; - private void ColorComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + public List FontSizes { get; } = new List() { - string colorName = e.AddedItems[0].ToString(); - Windows.UI.Color color; - switch (colorName) - { - case "Yellow": - color = Colors.Yellow; - break; - case "Green": - color = Colors.Green; - break; - case "Blue": - color = Colors.Blue; - break; - case "Red": - color = Colors.Red; - break; - default: - throw new Exception($"Invalid argument: {colorName}"); - } - Control1Output.Fill = new SolidColorBrush(color); - } + 8, + 9, + 10, + 11, + 12, + 14, + 16, + 18, + 20, + 24, + 28, + 36, + 48, + 72 + }; - private void Combo2_Loaded(object sender, RoutedEventArgs e) + public ComboBoxPage() + { + this.InitializeComponent(); + } + + private void ColorComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + string colorName = e.AddedItems[0].ToString(); + Windows.UI.Color color; + switch (colorName) { - Combo2.SelectedIndex = 2; + case "Yellow": + color = Colors.Yellow; + break; + case "Green": + color = Colors.Green; + break; + case "Blue": + color = Colors.Blue; + break; + case "Red": + color = Colors.Red; + break; + default: + throw new Exception($"Invalid argument: {colorName}"); } + Control1Output.Fill = new SolidColorBrush(color); + } - private void Combo3_Loaded(object sender, RoutedEventArgs e) - { - Combo3.SelectedIndex = 2; + private void Combo2_Loaded(object sender, RoutedEventArgs e) + { + Combo2.SelectedIndex = 2; + } - if ((ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))) - { - Combo3.TextSubmitted += Combo3_TextSubmitted; - } - } + private void Combo3_Loaded(object sender, RoutedEventArgs e) + { + Combo3.SelectedIndex = 2; - private void Combo3_TextSubmitted(ComboBox sender, ComboBoxTextSubmittedEventArgs args) + if ((ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))) { - bool isDouble = double.TryParse(sender.Text, out double newValue); + Combo3.TextSubmitted += Combo3_TextSubmitted; + } + } - // Set the selected item if: - // - The value successfully parsed to double AND - // - The value is in the list of sizes OR is a custom value between 8 and 100 - if (isDouble && (FontSizes.Contains(newValue) || (newValue < 100 && newValue > 8))) - { - // Update the SelectedItem to the new value. - sender.SelectedItem = newValue; - } - else - { - // If the item is invalid, reject it and revert the text. - sender.Text = sender.SelectedValue.ToString(); + private void Combo3_TextSubmitted(ComboBox sender, ComboBoxTextSubmittedEventArgs args) + { + bool isDouble = double.TryParse(sender.Text, out double newValue); - var dialog = new ContentDialog(); - dialog.Content = "The font size must be a number between 8 and 100."; - dialog.CloseButtonText = "Close"; - dialog.DefaultButton = ContentDialogButton.Close; - dialog.XamlRoot = sender.XamlRoot; - _ = dialog.ShowAsync(); - } + // Set the selected item if: + // - The value successfully parsed to double AND + // - The value is in the list of sizes OR is a custom value between 8 and 100 + if (isDouble && (FontSizes.Contains(newValue) || (newValue < 100 && newValue > 8))) + { + // Update the SelectedItem to the new value. + sender.SelectedItem = newValue; + } + else + { + // If the item is invalid, reject it and revert the text. + sender.Text = sender.SelectedValue.ToString(); - // Mark the event as handled so the framework doesn’t update the selected item automatically. - args.Handled = true; + var dialog = new ContentDialog(); + dialog.Content = "The font size must be a number between 8 and 100."; + dialog.CloseButtonText = "Close"; + dialog.DefaultButton = ContentDialogButton.Close; + dialog.XamlRoot = sender.XamlRoot; + _ = dialog.ShowAsync(); } + + // Mark the event as handled so the framework doesn’t update the selected item automatically. + args.Handled = true; } } diff --git a/WinUIGallery/ControlPages/CommandBarFlyoutPage.xaml.cs b/WinUIGallery/ControlPages/CommandBarFlyoutPage.xaml.cs index 8d990773e..100ba1e02 100644 --- a/WinUIGallery/ControlPages/CommandBarFlyoutPage.xaml.cs +++ b/WinUIGallery/ControlPages/CommandBarFlyoutPage.xaml.cs @@ -5,50 +5,49 @@ using Microsoft.UI.Xaml.Input; using Microsoft.UI.Xaml.Media; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CommandBarFlyoutPage : Page { - public sealed partial class CommandBarFlyoutPage : Page + public CommandBarFlyoutPage() { - public CommandBarFlyoutPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void OnElementClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) - { - // Do custom logic - SelectedOptionText.Text = "You clicked: " + (sender as AppBarButton).Label; - } + private void OnElementClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + // Do custom logic + SelectedOptionText.Text = "You clicked: " + (sender as AppBarButton).Label; + } - private void ShowMenu(bool isTransient) + private void ShowMenu(bool isTransient) + { + if(ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) { - if(ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) - { - FlyoutShowOptions myOption = new FlyoutShowOptions - { - ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard, - Placement = FlyoutPlacementMode.RightEdgeAlignedTop - }; - CommandBarFlyout1.ShowAt(Image1, myOption); - } - else + FlyoutShowOptions myOption = new FlyoutShowOptions { - CommandBarFlyout1.ShowAt(Image1); - } + ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard, + Placement = FlyoutPlacementMode.RightEdgeAlignedTop + }; + CommandBarFlyout1.ShowAt(Image1, myOption); } - - private void MyImageButton_ContextRequested(Microsoft.UI.Xaml.UIElement sender, ContextRequestedEventArgs args) - { - // Show a context menu in standard mode - // Focus will move to the menu - ShowMenu(false); + else + { + CommandBarFlyout1.ShowAt(Image1); } + } - private void MyImageButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) - { - // Show a context menu in transient mode - // Focus will not move to the menu - ShowMenu(true); - } + private void MyImageButton_ContextRequested(Microsoft.UI.Xaml.UIElement sender, ContextRequestedEventArgs args) + { + // Show a context menu in standard mode + // Focus will move to the menu + ShowMenu(false); + } + + private void MyImageButton_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + // Show a context menu in transient mode + // Focus will not move to the menu + ShowMenu(true); } } diff --git a/WinUIGallery/ControlPages/CommandBarPage.xaml.cs b/WinUIGallery/ControlPages/CommandBarPage.xaml.cs index 59455624d..da304f0df 100644 --- a/WinUIGallery/ControlPages/CommandBarPage.xaml.cs +++ b/WinUIGallery/ControlPages/CommandBarPage.xaml.cs @@ -12,149 +12,148 @@ using Microsoft.UI.Xaml.Navigation; using System.ComponentModel; -namespace WinUIGallery.ControlPages -{ - public sealed partial class CommandBarPage : Page, INotifyPropertyChanged - { - private bool multipleButtons = false; - - public bool MultipleButtons - { - get - { - return multipleButtons; - } - set - { - multipleButtons = value; - OnPropertyChanged("MultipleButtons"); - } - } +namespace WinUIGallery.ControlPages; - public event PropertyChangedEventHandler PropertyChanged; +public sealed partial class CommandBarPage : Page, INotifyPropertyChanged +{ + private bool multipleButtons = false; - public void OnPropertyChanged(string PropertyName) + public bool MultipleButtons + { + get { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(PropertyName)); + return multipleButtons; } - - public CommandBarPage() + set { - this.InitializeComponent(); - AddKeyboardAccelerators(); + multipleButtons = value; + OnPropertyChanged("MultipleButtons"); } + } - private void OpenButton_Click(object sender, RoutedEventArgs e) - { - PrimaryCommandBar.IsOpen = true; - PrimaryCommandBar.IsSticky = true; - } + public event PropertyChangedEventHandler PropertyChanged; - private void CloseButton_Click(object sender, RoutedEventArgs e) - { - PrimaryCommandBar.IsOpen = false; - PrimaryCommandBar.IsSticky = false; - } + public void OnPropertyChanged(string PropertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(PropertyName)); + } - private void OnElementClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) - { - SelectedOptionText.Text = "You clicked: " + (sender as AppBarButton).Label; - } + public CommandBarPage() + { + this.InitializeComponent(); + AddKeyboardAccelerators(); + } - private void AddSecondaryCommands_Click(object sender, RoutedEventArgs e) - { - // Add compact button to the command bar. It provides functionality specific - // to this page, and is removed when leaving the page. + private void OpenButton_Click(object sender, RoutedEventArgs e) + { + PrimaryCommandBar.IsOpen = true; + PrimaryCommandBar.IsSticky = true; + } - if (PrimaryCommandBar.SecondaryCommands.Count == 1) - { - var newButton = new AppBarButton(); - newButton.Icon = new SymbolIcon(Symbol.Add); - newButton.Label = "Button 1"; - newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() - { - Key = Windows.System.VirtualKey.N, - Modifiers = Windows.System.VirtualKeyModifiers.Control - }); - PrimaryCommandBar.SecondaryCommands.Add(newButton); - - newButton = new AppBarButton - { - Icon = new SymbolIcon(Symbol.Delete), - Label = "Button 2" - }; - PrimaryCommandBar.SecondaryCommands.Add(newButton); - newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() - { - Key = Windows.System.VirtualKey.Delete - }); - PrimaryCommandBar.SecondaryCommands.Add(new AppBarSeparator()); - - newButton = new AppBarButton(); - newButton.Icon = new SymbolIcon(Symbol.FontDecrease); - newButton.Label = "Button 3"; - newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() - { - Key = Windows.System.VirtualKey.Subtract, - Modifiers = Windows.System.VirtualKeyModifiers.Control - }); - PrimaryCommandBar.SecondaryCommands.Add(newButton); - - newButton = new AppBarButton(); - newButton.Icon = new SymbolIcon(Symbol.FontIncrease); - newButton.Label = "Button 4"; - newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() - { - Key = Windows.System.VirtualKey.Add, - Modifiers = Windows.System.VirtualKeyModifiers.Control - }); - PrimaryCommandBar.SecondaryCommands.Add(newButton); - - } - MultipleButtons = true; - } + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + PrimaryCommandBar.IsOpen = false; + PrimaryCommandBar.IsSticky = false; + } - private void RemoveSecondaryCommands_Click(object sender, RoutedEventArgs e) - { - RemoveSecondaryCommands(); - } + private void OnElementClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + SelectedOptionText.Text = "You clicked: " + (sender as AppBarButton).Label; + } - protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) - { - RemoveSecondaryCommands(); - base.OnNavigatingFrom(e); - } + private void AddSecondaryCommands_Click(object sender, RoutedEventArgs e) + { + // Add compact button to the command bar. It provides functionality specific + // to this page, and is removed when leaving the page. - private void RemoveSecondaryCommands() + if (PrimaryCommandBar.SecondaryCommands.Count == 1) { - while (PrimaryCommandBar.SecondaryCommands.Count > 1) + var newButton = new AppBarButton(); + newButton.Icon = new SymbolIcon(Symbol.Add); + newButton.Label = "Button 1"; + newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() { - PrimaryCommandBar.SecondaryCommands.RemoveAt(PrimaryCommandBar.SecondaryCommands.Count - 1); - } - MultipleButtons = false; - } - + Key = Windows.System.VirtualKey.N, + Modifiers = Windows.System.VirtualKeyModifiers.Control + }); + PrimaryCommandBar.SecondaryCommands.Add(newButton); - private void AddKeyboardAccelerators() - { - editButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + newButton = new AppBarButton { - Key = Windows.System.VirtualKey.E, - Modifiers = Windows.System.VirtualKeyModifiers.Control + Icon = new SymbolIcon(Symbol.Delete), + Label = "Button 2" + }; + PrimaryCommandBar.SecondaryCommands.Add(newButton); + newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + { + Key = Windows.System.VirtualKey.Delete }); + PrimaryCommandBar.SecondaryCommands.Add(new AppBarSeparator()); - shareButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + newButton = new AppBarButton(); + newButton.Icon = new SymbolIcon(Symbol.FontDecrease); + newButton.Label = "Button 3"; + newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() { - Key = Windows.System.VirtualKey.F4 + Key = Windows.System.VirtualKey.Subtract, + Modifiers = Windows.System.VirtualKeyModifiers.Control }); + PrimaryCommandBar.SecondaryCommands.Add(newButton); - addButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + newButton = new AppBarButton(); + newButton.Icon = new SymbolIcon(Symbol.FontIncrease); + newButton.Label = "Button 4"; + newButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() { - Key = Windows.System.VirtualKey.A, + Key = Windows.System.VirtualKey.Add, Modifiers = Windows.System.VirtualKeyModifiers.Control }); + PrimaryCommandBar.SecondaryCommands.Add(newButton); + + } + MultipleButtons = true; + } + + private void RemoveSecondaryCommands_Click(object sender, RoutedEventArgs e) + { + RemoveSecondaryCommands(); + } + + protected override void OnNavigatingFrom(NavigatingCancelEventArgs e) + { + RemoveSecondaryCommands(); + base.OnNavigatingFrom(e); + } + private void RemoveSecondaryCommands() + { + while (PrimaryCommandBar.SecondaryCommands.Count > 1) + { + PrimaryCommandBar.SecondaryCommands.RemoveAt(PrimaryCommandBar.SecondaryCommands.Count - 1); } + MultipleButtons = false; + } + + + private void AddKeyboardAccelerators() + { + editButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + { + Key = Windows.System.VirtualKey.E, + Modifiers = Windows.System.VirtualKeyModifiers.Control + }); + + shareButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + { + Key = Windows.System.VirtualKey.F4 + }); + + addButton.KeyboardAccelerators.Add(new Microsoft.UI.Xaml.Input.KeyboardAccelerator() + { + Key = Windows.System.VirtualKey.A, + Modifiers = Windows.System.VirtualKeyModifiers.Control + }); } + } diff --git a/WinUIGallery/ControlPages/CompactSizingPage.xaml.cs b/WinUIGallery/ControlPages/CompactSizingPage.xaml.cs index c3ad3e8fa..bcdfeecd3 100644 --- a/WinUIGallery/ControlPages/CompactSizingPage.xaml.cs +++ b/WinUIGallery/ControlPages/CompactSizingPage.xaml.cs @@ -3,45 +3,44 @@ using Microsoft.UI.Xaml.Media.Animation; using WinUIGallery.SamplePages; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CompactSizingPage : Page { - public sealed partial class CompactSizingPage : Page + public CompactSizingPage() { - public CompactSizingPage() - { - this.InitializeComponent(); + this.InitializeComponent(); - } + } - private void Example1_Loaded(object sender, RoutedEventArgs e) - { - ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo()); - } + private void Example1_Loaded(object sender, RoutedEventArgs e) + { + ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo()); + } - private void Standard_Checked(object sender, RoutedEventArgs e) - { - var oldPage = ContentFrame.Content as SampleCompactSizingPage; + private void Standard_Checked(object sender, RoutedEventArgs e) + { + var oldPage = ContentFrame.Content as SampleCompactSizingPage; - ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo()); + ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo()); - if (oldPage != null) - { - var page = ContentFrame.Content as SampleStandardSizingPage; - page.CopyState(oldPage); - } + if (oldPage != null) + { + var page = ContentFrame.Content as SampleStandardSizingPage; + page.CopyState(oldPage); } + } - private void Compact_Checked(object sender, RoutedEventArgs e) - { - var oldPage = ContentFrame.Content as SampleStandardSizingPage; + private void Compact_Checked(object sender, RoutedEventArgs e) + { + var oldPage = ContentFrame.Content as SampleStandardSizingPage; - ContentFrame.Navigate(typeof(SampleCompactSizingPage), null, new SuppressNavigationTransitionInfo()); + ContentFrame.Navigate(typeof(SampleCompactSizingPage), null, new SuppressNavigationTransitionInfo()); - if (oldPage != null) - { - var page = ContentFrame.Content as SampleCompactSizingPage; - page.CopyState(oldPage); - } + if (oldPage != null) + { + var page = ContentFrame.Content as SampleCompactSizingPage; + page.CopyState(oldPage); } } } diff --git a/WinUIGallery/ControlPages/ConnectedAnimationPage.xaml.cs b/WinUIGallery/ControlPages/ConnectedAnimationPage.xaml.cs index 96b16ac79..459babc3e 100644 --- a/WinUIGallery/ControlPages/ConnectedAnimationPage.xaml.cs +++ b/WinUIGallery/ControlPages/ConnectedAnimationPage.xaml.cs @@ -5,106 +5,105 @@ using Microsoft.UI.Xaml.Media.Animation; using Microsoft.UI.Xaml; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ConnectedAnimationPage : Page { - public sealed partial class ConnectedAnimationPage : Page + public ConnectedAnimationPage() { - public ConnectedAnimationPage() - { - this.InitializeComponent(); + this.InitializeComponent(); - // For 1st sample - CollectionContentFrame.Navigate(typeof(ConnectedAnimationPages.CollectionPage)); + // For 1st sample + CollectionContentFrame.Navigate(typeof(ConnectedAnimationPages.CollectionPage)); - // For 2nd sample - CardFrame.Navigate(typeof(ConnectedAnimationPages.CardPage)); + // For 2nd sample + CardFrame.Navigate(typeof(ConnectedAnimationPages.CardPage)); - // For 3rd sample - ContentFrame.Navigate(typeof(SamplePage1)); - - } + // For 3rd sample + ContentFrame.Navigate(typeof(SamplePage1)); + + } - private ConnectedAnimationConfiguration GetConfiguration() + private ConnectedAnimationConfiguration GetConfiguration() + { + if(this.ConfigurationPanel == null) { - if(this.ConfigurationPanel == null) - { - return null; - } - - var selectedName = (ConfigurationPanel.SelectedItem as RadioButton).Content.ToString(); - switch (selectedName) - { - case "Gravity": - return new GravityConnectedAnimationConfiguration(); - case "Direct": - return new DirectConnectedAnimationConfiguration(); - case "Basic": - return new BasicConnectedAnimationConfiguration(); - default: - return null; - } + return null; } - - private void NavigateButton_Click(object sender, RoutedEventArgs e) + + var selectedName = (ConfigurationPanel.SelectedItem as RadioButton).Content.ToString(); + switch (selectedName) { - var currentContent = ContentFrame.Content; - - if (currentContent as SamplePage1 != null) - { - (currentContent as SamplePage1).PrepareConnectedAnimation(GetConfiguration()); - ContentFrame.Navigate(typeof(SamplePage2), null, new SuppressNavigationTransitionInfo()); - } - else if (currentContent as SamplePage2 != null) - { - (currentContent as SamplePage2).PrepareConnectedAnimation(GetConfiguration()); - ContentFrame.Navigate(typeof(SamplePage1), null, new SuppressNavigationTransitionInfo()); - } + case "Gravity": + return new GravityConnectedAnimationConfiguration(); + case "Direct": + return new DirectConnectedAnimationConfiguration(); + case "Basic": + return new BasicConnectedAnimationConfiguration(); + default: + return null; } } - // Sample data object used to populate the collection page. - public class CustomDataObject + private void NavigateButton_Click(object sender, RoutedEventArgs e) { - public string Title { get; set; } - public string ImageLocation { get; set; } - public string Views { get; set; } - public string Likes { get; set; } - public string Description { get; set; } + var currentContent = ContentFrame.Content; - public CustomDataObject() + if (currentContent as SamplePage1 != null) { + (currentContent as SamplePage1).PrepareConnectedAnimation(GetConfiguration()); + ContentFrame.Navigate(typeof(SamplePage2), null, new SuppressNavigationTransitionInfo()); } - - public static List GetDataObjects(bool includeAllItems = false) + else if (currentContent as SamplePage2 != null) { - string[] dummyTexts = new[] { - @"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id facilisis lectus. Cras nec convallis ante, quis pulvinar tellus. Integer dictum accumsan pulvinar. Pellentesque eget enim sodales sapien vestibulum consequat.", - @"Nullam eget mattis metus. Donec pharetra, tellus in mattis tincidunt, magna ipsum gravida nibh, vitae lobortis ante odio vel quam.", - @"Quisque accumsan pretium ligula in faucibus. Mauris sollicitudin augue vitae lorem cursus condimentum quis ac mauris. Pellentesque quis turpis non nunc pretium sagittis. Nulla facilisi. Maecenas eu lectus ante. Proin eleifend vel lectus non tincidunt. Fusce condimentum luctus nisi, in elementum ante tincidunt nec.", - @"Aenean in nisl at elit venenatis blandit ut vitae lectus. Praesent in sollicitudin nunc. Pellentesque justo augue, pretium at sem lacinia, scelerisque semper erat. Ut cursus tortor at metus lacinia dapibus.", - @"Ut consequat magna luctus justo egestas vehicula. Integer pharetra risus libero, et posuere justo mattis et.", - @"Proin malesuada, libero vitae aliquam venenatis, diam est faucibus felis, vitae efficitur erat nunc non mauris. Suspendisse at sodales erat.", - @"Aenean vulputate, turpis non tincidunt ornare, metus est sagittis erat, id lobortis orci odio eget quam. Suspendisse ex purus, lobortis quis suscipit a, volutpat vitae turpis.", - @"Duis facilisis, quam ut laoreet commodo, elit ex aliquet massa, non varius tellus lectus et nunc. Donec vitae risus ut ante pretium semper. Phasellus consectetur volutpat orci, eu dapibus turpis. Fusce varius sapien eu mattis pharetra.", - }; + (currentContent as SamplePage2).PrepareConnectedAnimation(GetConfiguration()); + ContentFrame.Navigate(typeof(SamplePage1), null, new SuppressNavigationTransitionInfo()); + } + } +} - Random rand = new Random(); - int numberOfLocations = includeAllItems ? 13 : 8; - List objects = new List(); - for (int i = 0; i < numberOfLocations; i++) - { - objects.Add(new CustomDataObject() - { - Title = $"Item {i + 1}", - ImageLocation = $"/Assets/SampleMedia/LandscapeImage{i + 1}.jpg", - Views = rand.Next(100, 999).ToString(), - Likes = rand.Next(10, 99).ToString(), - Description = dummyTexts[i % dummyTexts.Length], - }); - } +// Sample data object used to populate the collection page. +public class CustomDataObject +{ + public string Title { get; set; } + public string ImageLocation { get; set; } + public string Views { get; set; } + public string Likes { get; set; } + public string Description { get; set; } - return objects; + public CustomDataObject() + { + } + + public static List GetDataObjects(bool includeAllItems = false) + { + string[] dummyTexts = new[] { + @"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id facilisis lectus. Cras nec convallis ante, quis pulvinar tellus. Integer dictum accumsan pulvinar. Pellentesque eget enim sodales sapien vestibulum consequat.", + @"Nullam eget mattis metus. Donec pharetra, tellus in mattis tincidunt, magna ipsum gravida nibh, vitae lobortis ante odio vel quam.", + @"Quisque accumsan pretium ligula in faucibus. Mauris sollicitudin augue vitae lorem cursus condimentum quis ac mauris. Pellentesque quis turpis non nunc pretium sagittis. Nulla facilisi. Maecenas eu lectus ante. Proin eleifend vel lectus non tincidunt. Fusce condimentum luctus nisi, in elementum ante tincidunt nec.", + @"Aenean in nisl at elit venenatis blandit ut vitae lectus. Praesent in sollicitudin nunc. Pellentesque justo augue, pretium at sem lacinia, scelerisque semper erat. Ut cursus tortor at metus lacinia dapibus.", + @"Ut consequat magna luctus justo egestas vehicula. Integer pharetra risus libero, et posuere justo mattis et.", + @"Proin malesuada, libero vitae aliquam venenatis, diam est faucibus felis, vitae efficitur erat nunc non mauris. Suspendisse at sodales erat.", + @"Aenean vulputate, turpis non tincidunt ornare, metus est sagittis erat, id lobortis orci odio eget quam. Suspendisse ex purus, lobortis quis suscipit a, volutpat vitae turpis.", + @"Duis facilisis, quam ut laoreet commodo, elit ex aliquet massa, non varius tellus lectus et nunc. Donec vitae risus ut ante pretium semper. Phasellus consectetur volutpat orci, eu dapibus turpis. Fusce varius sapien eu mattis pharetra.", + }; + + Random rand = new Random(); + int numberOfLocations = includeAllItems ? 13 : 8; + List objects = new List(); + for (int i = 0; i < numberOfLocations; i++) + { + objects.Add(new CustomDataObject() + { + Title = $"Item {i + 1}", + ImageLocation = $"/Assets/SampleMedia/LandscapeImage{i + 1}.jpg", + Views = rand.Next(100, 999).ToString(), + Likes = rand.Next(10, 99).ToString(), + Description = dummyTexts[i % dummyTexts.Length], + }); } + return objects; } + } diff --git a/WinUIGallery/ControlPages/ContentDialogContent.xaml.cs b/WinUIGallery/ControlPages/ContentDialogContent.xaml.cs index 474abd1da..a957db3d6 100644 --- a/WinUIGallery/ControlPages/ContentDialogContent.xaml.cs +++ b/WinUIGallery/ControlPages/ContentDialogContent.xaml.cs @@ -13,13 +13,12 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ContentDialogContent : Page { - public sealed partial class ContentDialogContent : Page + public ContentDialogContent() { - public ContentDialogContent() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/ContentDialogExample.xaml.cs b/WinUIGallery/ControlPages/ContentDialogExample.xaml.cs index 39ce2ed30..6a36b9671 100644 --- a/WinUIGallery/ControlPages/ContentDialogExample.xaml.cs +++ b/WinUIGallery/ControlPages/ContentDialogExample.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -13,13 +13,12 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ContentDialogExample : ContentDialog { - public sealed partial class ContentDialogExample : ContentDialog + public ContentDialogExample() { - public ContentDialogExample() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/ContentDialogPage.xaml.cs b/WinUIGallery/ControlPages/ContentDialogPage.xaml.cs index ad5ee216b..efd11c0a1 100644 --- a/WinUIGallery/ControlPages/ContentDialogPage.xaml.cs +++ b/WinUIGallery/ControlPages/ContentDialogPage.xaml.cs @@ -13,44 +13,43 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ContentDialogPage : Page { - public sealed partial class ContentDialogPage : Page + public ContentDialogPage() { - public ContentDialogPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private async void ShowDialog_Click(object sender, RoutedEventArgs e) - { - ContentDialogExample dialog = new ContentDialogExample(); + private async void ShowDialog_Click(object sender, RoutedEventArgs e) + { + ContentDialogExample dialog = new ContentDialogExample(); - // XamlRoot must be set in the case of a ContentDialog running in a Desktop app - dialog.XamlRoot = this.XamlRoot; - dialog.Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style; - dialog.Title = "Save your work?"; - dialog.PrimaryButtonText = "Save"; - dialog.SecondaryButtonText = "Don't Save"; - dialog.CloseButtonText = "Cancel"; - dialog.DefaultButton = ContentDialogButton.Primary; - dialog.Content = new ContentDialogContent(); - dialog.RequestedTheme = (VisualTreeHelper.GetParent(sender as Button) as StackPanel).ActualTheme; + // XamlRoot must be set in the case of a ContentDialog running in a Desktop app + dialog.XamlRoot = this.XamlRoot; + dialog.Style = Application.Current.Resources["DefaultContentDialogStyle"] as Style; + dialog.Title = "Save your work?"; + dialog.PrimaryButtonText = "Save"; + dialog.SecondaryButtonText = "Don't Save"; + dialog.CloseButtonText = "Cancel"; + dialog.DefaultButton = ContentDialogButton.Primary; + dialog.Content = new ContentDialogContent(); + dialog.RequestedTheme = (VisualTreeHelper.GetParent(sender as Button) as StackPanel).ActualTheme; - var result = await dialog.ShowAsync(); + var result = await dialog.ShowAsync(); - if (result == ContentDialogResult.Primary) - { - DialogResult.Text = "User saved their work"; - } - else if (result == ContentDialogResult.Secondary) - { - DialogResult.Text = "User did not save their work"; - } - else - { - DialogResult.Text = "User cancelled the dialog"; - } + if (result == ContentDialogResult.Primary) + { + DialogResult.Text = "User saved their work"; + } + else if (result == ContentDialogResult.Secondary) + { + DialogResult.Text = "User did not save their work"; + } + else + { + DialogResult.Text = "User cancelled the dialog"; } } } diff --git a/WinUIGallery/ControlPages/CreateMultipleWindowsPage.xaml.cs b/WinUIGallery/ControlPages/CreateMultipleWindowsPage.xaml.cs index 68d73a30b..1ef026ce0 100644 --- a/WinUIGallery/ControlPages/CreateMultipleWindowsPage.xaml.cs +++ b/WinUIGallery/ControlPages/CreateMultipleWindowsPage.xaml.cs @@ -14,26 +14,25 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class CreateMultipleWindowsPage : Page { - public sealed partial class CreateMultipleWindowsPage : Page + public CreateMultipleWindowsPage() { - public CreateMultipleWindowsPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void createNewWindow_Click(object sender, RoutedEventArgs e) - { - var newWindow = WindowHelper.CreateWindow(); - var rootPage = new NavigationRootPage(); - rootPage.RequestedTheme = ThemeHelper.RootTheme; - newWindow.Content = rootPage; - newWindow.Activate(); + private void createNewWindow_Click(object sender, RoutedEventArgs e) + { + var newWindow = WindowHelper.CreateWindow(); + var rootPage = new NavigationRootPage(); + rootPage.RequestedTheme = ThemeHelper.RootTheme; + newWindow.Content = rootPage; + newWindow.Activate(); - var targetPageType = typeof(HomePage); - string targetPageArguments = string.Empty; - rootPage.Navigate(targetPageType, targetPageArguments); - } + var targetPageType = typeof(HomePage); + string targetPageArguments = string.Empty; + rootPage.Navigate(targetPageType, targetPageArguments); } } diff --git a/WinUIGallery/ControlPages/DatePickerPage.xaml.cs b/WinUIGallery/ControlPages/DatePickerPage.xaml.cs index 988e973fe..2becc2540 100644 --- a/WinUIGallery/ControlPages/DatePickerPage.xaml.cs +++ b/WinUIGallery/ControlPages/DatePickerPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -11,26 +11,25 @@ using Microsoft.UI.Xaml.Navigation; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class DatePickerPage : Page { - public sealed partial class DatePickerPage : Page + public DatePickerPage() { - public DatePickerPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - protected override void OnNavigatedTo(NavigationEventArgs e) - { - // Set the default date to 2 months from the current date. - Control2.Date = DateTimeOffset.Now.AddMonths(2); + protected override void OnNavigatedTo(NavigationEventArgs e) + { + // Set the default date to 2 months from the current date. + Control2.Date = DateTimeOffset.Now.AddMonths(2); - // Set the minimum year to the current year. - Control2.MinYear = DateTimeOffset.Now; + // Set the minimum year to the current year. + Control2.MinYear = DateTimeOffset.Now; - // Set the maximum year to 5 years in the future. - Control2.MaxYear = DateTimeOffset.Now.AddYears(5); + // Set the maximum year to 5 years in the future. + Control2.MaxYear = DateTimeOffset.Now.AddYears(5); - } } } diff --git a/WinUIGallery/ControlPages/DesignGuidance/ColorPage.xaml.cs b/WinUIGallery/ControlPages/DesignGuidance/ColorPage.xaml.cs index 94ba25a0b..46889c1ff 100644 --- a/WinUIGallery/ControlPages/DesignGuidance/ColorPage.xaml.cs +++ b/WinUIGallery/ControlPages/DesignGuidance/ColorPage.xaml.cs @@ -6,41 +6,40 @@ using Microsoft.UI.Xaml.Media.Animation; using WinUIGallery.DesktopWap.Controls.DesignGuidance.ColorSections; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ColorPage : Page { - public sealed partial class ColorPage : Page + int previousSelectedIndex = 0; + + public ColorPage() { - int previousSelectedIndex = 0; + this.InitializeComponent(); + } - public ColorPage() + private void PageSelector_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args) + { + SelectorBarItem selectedItem = sender.SelectedItem; + int currentSelectedIndex = sender.Items.IndexOf(selectedItem); + Type pageType = currentSelectedIndex switch { - this.InitializeComponent(); - } + 0 => typeof(TextSection), + 1 => typeof(FillSection), + 2 => typeof(StrokeSection), + 3 => typeof(BackgroundSection), + 4 => typeof(SignalSection), + 5 => typeof(HighContrastSection), + _ => typeof(TextSection), + }; + var slideNavigationTransitionEffect = currentSelectedIndex - previousSelectedIndex > 0 ? SlideNavigationTransitionEffect.FromRight : SlideNavigationTransitionEffect.FromLeft; - private void PageSelector_SelectionChanged(SelectorBar sender, SelectorBarSelectionChangedEventArgs args) - { - SelectorBarItem selectedItem = sender.SelectedItem; - int currentSelectedIndex = sender.Items.IndexOf(selectedItem); - Type pageType = currentSelectedIndex switch - { - 0 => typeof(TextSection), - 1 => typeof(FillSection), - 2 => typeof(StrokeSection), - 3 => typeof(BackgroundSection), - 4 => typeof(SignalSection), - 5 => typeof(HighContrastSection), - _ => typeof(TextSection), - }; - var slideNavigationTransitionEffect = currentSelectedIndex - previousSelectedIndex > 0 ? SlideNavigationTransitionEffect.FromRight : SlideNavigationTransitionEffect.FromLeft; - - NavigationFrame.Navigate(pageType, null, new SlideNavigationTransitionInfo() { Effect = slideNavigationTransitionEffect }); - - previousSelectedIndex = currentSelectedIndex; - } - - private void PageSelector_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) - { - PageSelector.SelectedItem = PageSelector.Items[0]; - } + NavigationFrame.Navigate(pageType, null, new SlideNavigationTransitionInfo() { Effect = slideNavigationTransitionEffect }); + + previousSelectedIndex = currentSelectedIndex; + } + + private void PageSelector_Loaded(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) + { + PageSelector.SelectedItem = PageSelector.Items[0]; } } diff --git a/WinUIGallery/ControlPages/DesignGuidance/GeometryPage.xaml.cs b/WinUIGallery/ControlPages/DesignGuidance/GeometryPage.xaml.cs index 6f9032b0a..6ed1e96e3 100644 --- a/WinUIGallery/ControlPages/DesignGuidance/GeometryPage.xaml.cs +++ b/WinUIGallery/ControlPages/DesignGuidance/GeometryPage.xaml.cs @@ -13,42 +13,41 @@ using Windows.ApplicationModel; using Windows.ApplicationModel.DataTransfer; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class GeometryPage : Page { - public sealed partial class GeometryPage : Page + public GeometryPage() + { + this.InitializeComponent(); + } + + private void ShowGeometryButtonClick1(object sender, RoutedEventArgs e) + { + ShowGeometryInfoTooltip1.IsOpen = !ShowGeometryInfoTooltip1.IsOpen; + } + + private void ShowGeometryButtonClick2(object sender, RoutedEventArgs e) + { + ShowGeometryInfoTooltip2.IsOpen = !ShowGeometryInfoTooltip2.IsOpen; + } + + private void ShowGeometryButtonClick3(object sender, RoutedEventArgs e) + { + ShowGeometryInfoTooltip3.IsOpen = !ShowGeometryInfoTooltip3.IsOpen; + } + + private void CopyControlResourceToClipboardButton_Click(object sender, RoutedEventArgs e) + { + DataPackage package = new DataPackage(); + package.SetText("ControlCornerRadius"); + Clipboard.SetContent(package); + } + + private void CopyOverlayResourceToClipboardButton_Click(object sender, RoutedEventArgs e) { - public GeometryPage() - { - this.InitializeComponent(); - } - - private void ShowGeometryButtonClick1(object sender, RoutedEventArgs e) - { - ShowGeometryInfoTooltip1.IsOpen = !ShowGeometryInfoTooltip1.IsOpen; - } - - private void ShowGeometryButtonClick2(object sender, RoutedEventArgs e) - { - ShowGeometryInfoTooltip2.IsOpen = !ShowGeometryInfoTooltip2.IsOpen; - } - - private void ShowGeometryButtonClick3(object sender, RoutedEventArgs e) - { - ShowGeometryInfoTooltip3.IsOpen = !ShowGeometryInfoTooltip3.IsOpen; - } - - private void CopyControlResourceToClipboardButton_Click(object sender, RoutedEventArgs e) - { - DataPackage package = new DataPackage(); - package.SetText("ControlCornerRadius"); - Clipboard.SetContent(package); - } - - private void CopyOverlayResourceToClipboardButton_Click(object sender, RoutedEventArgs e) - { - DataPackage package = new DataPackage(); - package.SetText("OverlayCornerRadius"); - Clipboard.SetContent(package); - } + DataPackage package = new DataPackage(); + package.SetText("OverlayCornerRadius"); + Clipboard.SetContent(package); } } diff --git a/WinUIGallery/ControlPages/DesignGuidance/IconographyPage.xaml.cs b/WinUIGallery/ControlPages/DesignGuidance/IconographyPage.xaml.cs index 958d0ed75..5d5a88325 100644 --- a/WinUIGallery/ControlPages/DesignGuidance/IconographyPage.xaml.cs +++ b/WinUIGallery/ControlPages/DesignGuidance/IconographyPage.xaml.cs @@ -18,131 +18,130 @@ using WinUIGallery.DesktopWap.DataModel; using System.Threading; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class IconographyPage : Page { - public sealed partial class IconographyPage : Page - { - public List FontSizes { get; } = new() - { - 16, - 24, - 32, - 48 - }; + public List FontSizes { get; } = new() + { + 16, + 24, + 32, + 48 + }; - private string currentSearch = null; + private string currentSearch = null; - public IconData SelectedItem + public IconData SelectedItem + { + get { return (IconData)GetValue(SelectedItemProperty); } + set { - get { return (IconData)GetValue(SelectedItemProperty); } - set - { - SetValue(SelectedItemProperty, value); - SetSampleCodePresenterCode(value); - } + SetValue(SelectedItemProperty, value); + SetSampleCodePresenterCode(value); } - public static readonly DependencyProperty SelectedItemProperty = - DependencyProperty.Register("SelectedItem", typeof(IconData), typeof(IconographyPage), new PropertyMetadata(null)); + } + public static readonly DependencyProperty SelectedItemProperty = + DependencyProperty.Register("SelectedItem", typeof(IconData), typeof(IconographyPage), new PropertyMetadata(null)); - public IconographyPage() - { - // Fill filtered items - this.InitializeComponent(); - IconsItemsView.Loaded += IconsItemsView_Loaded; - } + public IconographyPage() + { + // Fill filtered items + this.InitializeComponent(); + IconsItemsView.Loaded += IconsItemsView_Loaded; + } - private void IconsItemsView_Loaded(object sender, RoutedEventArgs e) + private void IconsItemsView_Loaded(object sender, RoutedEventArgs e) + { + // Delegate loading of icons, so we have smooth navigating to this page + // and not unnecessarily block UI Thread + Task.Run(delegate () { - // Delegate loading of icons, so we have smooth navigating to this page - // and not unnecessarily block UI Thread - Task.Run(delegate () + _ = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.High, () => { - _ = DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.High, () => - { - IconsItemsView.ItemsSource = new List(IconsDataSource.Icons); - SelectedItem = IconsDataSource.Icons[0]; - SetSampleCodePresenterCode(IconsDataSource.Icons[0]); - }); + IconsItemsView.ItemsSource = new List(IconsDataSource.Icons); + SelectedItem = IconsDataSource.Icons[0]; + SetSampleCodePresenterCode(IconsDataSource.Icons[0]); }); - } - private void SetSampleCodePresenterCode(IconData value) - { - XAMLCodePresenter.Code = $""; + }); + } + private void SetSampleCodePresenterCode(IconData value) + { + XAMLCodePresenter.Code = $""; - CSharpCodePresenter.Code = $"FontIcon icon = new FontIcon();" + Environment.NewLine + "icon.Glyph = \"" + value.CodeGlyph + "\";"; - } + CSharpCodePresenter.Code = $"FontIcon icon = new FontIcon();" + Environment.NewLine + "icon.Glyph = \"" + value.CodeGlyph + "\";"; + } - private void SearchTextBox_TextChanged(object sender, AutoSuggestBoxTextChangedEventArgs args) - { - Filter((sender as AutoSuggestBox).Text); - } + private void SearchTextBox_TextChanged(object sender, AutoSuggestBoxTextChangedEventArgs args) + { + Filter((sender as AutoSuggestBox).Text); + } - public void Filter(string search) - { - // Clearing itemssource so user thinks we are doing something - IconsItemsView.ItemsSource = null; - // Setting current search to trigger breaking condition of other threads - currentSearch = search; + public void Filter(string search) + { + // Clearing itemssource so user thinks we are doing something + IconsItemsView.ItemsSource = null; + // Setting current search to trigger breaking condition of other threads + currentSearch = search; - string[] filter = search?.Split(" "); + string[] filter = search?.Split(" "); - // Spawning a new thread to not have the UI freeze because of our search - new Thread(() => + // Spawning a new thread to not have the UI freeze because of our search + new Thread(() => + { + var newItems = new List(); + foreach (var item in IconsDataSource.Icons) { - var newItems = new List(); - foreach (var item in IconsDataSource.Icons) + // Skip UI update if this thread is not handling the current search term + if (search != currentSearch) { - // Skip UI update if this thread is not handling the current search term - if (search != currentSearch) - { - return; - } - - var fitsFilter = filter.All(entry => item.Code.Contains(entry, System.StringComparison.CurrentCultureIgnoreCase) - || item.Name.Contains(entry, System.StringComparison.CurrentCultureIgnoreCase) - || item.Tags.Any(tag => string.IsNullOrEmpty(tag) is false && tag.Contains(entry, System.StringComparison.CurrentCultureIgnoreCase))); - - if (fitsFilter) - { - newItems.Add(item); - } + return; } - // Skip UI update if this thread is not handling the current search term - if (search != currentSearch) return; + var fitsFilter = filter.All(entry => item.Code.Contains(entry, System.StringComparison.CurrentCultureIgnoreCase) + || item.Name.Contains(entry, System.StringComparison.CurrentCultureIgnoreCase) + || item.Tags.Any(tag => string.IsNullOrEmpty(tag) is false && tag.Contains(entry, System.StringComparison.CurrentCultureIgnoreCase))); - // Updates to anything UI related (e.g. setting ItemsSource) need to be run on UI thread so queue it through dispatcher - DispatcherQueue.TryEnqueue(() => + if (fitsFilter) { - IconsItemsView.ItemsSource = newItems; - - string outputString; - var filteredItemsCount = newItems.Count; - if (filteredItemsCount > 0) - { - SelectedItem = newItems[0]; - outputString = filteredItemsCount > 1 ? filteredItemsCount + " icons found." : "1 icon found."; - } - else - { - outputString = "No icon found."; - } - - UIHelper.AnnounceActionForAccessibility(IconsAutoSuggestBox, outputString, "AutoSuggestBoxNumberIconsFoundId"); - }); - }).Start(); - } + newItems.Add(item); + } + } - private void IconsItemsView_SelectionChanged(ItemsView sender, ItemsViewSelectionChangedEventArgs args) - { - if (IconsItemsView.ItemsSource is IList currentItems) + // Skip UI update if this thread is not handling the current search term + if (search != currentSearch) return; + + // Updates to anything UI related (e.g. setting ItemsSource) need to be run on UI thread so queue it through dispatcher + DispatcherQueue.TryEnqueue(() => { - if (IconsItemsView.CurrentItemIndex != -1 && IconsItemsView.CurrentItemIndex < currentItems.Count) + IconsItemsView.ItemsSource = newItems; + + string outputString; + var filteredItemsCount = newItems.Count; + if (filteredItemsCount > 0) + { + SelectedItem = newItems[0]; + outputString = filteredItemsCount > 1 ? filteredItemsCount + " icons found." : "1 icon found."; + } + else { - SelectedItem = currentItems[IconsItemsView.CurrentItemIndex]; + outputString = "No icon found."; } + UIHelper.AnnounceActionForAccessibility(IconsAutoSuggestBox, outputString, "AutoSuggestBoxNumberIconsFoundId"); + }); + }).Start(); + } + + private void IconsItemsView_SelectionChanged(ItemsView sender, ItemsViewSelectionChangedEventArgs args) + { + if (IconsItemsView.ItemsSource is IList currentItems) + { + if (IconsItemsView.CurrentItemIndex != -1 && IconsItemsView.CurrentItemIndex < currentItems.Count) + { + SelectedItem = currentItems[IconsItemsView.CurrentItemIndex]; } + } } } diff --git a/WinUIGallery/ControlPages/DesignGuidance/SpacingPage.xaml.cs b/WinUIGallery/ControlPages/DesignGuidance/SpacingPage.xaml.cs index 652e7bed5..e9223dced 100644 --- a/WinUIGallery/ControlPages/DesignGuidance/SpacingPage.xaml.cs +++ b/WinUIGallery/ControlPages/DesignGuidance/SpacingPage.xaml.cs @@ -10,13 +10,12 @@ using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class SpacingPage : Page { - public sealed partial class SpacingPage : Page + public SpacingPage() { - public SpacingPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/DesignGuidance/TypographyPage.xaml.cs b/WinUIGallery/ControlPages/DesignGuidance/TypographyPage.xaml.cs index ca28cfb0a..63454dd42 100644 --- a/WinUIGallery/ControlPages/DesignGuidance/TypographyPage.xaml.cs +++ b/WinUIGallery/ControlPages/DesignGuidance/TypographyPage.xaml.cs @@ -11,37 +11,36 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class TypographyPage : Page { - public sealed partial class TypographyPage : Page + public TypographyPage() { - public TypographyPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void ShowTypographyButtonClick1(object sender, RoutedEventArgs e) - { - ShowTypographyInfoTooltip1.IsOpen = !ShowTypographyInfoTooltip1.IsOpen; - } + private void ShowTypographyButtonClick1(object sender, RoutedEventArgs e) + { + ShowTypographyInfoTooltip1.IsOpen = !ShowTypographyInfoTooltip1.IsOpen; + } - private void ShowTypographyButtonClick2(object sender, RoutedEventArgs e) - { - ShowTypographyInfoTooltip2.IsOpen = !ShowTypographyInfoTooltip2.IsOpen; - } + private void ShowTypographyButtonClick2(object sender, RoutedEventArgs e) + { + ShowTypographyInfoTooltip2.IsOpen = !ShowTypographyInfoTooltip2.IsOpen; + } - private void ShowTypographyButtonClick3(object sender, RoutedEventArgs e) - { - ShowTypographyInfoTooltip3.IsOpen = !ShowTypographyInfoTooltip3.IsOpen; - } + private void ShowTypographyButtonClick3(object sender, RoutedEventArgs e) + { + ShowTypographyInfoTooltip3.IsOpen = !ShowTypographyInfoTooltip3.IsOpen; + } - private void ShowTypographyButtonClick4(object sender, RoutedEventArgs e) - { - ShowTypographyInfoTooltip4.IsOpen = !ShowTypographyInfoTooltip4.IsOpen; - } - private void ShowTypographyButtonClick5(object sender, RoutedEventArgs e) - { - ShowTypographyInfoTooltip5.IsOpen = !ShowTypographyInfoTooltip5.IsOpen; - } + private void ShowTypographyButtonClick4(object sender, RoutedEventArgs e) + { + ShowTypographyInfoTooltip4.IsOpen = !ShowTypographyInfoTooltip4.IsOpen; + } + private void ShowTypographyButtonClick5(object sender, RoutedEventArgs e) + { + ShowTypographyInfoTooltip5.IsOpen = !ShowTypographyInfoTooltip5.IsOpen; } } diff --git a/WinUIGallery/ControlPages/DropDownButtonPage.xaml.cs b/WinUIGallery/ControlPages/DropDownButtonPage.xaml.cs index a560c3af9..d65faf94f 100644 --- a/WinUIGallery/ControlPages/DropDownButtonPage.xaml.cs +++ b/WinUIGallery/ControlPages/DropDownButtonPage.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -13,13 +13,12 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class DropDownButtonPage : Page { - public sealed partial class DropDownButtonPage : Page + public DropDownButtonPage() { - public DropDownButtonPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/EasingFunctionPage.xaml.cs b/WinUIGallery/ControlPages/EasingFunctionPage.xaml.cs index 8a84b5037..b69cf4fd3 100644 --- a/WinUIGallery/ControlPages/EasingFunctionPage.xaml.cs +++ b/WinUIGallery/ControlPages/EasingFunctionPage.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -14,83 +14,82 @@ using Microsoft.UI.Xaml.Media.Animation; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public class NamedEasingFunction { - public class NamedEasingFunction + public string Name { get; private set; } + public EasingFunctionBase EasingFunctionBase { get; private set; } + public NamedEasingFunction(string name, EasingFunctionBase easingFunctionBase) { - public string Name { get; private set; } - public EasingFunctionBase EasingFunctionBase { get; private set; } - public NamedEasingFunction(string name, EasingFunctionBase easingFunctionBase) - { - this.Name = name; - this.EasingFunctionBase = easingFunctionBase; - } + this.Name = name; + this.EasingFunctionBase = easingFunctionBase; } +} - public sealed partial class EasingFunctionPage : Page - { - private List EasingFunctions { get; } = new List() - { - new NamedEasingFunction("BackEase", new BackEase()), - new NamedEasingFunction("BounceEase", new BounceEase()), - new NamedEasingFunction("CircleEase", new CircleEase()), - new NamedEasingFunction("CubicEase", new CubicEase()), - new NamedEasingFunction("ElasticEase", new ElasticEase()), - new NamedEasingFunction("ExponentialEase", new ExponentialEase()), - new NamedEasingFunction("PowerEase", new PowerEase()), - new NamedEasingFunction("QuadraticEase", new QuadraticEase()), - new NamedEasingFunction("QuarticEase", new QuarticEase()), - new NamedEasingFunction("QuinticEase", new QuinticEase()), - new NamedEasingFunction("SineEase", new SineEase()) - }; - - public EasingFunctionPage() +public sealed partial class EasingFunctionPage : Page +{ + private List EasingFunctions { get; } = new List() { - this.InitializeComponent(); - } + new NamedEasingFunction("BackEase", new BackEase()), + new NamedEasingFunction("BounceEase", new BounceEase()), + new NamedEasingFunction("CircleEase", new CircleEase()), + new NamedEasingFunction("CubicEase", new CubicEase()), + new NamedEasingFunction("ElasticEase", new ElasticEase()), + new NamedEasingFunction("ExponentialEase", new ExponentialEase()), + new NamedEasingFunction("PowerEase", new PowerEase()), + new NamedEasingFunction("QuadraticEase", new QuadraticEase()), + new NamedEasingFunction("QuarticEase", new QuarticEase()), + new NamedEasingFunction("QuinticEase", new QuinticEase()), + new NamedEasingFunction("SineEase", new SineEase()) + }; - private void Button1_Click(object sender, RoutedEventArgs e) - { - Storyboard1.Children[0].SetValue(DoubleAnimation.FromProperty, Translation1.X); - Storyboard1.Children[0].SetValue(DoubleAnimation.ToProperty, Translation1.X > 0 ? 0 : 200); - Storyboard1.Begin(); - } + public EasingFunctionPage() + { + this.InitializeComponent(); + } - private void Button2_Click(object sender, RoutedEventArgs e) - { - Storyboard2.Children[0].SetValue(DoubleAnimation.FromProperty, Translation2.X); - Storyboard2.Children[0].SetValue(DoubleAnimation.ToProperty, Translation2.X > 0 ? 0 : 200); - Storyboard2.Begin(); - } + private void Button1_Click(object sender, RoutedEventArgs e) + { + Storyboard1.Children[0].SetValue(DoubleAnimation.FromProperty, Translation1.X); + Storyboard1.Children[0].SetValue(DoubleAnimation.ToProperty, Translation1.X > 0 ? 0 : 200); + Storyboard1.Begin(); + } - private void Button3_Click(object sender, RoutedEventArgs e) - { - Storyboard3.Children[0].SetValue(DoubleAnimation.FromProperty, Translation3.X); - Storyboard3.Children[0].SetValue(DoubleAnimation.ToProperty, Translation3.X > 0 ? 0 : 200); - Storyboard3.Begin(); - } + private void Button2_Click(object sender, RoutedEventArgs e) + { + Storyboard2.Children[0].SetValue(DoubleAnimation.FromProperty, Translation2.X); + Storyboard2.Children[0].SetValue(DoubleAnimation.ToProperty, Translation2.X > 0 ? 0 : 200); + Storyboard2.Begin(); + } - private void Button4_Click(object sender, RoutedEventArgs e) - { - var easingFunction = EasingComboBox.SelectedValue as EasingFunctionBase; - easingFunction.EasingMode = GetEaseValue(); - (Storyboard4.Children[0] as DoubleAnimation).EasingFunction = easingFunction; + private void Button3_Click(object sender, RoutedEventArgs e) + { + Storyboard3.Children[0].SetValue(DoubleAnimation.FromProperty, Translation3.X); + Storyboard3.Children[0].SetValue(DoubleAnimation.ToProperty, Translation3.X > 0 ? 0 : 200); + Storyboard3.Begin(); + } - Storyboard4.Children[0].SetValue(DoubleAnimation.FromProperty, Translation4.X); - Storyboard4.Children[0].SetValue(DoubleAnimation.ToProperty, Translation4.X > 0 ? 0 : 200); - Storyboard4.Begin(); - } + private void Button4_Click(object sender, RoutedEventArgs e) + { + var easingFunction = EasingComboBox.SelectedValue as EasingFunctionBase; + easingFunction.EasingMode = GetEaseValue(); + (Storyboard4.Children[0] as DoubleAnimation).EasingFunction = easingFunction; - EasingMode GetEaseValue() - { - if (easeOutRB.IsChecked == true) return EasingMode.EaseOut; - else if (easeInRB.IsChecked == true) return EasingMode.EaseIn; - else return EasingMode.EaseInOut; - } + Storyboard4.Children[0].SetValue(DoubleAnimation.FromProperty, Translation4.X); + Storyboard4.Children[0].SetValue(DoubleAnimation.ToProperty, Translation4.X > 0 ? 0 : 200); + Storyboard4.Begin(); + } - private void EasingComboBox_Loaded(object sender, RoutedEventArgs e) - { - EasingComboBox.SelectedIndex = 0; - } + EasingMode GetEaseValue() + { + if (easeOutRB.IsChecked == true) return EasingMode.EaseOut; + else if (easeInRB.IsChecked == true) return EasingMode.EaseIn; + else return EasingMode.EaseInOut; + } + + private void EasingComboBox_Loaded(object sender, RoutedEventArgs e) + { + EasingComboBox.SelectedIndex = 0; } } diff --git a/WinUIGallery/ControlPages/ExpanderPage.xaml.cs b/WinUIGallery/ControlPages/ExpanderPage.xaml.cs index d3ce17c43..20fdc0c93 100644 --- a/WinUIGallery/ControlPages/ExpanderPage.xaml.cs +++ b/WinUIGallery/ControlPages/ExpanderPage.xaml.cs @@ -1,33 +1,30 @@ using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ExpanderPage : Page { - public sealed partial class ExpanderPage : Page + public ExpanderPage() { - public ExpanderPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void ExpandDirectionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - string expandDirection = e.AddedItems[0].ToString(); + private void ExpandDirectionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + string expandDirection = e.AddedItems[0].ToString(); - switch (expandDirection) - { - case "Down": - default: - Expander1.ExpandDirection = Microsoft.UI.Xaml.Controls.ExpandDirection.Down; - Expander1.VerticalAlignment = Microsoft.UI.Xaml.VerticalAlignment.Top; - break; + switch (expandDirection) + { + case "Down": + default: + Expander1.ExpandDirection = Microsoft.UI.Xaml.Controls.ExpandDirection.Down; + Expander1.VerticalAlignment = Microsoft.UI.Xaml.VerticalAlignment.Top; + break; - case "Up": - Expander1.ExpandDirection = Microsoft.UI.Xaml.Controls.ExpandDirection.Up; - Expander1.VerticalAlignment = Microsoft.UI.Xaml.VerticalAlignment.Bottom; - break; - } + case "Up": + Expander1.ExpandDirection = Microsoft.UI.Xaml.Controls.ExpandDirection.Up; + Expander1.VerticalAlignment = Microsoft.UI.Xaml.VerticalAlignment.Bottom; + break; } } - - } diff --git a/WinUIGallery/ControlPages/FilePickerPage.xaml.cs b/WinUIGallery/ControlPages/FilePickerPage.xaml.cs index a5240de41..3ad7b1ede 100644 --- a/WinUIGallery/ControlPages/FilePickerPage.xaml.cs +++ b/WinUIGallery/ControlPages/FilePickerPage.xaml.cs @@ -15,270 +15,269 @@ using Windows.Storage.Pickers; using Windows.Storage.Provider; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class FilePickerPage : Page { - public sealed partial class FilePickerPage : Page - { - public FilePickerPage() - { - this.InitializeComponent(); - } + public FilePickerPage() + { + this.InitializeComponent(); + } - private async void PickAFileButton_Click(object sender, RoutedEventArgs e) - { - // Clear previous returned file name, if it exists, between iterations of this scenario - PickAFileOutputTextBlock.Text = ""; + private async void PickAFileButton_Click(object sender, RoutedEventArgs e) + { + // Clear previous returned file name, if it exists, between iterations of this scenario + PickAFileOutputTextBlock.Text = ""; - // Create a file picker - var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); + // Create a file picker + var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); - // Retrieve the window handle (HWND) of the current WinUI 3 window. - var window = WindowHelper.GetWindowForElement(this); - var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); + // Retrieve the window handle (HWND) of the current WinUI 3 window. + var window = WindowHelper.GetWindowForElement(this); + var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); - // Initialize the file picker with the window handle (HWND). - WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); + // Initialize the file picker with the window handle (HWND). + WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); - // Set options for your file picker - openPicker.ViewMode = PickerViewMode.Thumbnail; - openPicker.FileTypeFilter.Add("*"); + // Set options for your file picker + openPicker.ViewMode = PickerViewMode.Thumbnail; + openPicker.FileTypeFilter.Add("*"); - // Open the picker for the user to pick a file - var file = await openPicker.PickSingleFileAsync(); - if (file != null) - { - // Creating the text for the Texblock - Span span = new Span(); - Run run1 = new Run(); - run1.Text = "Picked file: "; - - // Adding the name of the picked file in bold - Run run2 = new Run(); - run2.FontWeight = Microsoft.UI.Text.FontWeights.Bold; - run2.Text = file.Name; - - span.Inlines.Add(run1); - span.Inlines.Add(run2); - PickAFileOutputTextBlock.Inlines.Add(span); - } - else - { - PickAFileOutputTextBlock.Text = "Operation cancelled."; - } - - UIHelper.AnnounceActionForAccessibility(sender as Button, PickAFileOutputTextBlock.Text, "FilePickedNotificationId"); + // Open the picker for the user to pick a file + var file = await openPicker.PickSingleFileAsync(); + if (file != null) + { + // Creating the text for the Texblock + Span span = new Span(); + Run run1 = new Run(); + run1.Text = "Picked file: "; + + // Adding the name of the picked file in bold + Run run2 = new Run(); + run2.FontWeight = Microsoft.UI.Text.FontWeights.Bold; + run2.Text = file.Name; + + span.Inlines.Add(run1); + span.Inlines.Add(run2); + PickAFileOutputTextBlock.Inlines.Add(span); } - private async void PickAPhotoButton_Click(object sender, RoutedEventArgs e) + else { - // Clear previous returned file name, if it exists, between iterations of this scenario - PickAPhotoOutputTextBlock.Text = ""; + PickAFileOutputTextBlock.Text = "Operation cancelled."; + } - // Create a file picker - var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); + UIHelper.AnnounceActionForAccessibility(sender as Button, PickAFileOutputTextBlock.Text, "FilePickedNotificationId"); + } + private async void PickAPhotoButton_Click(object sender, RoutedEventArgs e) + { + // Clear previous returned file name, if it exists, between iterations of this scenario + PickAPhotoOutputTextBlock.Text = ""; - // Retrieve the window handle (HWND) of the current WinUI 3 window. - var window = WindowHelper.GetWindowForElement(this); - var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); + // Create a file picker + var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); - // Initialize the file picker with the window handle (HWND). - WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); + // Retrieve the window handle (HWND) of the current WinUI 3 window. + var window = WindowHelper.GetWindowForElement(this); + var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); - // Set options for your file picker - openPicker.ViewMode = PickerViewMode.Thumbnail; - openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; - openPicker.FileTypeFilter.Add(".jpg"); - openPicker.FileTypeFilter.Add(".jpeg"); - openPicker.FileTypeFilter.Add(".png"); + // Initialize the file picker with the window handle (HWND). + WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); - // Open the picker for the user to pick a file - var file = await openPicker.PickSingleFileAsync(); - if (file != null) - { - // Creating the text for the Texblock - Span span = new Span(); - Run run1 = new Run(); - run1.Text = "Picked photo: "; - - // Adding the name of the picked file in bold - Run run2 = new Run(); - run2.FontWeight = Microsoft.UI.Text.FontWeights.Bold; - run2.Text = file.Name; - - span.Inlines.Add(run1); - span.Inlines.Add(run2); - PickAPhotoOutputTextBlock.Inlines.Add(span); - } - else - { - PickAPhotoOutputTextBlock.Text = "Operation cancelled."; - } + // Set options for your file picker + openPicker.ViewMode = PickerViewMode.Thumbnail; + openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; + openPicker.FileTypeFilter.Add(".jpg"); + openPicker.FileTypeFilter.Add(".jpeg"); + openPicker.FileTypeFilter.Add(".png"); - UIHelper.AnnounceActionForAccessibility(sender as Button, PickAPhotoOutputTextBlock.Text, "PhotoPickedNotificationId"); + // Open the picker for the user to pick a file + var file = await openPicker.PickSingleFileAsync(); + if (file != null) + { + // Creating the text for the Texblock + Span span = new Span(); + Run run1 = new Run(); + run1.Text = "Picked photo: "; + + // Adding the name of the picked file in bold + Run run2 = new Run(); + run2.FontWeight = Microsoft.UI.Text.FontWeights.Bold; + run2.Text = file.Name; + + span.Inlines.Add(run1); + span.Inlines.Add(run2); + PickAPhotoOutputTextBlock.Inlines.Add(span); } - - private async void PickFilesButton_Click(object sender, RoutedEventArgs e) + else { - // Clear previous returned file name, if it exists, between iterations of this scenario - PickFilesOutputTextBlock.Text = ""; + PickAPhotoOutputTextBlock.Text = "Operation cancelled."; + } - // Create a file picker - var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); + UIHelper.AnnounceActionForAccessibility(sender as Button, PickAPhotoOutputTextBlock.Text, "PhotoPickedNotificationId"); + } - // Retrieve the window handle (HWND) of the current WinUI 3 window. - var window = WindowHelper.GetWindowForElement(this); - var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); + private async void PickFilesButton_Click(object sender, RoutedEventArgs e) + { + // Clear previous returned file name, if it exists, between iterations of this scenario + PickFilesOutputTextBlock.Text = ""; - // Initialize the file picker with the window handle (HWND). - WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); + // Create a file picker + var openPicker = new Windows.Storage.Pickers.FileOpenPicker(); - // Set options for your file picker - openPicker.ViewMode = PickerViewMode.List; - openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; - openPicker.FileTypeFilter.Add("*"); + // Retrieve the window handle (HWND) of the current WinUI 3 window. + var window = WindowHelper.GetWindowForElement(this); + var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); - // Open the picker for the user to pick a file - IReadOnlyList files = await openPicker.PickMultipleFilesAsync(); - if (files.Count > 0) - { - // Creating the text for the Texblock - Span span = new Span(); - Run run1 = new Run(); - run1.Text = "Picked files:\n"; - span.Inlines.Add(run1); - - // Adding the names of the picked files in bold - foreach (StorageFile file in files) - { - Run runTemp = new Run(); - runTemp.FontWeight = Microsoft.UI.Text.FontWeights.Bold; - runTemp.Text = file.Name + "\n"; + // Initialize the file picker with the window handle (HWND). + WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); - span.Inlines.Add(runTemp); - } + // Set options for your file picker + openPicker.ViewMode = PickerViewMode.List; + openPicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; + openPicker.FileTypeFilter.Add("*"); - PickFilesOutputTextBlock.Inlines.Add(span); - } - else + // Open the picker for the user to pick a file + IReadOnlyList files = await openPicker.PickMultipleFilesAsync(); + if (files.Count > 0) + { + // Creating the text for the Texblock + Span span = new Span(); + Run run1 = new Run(); + run1.Text = "Picked files:\n"; + span.Inlines.Add(run1); + + // Adding the names of the picked files in bold + foreach (StorageFile file in files) { - PickFilesOutputTextBlock.Text = "Operation cancelled."; + Run runTemp = new Run(); + runTemp.FontWeight = Microsoft.UI.Text.FontWeights.Bold; + runTemp.Text = file.Name + "\n"; + + span.Inlines.Add(runTemp); } - UIHelper.AnnounceActionForAccessibility(sender as Button, PickFilesOutputTextBlock.Text, "FilesPickedNotificationId"); + PickFilesOutputTextBlock.Inlines.Add(span); } - - private async void PickFolderButton_Click(object sender, RoutedEventArgs e) + else { - // Clear previous returned file name, if it exists, between iterations of this scenario - PickFolderOutputTextBlock.Text = ""; + PickFilesOutputTextBlock.Text = "Operation cancelled."; + } - // Create a folder picker - FolderPicker openPicker = new Windows.Storage.Pickers.FolderPicker(); + UIHelper.AnnounceActionForAccessibility(sender as Button, PickFilesOutputTextBlock.Text, "FilesPickedNotificationId"); + } - // Retrieve the window handle (HWND) of the current WinUI 3 window. - var window = WindowHelper.GetWindowForElement(this); - var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); + private async void PickFolderButton_Click(object sender, RoutedEventArgs e) + { + // Clear previous returned file name, if it exists, between iterations of this scenario + PickFolderOutputTextBlock.Text = ""; - // Initialize the folder picker with the window handle (HWND). - WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); + // Create a folder picker + FolderPicker openPicker = new Windows.Storage.Pickers.FolderPicker(); - // Set options for your folder picker - openPicker.SuggestedStartLocation = PickerLocationId.Desktop; - openPicker.FileTypeFilter.Add("*"); + // Retrieve the window handle (HWND) of the current WinUI 3 window. + var window = WindowHelper.GetWindowForElement(this); + var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); - // Open the picker for the user to pick a folder - StorageFolder folder = await openPicker.PickSingleFolderAsync(); - if (folder != null) - { - StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder); + // Initialize the folder picker with the window handle (HWND). + WinRT.Interop.InitializeWithWindow.Initialize(openPicker, hWnd); - // Creating the text for the Texblock - Span span = new Span(); - Run run1 = new Run(); - run1.Text = "Picked folder: "; + // Set options for your folder picker + openPicker.SuggestedStartLocation = PickerLocationId.Desktop; + openPicker.FileTypeFilter.Add("*"); - // Adding the name of the picked file in bold - Run run2 = new Run(); - run2.FontWeight = Microsoft.UI.Text.FontWeights.Bold; - run2.Text = folder.Name; + // Open the picker for the user to pick a folder + StorageFolder folder = await openPicker.PickSingleFolderAsync(); + if (folder != null) + { + StorageApplicationPermissions.FutureAccessList.AddOrReplace("PickedFolderToken", folder); - span.Inlines.Add(run1); - span.Inlines.Add(run2); - PickFolderOutputTextBlock.Inlines.Add(span); - } - else - { - PickFolderOutputTextBlock.Text = "Operation cancelled."; - } + // Creating the text for the Texblock + Span span = new Span(); + Run run1 = new Run(); + run1.Text = "Picked folder: "; - UIHelper.AnnounceActionForAccessibility(sender as Button, PickFolderOutputTextBlock.Text, "FolderPickedNotificationId"); + // Adding the name of the picked file in bold + Run run2 = new Run(); + run2.FontWeight = Microsoft.UI.Text.FontWeights.Bold; + run2.Text = folder.Name; + + span.Inlines.Add(run1); + span.Inlines.Add(run2); + PickFolderOutputTextBlock.Inlines.Add(span); + } + else + { + PickFolderOutputTextBlock.Text = "Operation cancelled."; } - private async void SaveFileButton_Click(object sender, RoutedEventArgs e) + UIHelper.AnnounceActionForAccessibility(sender as Button, PickFolderOutputTextBlock.Text, "FolderPickedNotificationId"); + } + + private async void SaveFileButton_Click(object sender, RoutedEventArgs e) + { + // Clear previous returned file name, if it exists, between iterations of this scenario + SaveFileOutputTextBlock.Text = ""; + + // Create a file picker + FileSavePicker savePicker = new Windows.Storage.Pickers.FileSavePicker(); + + // Retrieve the window handle (HWND) of the current WinUI 3 window. + var window = WindowHelper.GetWindowForElement(this); + var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); + + // Initialize the file picker with the window handle (HWND). + WinRT.Interop.InitializeWithWindow.Initialize(savePicker, hWnd); + + // Set options for your file picker + savePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; + // Dropdown of file types the user can save the file as + savePicker.FileTypeChoices.Add("Plain Text", new List() { ".txt" }); + // Default file name if the user does not type one in or select a file to replace + var enteredFileName = ((sender as Button).Parent as StackPanel) + .FindName("FileNameTextBox") as TextBox; + savePicker.SuggestedFileName = enteredFileName.Text; + + // Open the picker for the user to pick a file + StorageFile file= await savePicker.PickSaveFileAsync(); + if (file != null) { - // Clear previous returned file name, if it exists, between iterations of this scenario - SaveFileOutputTextBlock.Text = ""; - - // Create a file picker - FileSavePicker savePicker = new Windows.Storage.Pickers.FileSavePicker(); - - // Retrieve the window handle (HWND) of the current WinUI 3 window. - var window = WindowHelper.GetWindowForElement(this); - var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(window); - - // Initialize the file picker with the window handle (HWND). - WinRT.Interop.InitializeWithWindow.Initialize(savePicker, hWnd); - - // Set options for your file picker - savePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary; - // Dropdown of file types the user can save the file as - savePicker.FileTypeChoices.Add("Plain Text", new List() { ".txt" }); - // Default file name if the user does not type one in or select a file to replace - var enteredFileName = ((sender as Button).Parent as StackPanel) - .FindName("FileNameTextBox") as TextBox; - savePicker.SuggestedFileName = enteredFileName.Text; - - // Open the picker for the user to pick a file - StorageFile file= await savePicker.PickSaveFileAsync(); - if (file != null) - { - // Prevent updates to the remote version of the file until we finish making changes and call CompleteUpdatesAsync. - CachedFileManager.DeferUpdates(file); + // Prevent updates to the remote version of the file until we finish making changes and call CompleteUpdatesAsync. + CachedFileManager.DeferUpdates(file); - // write to file - var textBox = ((sender as Button).Parent as StackPanel).FindName("FileContentTextBox") as TextBox; - using (var stream = await file.OpenStreamForWriteAsync()) - { - using (var tw = new StreamWriter(stream)) - { - tw.WriteLine(textBox?.Text); - } - } - // Another way to write a string to the file is to use this instead: - // await FileIO.WriteTextAsync(file, "Example file contents."); - - // Let Windows know that we're finished changing the file so the other app can update the remote version of the file. - // Completing updates may require Windows to ask for user input. - FileUpdateStatus status = await CachedFileManager.CompleteUpdatesAsync(file); - if (status == FileUpdateStatus.Complete) - { - SaveFileOutputTextBlock.Text = "File " + file.Name + " was saved."; - } - else if (status == FileUpdateStatus.CompleteAndRenamed) - { - SaveFileOutputTextBlock.Text = "File " + file.Name + " was renamed and saved."; - } - else + // write to file + var textBox = ((sender as Button).Parent as StackPanel).FindName("FileContentTextBox") as TextBox; + using (var stream = await file.OpenStreamForWriteAsync()) + { + using (var tw = new StreamWriter(stream)) { - SaveFileOutputTextBlock.Text = "File " + file.Name + " couldn't be saved."; + tw.WriteLine(textBox?.Text); } } + // Another way to write a string to the file is to use this instead: + // await FileIO.WriteTextAsync(file, "Example file contents."); + + // Let Windows know that we're finished changing the file so the other app can update the remote version of the file. + // Completing updates may require Windows to ask for user input. + FileUpdateStatus status = await CachedFileManager.CompleteUpdatesAsync(file); + if (status == FileUpdateStatus.Complete) + { + SaveFileOutputTextBlock.Text = "File " + file.Name + " was saved."; + } + else if (status == FileUpdateStatus.CompleteAndRenamed) + { + SaveFileOutputTextBlock.Text = "File " + file.Name + " was renamed and saved."; + } else { - SaveFileOutputTextBlock.Text = "Operation cancelled."; + SaveFileOutputTextBlock.Text = "File " + file.Name + " couldn't be saved."; } - - UIHelper.AnnounceActionForAccessibility(sender as Button, SaveFileOutputTextBlock.Text, "FileSavedNotificationId"); } + else + { + SaveFileOutputTextBlock.Text = "Operation cancelled."; + } + + UIHelper.AnnounceActionForAccessibility(sender as Button, SaveFileOutputTextBlock.Text, "FileSavedNotificationId"); } } diff --git a/WinUIGallery/ControlPages/FlipViewPage.xaml.cs b/WinUIGallery/ControlPages/FlipViewPage.xaml.cs index 8be005939..4acc23b8d 100644 --- a/WinUIGallery/ControlPages/FlipViewPage.xaml.cs +++ b/WinUIGallery/ControlPages/FlipViewPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -14,20 +14,19 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class FlipViewPage : ItemsPageBase { - public sealed partial class FlipViewPage : ItemsPageBase + public FlipViewPage() { - public FlipViewPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); + protected override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); - Items = ControlInfoDataSource.Instance.Groups.Take(3).SelectMany(g => g.Items).ToList(); - } + Items = ControlInfoDataSource.Instance.Groups.Take(3).SelectMany(g => g.Items).ToList(); } } diff --git a/WinUIGallery/ControlPages/FlyoutPage.xaml.cs b/WinUIGallery/ControlPages/FlyoutPage.xaml.cs index 25197262b..a3b3ce7c1 100644 --- a/WinUIGallery/ControlPages/FlyoutPage.xaml.cs +++ b/WinUIGallery/ControlPages/FlyoutPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -12,21 +12,20 @@ using Microsoft.UI.Xaml.Controls.Primitives; using Microsoft.UI.Xaml.Input; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class FlyoutPage : Page { - public sealed partial class FlyoutPage : Page + public FlyoutPage() { - public FlyoutPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void DeleteConfirmation_Click(object sender, RoutedEventArgs e) + private void DeleteConfirmation_Click(object sender, RoutedEventArgs e) + { + if (this.Control1.Flyout is Flyout f) { - if (this.Control1.Flyout is Flyout f) - { - f.Hide(); - } + f.Hide(); } } } diff --git a/WinUIGallery/ControlPages/GridPage.xaml.cs b/WinUIGallery/ControlPages/GridPage.xaml.cs index 7f1254d7a..a6ebc0e0c 100644 --- a/WinUIGallery/ControlPages/GridPage.xaml.cs +++ b/WinUIGallery/ControlPages/GridPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -22,13 +22,12 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class GridPage : Page { - public sealed partial class GridPage : Page + public GridPage() { - public GridPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); } } diff --git a/WinUIGallery/ControlPages/GridViewPage.xaml.cs b/WinUIGallery/ControlPages/GridViewPage.xaml.cs index cd20120bc..9a7d8d43a 100644 --- a/WinUIGallery/ControlPages/GridViewPage.xaml.cs +++ b/WinUIGallery/ControlPages/GridViewPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -14,61 +14,61 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class GridViewPage : ItemsPageBase { - public sealed partial class GridViewPage : ItemsPageBase - { - ItemsWrapGrid StyledGridIWG; + ItemsWrapGrid StyledGridIWG; - public GridViewPage() - { - this.InitializeComponent(); - this.DataContext = this; - } + public GridViewPage() + { + this.InitializeComponent(); + this.DataContext = this; + } - protected override void OnNavigatedTo(NavigationEventArgs e) - { - base.OnNavigatedTo(e); + protected override void OnNavigatedTo(NavigationEventArgs e) + { + base.OnNavigatedTo(e); - // Get data objects and place them into an ObservableCollection - List tempList = CustomDataObject.GetDataObjects(); - ObservableCollection Items = new ObservableCollection(tempList); - ObservableCollection Items2 = new ObservableCollection(tempList); - BasicGridView.ItemsSource = Items2; - ContentGridView.ItemsSource = Items; - StyledGrid.ItemsSource = Items; + // Get data objects and place them into an ObservableCollection + List tempList = CustomDataObject.GetDataObjects(); + ObservableCollection Items = new ObservableCollection(tempList); + ObservableCollection Items2 = new ObservableCollection(tempList); + BasicGridView.ItemsSource = Items2; + ContentGridView.ItemsSource = Items; + StyledGrid.ItemsSource = Items; - DisplayDT.Value = @" + DisplayDT.Value = @" "; - } + } - private void ItemTemplate_Checked(object sender, RoutedEventArgs e) + private void ItemTemplate_Checked(object sender, RoutedEventArgs e) + { + var tag = (sender as FrameworkElement).Tag; + if (tag != null) { - var tag = (sender as FrameworkElement).Tag; - if (tag != null) - { - string template = tag.ToString(); - ContentGridView.ItemTemplate = (DataTemplate)this.Resources[template]; - itemTemplate.Value = template; + string template = tag.ToString(); + ContentGridView.ItemTemplate = (DataTemplate)this.Resources[template]; + itemTemplate.Value = template; - if (template == "ImageTemplate") - { - DisplayDT.Value = @" + if (template == "ImageTemplate") + { + DisplayDT.Value = @" "; - } + } - else if (template == "IconTextTemplate") - { - DisplayDT.Value = @" + else if (template == "IconTextTemplate") + { + DisplayDT.Value = @" "; - } + } - else if (template == "ImageTextTemplate") - { - DisplayDT.Value = @" + else if (template == "ImageTextTemplate") + { + DisplayDT.Value = @" @@ -109,114 +109,113 @@ private void ItemTemplate_Checked(object sender, RoutedEventArgs e) "; - } + } - else - { - DisplayDT.Value = @" + else + { + DisplayDT.Value = @" "; - } } } + } - private void ContentGridView_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void ContentGridView_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (sender is GridView gridView) { - if (sender is GridView gridView) - { - SelectionOutput.Text = string.Format("You have selected {0} item(s).", gridView.SelectedItems.Count); - } + SelectionOutput.Text = string.Format("You have selected {0} item(s).", gridView.SelectedItems.Count); } + } - private void ContentGridView_ItemClick(object sender, ItemClickEventArgs e) - { - ClickOutput.Text = "You clicked " + (e.ClickedItem as CustomDataObject).Title + "."; - } + private void ContentGridView_ItemClick(object sender, ItemClickEventArgs e) + { + ClickOutput.Text = "You clicked " + (e.ClickedItem as CustomDataObject).Title + "."; + } - private void BasicGridView_ItemClick(object sender, ItemClickEventArgs e) - { - ClickOutput0.Text = "You clicked " + (e.ClickedItem as CustomDataObject).Title + "."; - } + private void BasicGridView_ItemClick(object sender, ItemClickEventArgs e) + { + ClickOutput0.Text = "You clicked " + (e.ClickedItem as CustomDataObject).Title + "."; + } - private void ItemClickCheckBox_Click(object sender, RoutedEventArgs e) + private void ItemClickCheckBox_Click(object sender, RoutedEventArgs e) + { + ClickOutput.Text = string.Empty; + } + + private void FlowDirectionCheckBox_Click(object sender, RoutedEventArgs e) + { + if (ContentGridView.FlowDirection == FlowDirection.LeftToRight) { - ClickOutput.Text = string.Empty; + ContentGridView.FlowDirection = FlowDirection.RightToLeft; } - - private void FlowDirectionCheckBox_Click(object sender, RoutedEventArgs e) + else { - if (ContentGridView.FlowDirection == FlowDirection.LeftToRight) - { - ContentGridView.FlowDirection = FlowDirection.RightToLeft; - } - else - { - ContentGridView.FlowDirection = FlowDirection.LeftToRight; - } + ContentGridView.FlowDirection = FlowDirection.LeftToRight; } + } - private void SelectionModeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + private void SelectionModeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (ContentGridView != null) { - if (ContentGridView != null) + string colorName = e.AddedItems[0].ToString(); + switch (colorName) { - string colorName = e.AddedItems[0].ToString(); - switch (colorName) - { - case "None": - ContentGridView.SelectionMode = ListViewSelectionMode.None; - SelectionOutput.Text = string.Empty; - break; - case "Single": - ContentGridView.SelectionMode = ListViewSelectionMode.Single; - break; - case "Multiple": - ContentGridView.SelectionMode = ListViewSelectionMode.Multiple; - break; - case "Extended": - ContentGridView.SelectionMode = ListViewSelectionMode.Extended; - break; - } + case "None": + ContentGridView.SelectionMode = ListViewSelectionMode.None; + SelectionOutput.Text = string.Empty; + break; + case "Single": + ContentGridView.SelectionMode = ListViewSelectionMode.Single; + break; + case "Multiple": + ContentGridView.SelectionMode = ListViewSelectionMode.Multiple; + break; + case "Extended": + ContentGridView.SelectionMode = ListViewSelectionMode.Extended; + break; } } + } - private void StyledGrid_InitWrapGrid(object sender, RoutedEventArgs e) - { - // Update ItemsWrapGrid object created on page load by assigning it to StyledGrid's ItemWrapGrid - StyledGridIWG = sender as ItemsWrapGrid; + private void StyledGrid_InitWrapGrid(object sender, RoutedEventArgs e) + { + // Update ItemsWrapGrid object created on page load by assigning it to StyledGrid's ItemWrapGrid + StyledGridIWG = sender as ItemsWrapGrid; - // Now we can change StyledGrid's MaximumRowsorColumns property within its ItemsPanel>ItemsPanelTemplate>ItemsWrapGrid. - StyledGridIWG.MaximumRowsOrColumns = 3; - } - + // Now we can change StyledGrid's MaximumRowsorColumns property within its ItemsPanel>ItemsPanelTemplate>ItemsWrapGrid. + StyledGridIWG.MaximumRowsOrColumns = 3; + } + - private void NumberBox_ValueChanged(Microsoft.UI.Xaml.Controls.NumberBox sender, Microsoft.UI.Xaml.Controls.NumberBoxValueChangedEventArgs args) - { - if(StyledGridIWG == null) { return; } + private void NumberBox_ValueChanged(Microsoft.UI.Xaml.Controls.NumberBox sender, Microsoft.UI.Xaml.Controls.NumberBoxValueChangedEventArgs args) + { + if(StyledGridIWG == null) { return; } - // Only update either max-row value or margins - if(sender == WrapItemCount) - { - StyledGridIWG.MaximumRowsOrColumns = (int)WrapItemCount.Value; - return; - } + // Only update either max-row value or margins + if(sender == WrapItemCount) + { + StyledGridIWG.MaximumRowsOrColumns = (int)WrapItemCount.Value; + return; + } - int rowSpace = (int)RowSpace.Value; - int columnSpace = (int)ColumnSpace.Value; - for (int i = 0; i < StyledGrid.Items.Count; i++) - { - GridViewItem item = StyledGrid.ContainerFromIndex(i) as GridViewItem; + int rowSpace = (int)RowSpace.Value; + int columnSpace = (int)ColumnSpace.Value; + for (int i = 0; i < StyledGrid.Items.Count; i++) + { + GridViewItem item = StyledGrid.ContainerFromIndex(i) as GridViewItem; - Thickness NewMargin = item.Margin; - NewMargin.Left = columnSpace; - NewMargin.Top = rowSpace; - NewMargin.Right = columnSpace; - NewMargin.Bottom = rowSpace; + Thickness NewMargin = item.Margin; + NewMargin.Left = columnSpace; + NewMargin.Top = rowSpace; + NewMargin.Right = columnSpace; + NewMargin.Bottom = rowSpace; - item.Margin = NewMargin; - } + item.Margin = NewMargin; } } } diff --git a/WinUIGallery/ControlPages/HyperlinkButtonPage.xaml.cs b/WinUIGallery/ControlPages/HyperlinkButtonPage.xaml.cs index af08b4cbe..f6c0b9703 100644 --- a/WinUIGallery/ControlPages/HyperlinkButtonPage.xaml.cs +++ b/WinUIGallery/ControlPages/HyperlinkButtonPage.xaml.cs @@ -1,4 +1,4 @@ -//********************************************************* +//********************************************************* // // Copyright (c) Microsoft. All rights reserved. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF @@ -10,18 +10,17 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class HyperlinkButtonPage : Page { - public sealed partial class HyperlinkButtonPage : Page + public HyperlinkButtonPage() { - public HyperlinkButtonPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void GoToHyperlinkButton_Click(object sender, RoutedEventArgs e) - { - NavigationRootPage.GetForElement(this).Navigate(typeof(ItemPage), "ToggleButton"); - } + private void GoToHyperlinkButton_Click(object sender, RoutedEventArgs e) + { + NavigationRootPage.GetForElement(this).Navigate(typeof(ItemPage), "ToggleButton"); } } diff --git a/WinUIGallery/ControlPages/IconElementPage.xaml.cs b/WinUIGallery/ControlPages/IconElementPage.xaml.cs index 9ba8eb259..e7f6d54dc 100644 --- a/WinUIGallery/ControlPages/IconElementPage.xaml.cs +++ b/WinUIGallery/ControlPages/IconElementPage.xaml.cs @@ -14,19 +14,18 @@ using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class IconElementPage : Page { - public sealed partial class IconElementPage : Page + public IconElementPage() { - public IconElementPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void MonochromeButton_CheckedChanged(object sender, RoutedEventArgs e) - { - SlicesIcon.ShowAsMonochrome = (bool)MonochromeButton.IsChecked; - SlicesIcon.UriSource = new Uri("ms-appx:///Assets/slices.png"); - } + private void MonochromeButton_CheckedChanged(object sender, RoutedEventArgs e) + { + SlicesIcon.ShowAsMonochrome = (bool)MonochromeButton.IsChecked; + SlicesIcon.UriSource = new Uri("ms-appx:///Assets/slices.png"); } } diff --git a/WinUIGallery/ControlPages/ImagePage.xaml.cs b/WinUIGallery/ControlPages/ImagePage.xaml.cs index 8af2df09f..a033d8858 100644 --- a/WinUIGallery/ControlPages/ImagePage.xaml.cs +++ b/WinUIGallery/ControlPages/ImagePage.xaml.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -14,23 +14,22 @@ using Microsoft.UI.Xaml.Navigation; using Microsoft.UI.Xaml.Documents; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ImagePage : Page { - public sealed partial class ImagePage : Page + public ImagePage() { - public ImagePage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - private void ImageStretch_Checked(object sender, RoutedEventArgs e) + private void ImageStretch_Checked(object sender, RoutedEventArgs e) + { + if (StretchImage != null) { - if (StretchImage != null) - { - var strStretch = (sender as RadioButton).Content.ToString(); - var stretch = (Stretch)Enum.Parse(typeof(Stretch), strStretch); - StretchImage.Stretch = stretch; - } + var strStretch = (sender as RadioButton).Content.ToString(); + var stretch = (Stretch)Enum.Parse(typeof(Stretch), strStretch); + StretchImage.Stretch = stretch; } } } diff --git a/WinUIGallery/ControlPages/ImplicitTransitionPage.xaml.cs b/WinUIGallery/ControlPages/ImplicitTransitionPage.xaml.cs index 556b6ac56..2f2d5a6c7 100644 --- a/WinUIGallery/ControlPages/ImplicitTransitionPage.xaml.cs +++ b/WinUIGallery/ControlPages/ImplicitTransitionPage.xaml.cs @@ -8,149 +8,148 @@ using Microsoft.UI.Xaml.Controls.Primitives; using WinUIGallery.Helper; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class ImplicitTransitionPage : Page { - public sealed partial class ImplicitTransitionPage : Page + public ImplicitTransitionPage() { - public ImplicitTransitionPage() - { - this.InitializeComponent(); + this.InitializeComponent(); - SetupImplicitTransitionsIfAPIAvailable(); - } + SetupImplicitTransitionsIfAPIAvailable(); + } - void SetupImplicitTransitionsIfAPIAvailable() - { - OpacityRectangle.OpacityTransition = new ScalarTransition(); - RotationRectangle.RotationTransition = new ScalarTransition(); - ScaleRectangle.ScaleTransition = new Vector3Transition(); - TranslateRectangle.TranslationTransition = new Vector3Transition(); - BrushPresenter.BackgroundTransition = new BrushTransition(); - ThemeExampleGrid.BackgroundTransition = new BrushTransition(); - } + void SetupImplicitTransitionsIfAPIAvailable() + { + OpacityRectangle.OpacityTransition = new ScalarTransition(); + RotationRectangle.RotationTransition = new ScalarTransition(); + ScaleRectangle.ScaleTransition = new Vector3Transition(); + TranslateRectangle.TranslationTransition = new Vector3Transition(); + BrushPresenter.BackgroundTransition = new BrushTransition(); + ThemeExampleGrid.BackgroundTransition = new BrushTransition(); + } + + private void OpacityButton_Click(object sender, RoutedEventArgs e) + { + // If the implicit animation API is not present, simply no-op. + if (!(ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))) return; + var customValue = EnsureValueIsNumber(OpacityNumberBox); + OpacityRectangle.Opacity = customValue; + OpacityValue.Value = customValue; + // announce visual change to automation + UIHelper.AnnounceActionForAccessibility(OpacityBtn, $"Rectangle opacity changed by {OpacityValue.Value} points", "RectangleChangedNotificationActivityId"); + } + private void RotationButton_Click(object sender, RoutedEventArgs e) + { + RotationRectangle.CenterPoint = new System.Numerics.Vector3((float)RotationRectangle.ActualWidth / 2, (float)RotationRectangle.ActualHeight / 2, 0f); + + RotationRectangle.Rotation = EnsureValueIsNumber(RotationNumberBox); + // announce visual change to automation + UIHelper.AnnounceActionForAccessibility(RotateBtn, $"Rectangle rotated by {RotationNumberBox.Value} degrees", "RectangleChangedNotificationActivityId"); + } + private void ScaleButton_Click(object sender, RoutedEventArgs e) + { + var _scaleTransition = ScaleRectangle.ScaleTransition; + + _scaleTransition.Components = ((ScaleX.IsChecked == true) ? Vector3TransitionComponents.X : 0) | + ((ScaleY.IsChecked == true) ? Vector3TransitionComponents.Y : 0) | + ((ScaleZ.IsChecked == true) ? Vector3TransitionComponents.Z : 0); - private void OpacityButton_Click(object sender, RoutedEventArgs e) + float customValue; + + if (sender != null && (sender as Button).Tag != null) { - // If the implicit animation API is not present, simply no-op. - if (!(ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))) return; - var customValue = EnsureValueIsNumber(OpacityNumberBox); - OpacityRectangle.Opacity = customValue; - OpacityValue.Value = customValue; - // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(OpacityBtn, $"Rectangle opacity changed by {OpacityValue.Value} points", "RectangleChangedNotificationActivityId"); + customValue = (float)Convert.ToDouble((sender as Button).Tag); } - private void RotationButton_Click(object sender, RoutedEventArgs e) + else { - RotationRectangle.CenterPoint = new System.Numerics.Vector3((float)RotationRectangle.ActualWidth / 2, (float)RotationRectangle.ActualHeight / 2, 0f); - - RotationRectangle.Rotation = EnsureValueIsNumber(RotationNumberBox); - // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(RotateBtn, $"Rectangle rotated by {RotationNumberBox.Value} degrees", "RectangleChangedNotificationActivityId"); + customValue = EnsureValueIsNumber(ScaleNumberBox); } - private void ScaleButton_Click(object sender, RoutedEventArgs e) - { - var _scaleTransition = ScaleRectangle.ScaleTransition; - _scaleTransition.Components = ((ScaleX.IsChecked == true) ? Vector3TransitionComponents.X : 0) | - ((ScaleY.IsChecked == true) ? Vector3TransitionComponents.Y : 0) | - ((ScaleZ.IsChecked == true) ? Vector3TransitionComponents.Z : 0); + ScaleRectangle.Scale = new Vector3(customValue); + ScaleValue.Value = customValue; + // announce visual change to automation + UIHelper.AnnounceActionForAccessibility(ScaleBtn, $"Rectangle scaled by {ScaleValue.Value} points", "RectangleChangedNotificationActivityId"); + } - float customValue; + private void TranslateButton_Click(object sender, RoutedEventArgs e) + { + var _translationTransition = TranslateRectangle.TranslationTransition; - if (sender != null && (sender as Button).Tag != null) - { - customValue = (float)Convert.ToDouble((sender as Button).Tag); - } - else - { - customValue = EnsureValueIsNumber(ScaleNumberBox); - } + _translationTransition.Components = ((TranslateX.IsChecked == true) ? Vector3TransitionComponents.X : 0) | + ((TranslateY.IsChecked == true) ? Vector3TransitionComponents.Y : 0) | + ((TranslateZ.IsChecked == true) ? Vector3TransitionComponents.Z : 0); - ScaleRectangle.Scale = new Vector3(customValue); - ScaleValue.Value = customValue; - // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(ScaleBtn, $"Rectangle scaled by {ScaleValue.Value} points", "RectangleChangedNotificationActivityId"); + float customValue; + if (sender != null && (sender as Button).Tag != null) + { + customValue = (float)Convert.ToDouble((sender as Button).Tag); } - - private void TranslateButton_Click(object sender, RoutedEventArgs e) + else { - var _translationTransition = TranslateRectangle.TranslationTransition; + customValue = EnsureValueIsNumber(TranslationNumberBox); + } - _translationTransition.Components = ((TranslateX.IsChecked == true) ? Vector3TransitionComponents.X : 0) | - ((TranslateY.IsChecked == true) ? Vector3TransitionComponents.Y : 0) | - ((TranslateZ.IsChecked == true) ? Vector3TransitionComponents.Z : 0); + TranslateRectangle.Translation = new Vector3(customValue); + TranslationValue.Value = customValue; + // announce visual change to automation + UIHelper.AnnounceActionForAccessibility(TranslateBtn, $"Rectangle translated by {TranslationValue.Value} points", "RectangleChangedNotificationActivityId"); + } - float customValue; - if (sender != null && (sender as Button).Tag != null) - { - customValue = (float)Convert.ToDouble((sender as Button).Tag); - } - else + private void NumberBox_KeyDown(object sender, KeyRoutedEventArgs e) + { + if (e.Key == Windows.System.VirtualKey.Enter) + { + if ((string)(sender as NumberBox).Header == "Opacity (0.0 to 1.0)") { - customValue = EnsureValueIsNumber(TranslationNumberBox); + OpacityButton_Click(null, null); } - - TranslateRectangle.Translation = new Vector3(customValue); - TranslationValue.Value = customValue; - // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(TranslateBtn, $"Rectangle translated by {TranslationValue.Value} points", "RectangleChangedNotificationActivityId"); - } - - private void NumberBox_KeyDown(object sender, KeyRoutedEventArgs e) - { - if (e.Key == Windows.System.VirtualKey.Enter) + if ((string)(sender as NumberBox).Header == "Rotation (0.0 to 360.0)") { - if ((string)(sender as NumberBox).Header == "Opacity (0.0 to 1.0)") - { - OpacityButton_Click(null, null); - } - if ((string)(sender as NumberBox).Header == "Rotation (0.0 to 360.0)") - { - RotationButton_Click(null, null); - } - if ((string)(sender as NumberBox).Header == "Scale (0.0 to 5.0)") - { - ScaleButton_Click(null, null); - } - if ((string)(sender as NumberBox).Header == "Translation (0.0 to 200.0)") - { - TranslateButton_Click(null, null); - } + RotationButton_Click(null, null); } - } - - private void BackgroundButton_Click(object sender, RoutedEventArgs e) - { - - if ((BrushPresenter.Background as SolidColorBrush).Color == Microsoft.UI.Colors.Blue) + if ((string)(sender as NumberBox).Header == "Scale (0.0 to 5.0)") { - BrushPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Yellow); - // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(BgColorBtn, "Rectangle color changed to Yellow", "RectangleChangedNotificationActivityId"); + ScaleButton_Click(null, null); } - else + if ((string)(sender as NumberBox).Header == "Translation (0.0 to 200.0)") { - BrushPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Blue); - // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(BgColorBtn, "Rectangle color changed to Blue", "RectangleChangedNotificationActivityId"); + TranslateButton_Click(null, null); } - } + } - private float EnsureValueIsNumber(NumberBox numberBox) + private void BackgroundButton_Click(object sender, RoutedEventArgs e) + { + + if ((BrushPresenter.Background as SolidColorBrush).Color == Microsoft.UI.Colors.Blue) { - if(double.IsNaN(numberBox.Value)) - { - numberBox.Value = 0; - } - return (float)numberBox.Value; + BrushPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Yellow); + // announce visual change to automation + UIHelper.AnnounceActionForAccessibility(BgColorBtn, "Rectangle color changed to Yellow", "RectangleChangedNotificationActivityId"); } - - private void ThemeButton_Click(object sender, RoutedEventArgs e) + else { - ThemeExampleGrid.RequestedTheme = ThemeExampleGrid.RequestedTheme == ElementTheme.Dark ? ElementTheme.Light : ElementTheme.Dark; + BrushPresenter.Background = new SolidColorBrush(Microsoft.UI.Colors.Blue); // announce visual change to automation - UIHelper.AnnounceActionForAccessibility(ChangeThemeBtn, $"UI local theme changed", "UILocalThemeChangedNotificationActivityId"); + UIHelper.AnnounceActionForAccessibility(BgColorBtn, "Rectangle color changed to Blue", "RectangleChangedNotificationActivityId"); } + + } + + private float EnsureValueIsNumber(NumberBox numberBox) + { + if(double.IsNaN(numberBox.Value)) + { + numberBox.Value = 0; + } + return (float)numberBox.Value; + } + + private void ThemeButton_Click(object sender, RoutedEventArgs e) + { + ThemeExampleGrid.RequestedTheme = ThemeExampleGrid.RequestedTheme == ElementTheme.Dark ? ElementTheme.Light : ElementTheme.Dark; + // announce visual change to automation + UIHelper.AnnounceActionForAccessibility(ChangeThemeBtn, $"UI local theme changed", "UILocalThemeChangedNotificationActivityId"); } } diff --git a/WinUIGallery/ControlPages/InfoBadgePage.xaml.cs b/WinUIGallery/ControlPages/InfoBadgePage.xaml.cs index 8e1e50cad..cd4ba1e3e 100644 --- a/WinUIGallery/ControlPages/InfoBadgePage.xaml.cs +++ b/WinUIGallery/ControlPages/InfoBadgePage.xaml.cs @@ -2,89 +2,88 @@ using Microsoft.UI.Xaml.Controls; using WinUIGallery.DesktopWap.Controls; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class InfoBadgePage : Page { - public sealed partial class InfoBadgePage : Page + public InfoBadgePage() { - public InfoBadgePage() - { - this.InitializeComponent(); - } - public double InfoBadgeOpacity - { - get { return (double)GetValue(InfoBadgeOpacityProperty); } - set { SetValue(InfoBadgeOpacityProperty, value); } - } + this.InitializeComponent(); + } + public double InfoBadgeOpacity + { + get { return (double)GetValue(InfoBadgeOpacityProperty); } + set { SetValue(InfoBadgeOpacityProperty, value); } + } - public static readonly DependencyProperty InfoBadgeOpacityProperty = - DependencyProperty.Register("ShadowOpacity", typeof(double), typeof(PageHeader), new PropertyMetadata(0.0)); + public static readonly DependencyProperty InfoBadgeOpacityProperty = + DependencyProperty.Register("ShadowOpacity", typeof(double), typeof(PageHeader), new PropertyMetadata(0.0)); - public void NavigationViewDisplayMode_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - string paneDisplayMode = e.AddedItems[0].ToString(); + public void NavigationViewDisplayMode_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + string paneDisplayMode = e.AddedItems[0].ToString(); - switch (paneDisplayMode) - { - case "LeftExpanded": - nvSample1.PaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Left; - nvSample1.IsPaneOpen = true; - break; + switch (paneDisplayMode) + { + case "LeftExpanded": + nvSample1.PaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Left; + nvSample1.IsPaneOpen = true; + break; - case "LeftCompact": - nvSample1.PaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.LeftCompact; - nvSample1.IsPaneOpen = false; - break; + case "LeftCompact": + nvSample1.PaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.LeftCompact; + nvSample1.IsPaneOpen = false; + break; - case "Top": - nvSample1.PaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Top; - nvSample1.IsPaneOpen = true; - break; - } + case "Top": + nvSample1.PaneDisplayMode = Microsoft.UI.Xaml.Controls.NavigationViewPaneDisplayMode.Top; + nvSample1.IsPaneOpen = true; + break; } + } - private void ToggleInfoBadgeOpacity_Toggled(object sender, RoutedEventArgs e) - { - InfoBadgeOpacity = (InfoBadgeOpacity == 0.0) ? 1.0 : 0.0; - } + private void ToggleInfoBadgeOpacity_Toggled(object sender, RoutedEventArgs e) + { + InfoBadgeOpacity = (InfoBadgeOpacity == 0.0) ? 1.0 : 0.0; + } - public void InfoBadgeStyleComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - string infoBadgeStyle = e.AddedItems[0].ToString(); + public void InfoBadgeStyleComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + string infoBadgeStyle = e.AddedItems[0].ToString(); - switch (infoBadgeStyle) - { - case "Attention": - infoBadge2.Style = Application.Current.Resources["AttentionIconInfoBadgeStyle"] as Style; - infoBadge3.Style = Application.Current.Resources["AttentionValueInfoBadgeStyle"] as Style; - infoBadge4.Style = Application.Current.Resources["AttentionDotInfoBadgeStyle"] as Style; - break; + switch (infoBadgeStyle) + { + case "Attention": + infoBadge2.Style = Application.Current.Resources["AttentionIconInfoBadgeStyle"] as Style; + infoBadge3.Style = Application.Current.Resources["AttentionValueInfoBadgeStyle"] as Style; + infoBadge4.Style = Application.Current.Resources["AttentionDotInfoBadgeStyle"] as Style; + break; - case "Informational": - infoBadge2.Style = Application.Current.Resources["InformationalIconInfoBadgeStyle"] as Style; - infoBadge3.Style = Application.Current.Resources["InformationalValueInfoBadgeStyle"] as Style; - infoBadge4.Style = Application.Current.Resources["InformationalDotInfoBadgeStyle"] as Style; - break; + case "Informational": + infoBadge2.Style = Application.Current.Resources["InformationalIconInfoBadgeStyle"] as Style; + infoBadge3.Style = Application.Current.Resources["InformationalValueInfoBadgeStyle"] as Style; + infoBadge4.Style = Application.Current.Resources["InformationalDotInfoBadgeStyle"] as Style; + break; - case "Success": - infoBadge2.Style = Application.Current.Resources["SuccessIconInfoBadgeStyle"] as Style; - infoBadge3.Style = Application.Current.Resources["SuccessValueInfoBadgeStyle"] as Style; - infoBadge4.Style = Application.Current.Resources["SuccessDotInfoBadgeStyle"] as Style; - break; + case "Success": + infoBadge2.Style = Application.Current.Resources["SuccessIconInfoBadgeStyle"] as Style; + infoBadge3.Style = Application.Current.Resources["SuccessValueInfoBadgeStyle"] as Style; + infoBadge4.Style = Application.Current.Resources["SuccessDotInfoBadgeStyle"] as Style; + break; - case "Critical": - infoBadge2.Style = Application.Current.Resources["CriticalIconInfoBadgeStyle"] as Style; - infoBadge3.Style = Application.Current.Resources["CriticalValueInfoBadgeStyle"] as Style; - infoBadge4.Style = Application.Current.Resources["CriticalDotInfoBadgeStyle"] as Style; - break; - } + case "Critical": + infoBadge2.Style = Application.Current.Resources["CriticalIconInfoBadgeStyle"] as Style; + infoBadge3.Style = Application.Current.Resources["CriticalValueInfoBadgeStyle"] as Style; + infoBadge4.Style = Application.Current.Resources["CriticalDotInfoBadgeStyle"] as Style; + break; } + } - private void ValueNumberBox_ValueChanged(Microsoft.UI.Xaml.Controls.NumberBox sender, Microsoft.UI.Xaml.Controls.NumberBoxValueChangedEventArgs args) + private void ValueNumberBox_ValueChanged(Microsoft.UI.Xaml.Controls.NumberBox sender, Microsoft.UI.Xaml.Controls.NumberBoxValueChangedEventArgs args) + { + if ((int)args.NewValue >= -1) { - if ((int)args.NewValue >= -1) - { - DynamicInfoBadge.Value = (int)args.NewValue; - } + DynamicInfoBadge.Value = (int)args.NewValue; } } } diff --git a/WinUIGallery/ControlPages/InfoBarPage.xaml.cs b/WinUIGallery/ControlPages/InfoBarPage.xaml.cs index cdd1a6142..e2052a16a 100644 --- a/WinUIGallery/ControlPages/InfoBarPage.xaml.cs +++ b/WinUIGallery/ControlPages/InfoBarPage.xaml.cs @@ -2,94 +2,91 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; -namespace WinUIGallery.ControlPages +namespace WinUIGallery.ControlPages; + +public sealed partial class InfoBarPage : Page { - public sealed partial class InfoBarPage : Page + public InfoBarPage() { - public InfoBarPage() - { - this.InitializeComponent(); - } + this.InitializeComponent(); + } - protected override void OnNavigatedTo(NavigationEventArgs e) - { - DisplayMessage.Value = "A long essential app message..."; - DisplayButton.Value = string.Empty; - } + protected override void OnNavigatedTo(NavigationEventArgs e) + { + DisplayMessage.Value = "A long essential app message..."; + DisplayButton.Value = string.Empty; + } - private void SeverityComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - string severityName = e.AddedItems[0].ToString(); + private void SeverityComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + string severityName = e.AddedItems[0].ToString(); - switch (severityName) - { - case "Error": - TestInfoBar1.Severity = InfoBarSeverity.Error; - break; + switch (severityName) + { + case "Error": + TestInfoBar1.Severity = InfoBarSeverity.Error; + break; - case "Warning": - TestInfoBar1.Severity = InfoBarSeverity.Warning; - break; + case "Warning": + TestInfoBar1.Severity = InfoBarSeverity.Warning; + break; - case "Success": - TestInfoBar1.Severity = InfoBarSeverity.Success; - break; + case "Success": + TestInfoBar1.Severity = InfoBarSeverity.Success; + break; - case "Informational": - default: - TestInfoBar1.Severity = InfoBarSeverity.Informational; - break; - } + case "Informational": + default: + TestInfoBar1.Severity = InfoBarSeverity.Informational; + break; } + } - private void MessageComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (TestInfoBar2 == null) return; + private void MessageComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (TestInfoBar2 == null) return; - if (MessageComboBox.SelectedIndex == 0) // short - { - string shortMessage = "A short essential app message."; - TestInfoBar2.Message = shortMessage; - DisplayMessage.Value = shortMessage; - } - else if (MessageComboBox.SelectedIndex == 1) //long - { - TestInfoBar2.Message = @"A long essential app message for your users to be informed of, acknowledge, or take action on. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dapibus dolor vitae justo rutrum, ut lobortis nibh mattis. Aenean id elit commodo, semper felis nec."; - DisplayMessage.Value = "A long essential app message..."; - } + if (MessageComboBox.SelectedIndex == 0) // short + { + string shortMessage = "A short essential app message."; + TestInfoBar2.Message = shortMessage; + DisplayMessage.Value = shortMessage; } - - private void ActionButtonComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + else if (MessageComboBox.SelectedIndex == 1) //long { - if (TestInfoBar2 == null) return; + TestInfoBar2.Message = @"A long essential app message for your users to be informed of, acknowledge, or take action on. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin dapibus dolor vitae justo rutrum, ut lobortis nibh mattis. Aenean id elit commodo, semper felis nec."; + DisplayMessage.Value = "A long essential app message..."; + } + } + + private void ActionButtonComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + if (TestInfoBar2 == null) return; - if (ActionButtonComboBox.SelectedIndex == 0) // none - { - TestInfoBar2.ActionButton = null; - DisplayButton.Value = string.Empty; - } - else if (ActionButtonComboBox.SelectedIndex == 1) // button - { - var button = new Button(); - button.Content = "Action"; - TestInfoBar2.ActionButton = button; - DisplayButton.Value = @" + if (ActionButtonComboBox.SelectedIndex == 0) // none + { + TestInfoBar2.ActionButton = null; + DisplayButton.Value = string.Empty; + } + else if (ActionButtonComboBox.SelectedIndex == 1) // button + { + var button = new Button(); + button.Content = "Action"; + TestInfoBar2.ActionButton = button; + DisplayButton.Value = @"