From f4a0e17fba0edee52a3af4844e88b0a8dd143585 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 16 Oct 2022 00:08:30 +0000 Subject: [PATCH] Automated dotnet-format update --- .../Onboarding/OnboardingCarouselPage.cs | 6 +- .../Pages/Trends/BaseTrendsContentPage.cs | 6 +- GitTrends/Services/FirstRunService.cs | 12 +-- GitTrends/Themes/BaseTheme.cs | 42 ++++----- GitTrends/Themes/DarkTheme.cs | 86 +++++++++---------- GitTrends/Themes/LightTheme.cs | 76 ++++++++-------- GitTrends/Views/Base/BorderButton.cs | 6 +- GitTrends/Views/Base/EmptyDataView.cs | 6 +- .../Settings/OrganizationsCarouselOverlay.cs | 18 ++-- GitTrends/Views/Trends/StarsChart.cs | 34 ++++---- 10 files changed, 146 insertions(+), 146 deletions(-) diff --git a/GitTrends/Pages/Onboarding/OnboardingCarouselPage.cs b/GitTrends/Pages/Onboarding/OnboardingCarouselPage.cs index e388e149e..3d978c8f9 100644 --- a/GitTrends/Pages/Onboarding/OnboardingCarouselPage.cs +++ b/GitTrends/Pages/Onboarding/OnboardingCarouselPage.cs @@ -26,9 +26,9 @@ public OnboardingCarouselPage(IMainThread mainThread, Children.Add(chartOnboardingPage); Children.Add(notificationsOnboardingPage); Children.Add(connectToGitHubOnboardingPage); - } - - //Disable the Hardware Back Button on Android + } + + //Disable the Hardware Back Button on Android protected override bool OnBackButtonPressed() => false; void HandleSkipButtonTapped(object sender, EventArgs e) diff --git a/GitTrends/Pages/Trends/BaseTrendsContentPage.cs b/GitTrends/Pages/Trends/BaseTrendsContentPage.cs index aa611fab6..f287f58ff 100644 --- a/GitTrends/Pages/Trends/BaseTrendsContentPage.cs +++ b/GitTrends/Pages/Trends/BaseTrendsContentPage.cs @@ -79,9 +79,9 @@ public TrendsIndicatorView(in int position, in Color indicatorColor) class TrendsChartActivityIndicator : ActivityIndicator { public TrendsChartActivityIndicator(TrendsPageType trendsPageType) - { - //The size of UIActivityIndicator is fixed by iOS, so we'll use Xamarin.Forms.VisualElement.Scale to increase its size - //https://stackoverflow.com/a/2638224/5953643 + { + //The size of UIActivityIndicator is fixed by iOS, so we'll use Xamarin.Forms.VisualElement.Scale to increase its size + //https://stackoverflow.com/a/2638224/5953643 if (Device.RuntimePlatform is Device.iOS) Scale = 2; diff --git a/GitTrends/Services/FirstRunService.cs b/GitTrends/Services/FirstRunService.cs index 7342c46d1..589356e12 100644 --- a/GitTrends/Services/FirstRunService.cs +++ b/GitTrends/Services/FirstRunService.cs @@ -9,10 +9,10 @@ public class FirstRunService public FirstRunService(IPreferences preferences) { - _preferences = preferences; - + _preferences = preferences; + #if !AppStore - UITestsBackdoorService.PopPageStarted += HandlePagePopped; + UITestsBackdoorService.PopPageStarted += HandlePagePopped; #endif GitHubAuthenticationService.AuthorizeSessionCompleted += HandleAuthorizeSessionCompleted; GitHubAuthenticationService.DemoUserActivated += HandleDemoUserActivated; @@ -25,10 +25,10 @@ public bool IsFirstRun } void HandleDemoUserActivated(object sender, EventArgs e) => IsFirstRun = false; - void HandleAuthorizeSessionCompleted(object sender, AuthorizeSessionCompletedEventArgs e) => IsFirstRun = false; - + void HandleAuthorizeSessionCompleted(object sender, AuthorizeSessionCompletedEventArgs e) => IsFirstRun = false; + #if !AppStore - void HandlePagePopped(object sender, EventArgs e) => IsFirstRun = false; + void HandlePagePopped(object sender, EventArgs e) => IsFirstRun = false; #endif } } \ No newline at end of file diff --git a/GitTrends/Themes/BaseTheme.cs b/GitTrends/Themes/BaseTheme.cs index 861a9b39e..d6d57f236 100644 --- a/GitTrends/Themes/BaseTheme.cs +++ b/GitTrends/Themes/BaseTheme.cs @@ -97,35 +97,35 @@ protected BaseTheme() public abstract Color TextColor { get; } public abstract Color ActivityIndicatorColor { get; } - public abstract Color PullToRefreshColor { get; } - - //Chart + public abstract Color PullToRefreshColor { get; } + + //Chart public abstract Color TotalViewsColor { get; } public abstract Color TotalUniqueViewsColor { get; } public abstract Color TotalClonesColor { get; } public abstract Color TotalUniqueClonesColor { get; } public abstract Color ChartAxisTextColor { get; } - public abstract Color ChartAxisLineColor { get; } - - //Components - public abstract Color SplashScreenStatusColor { get; } - - //Icons + public abstract Color ChartAxisLineColor { get; } + + //Components + public abstract Color SplashScreenStatusColor { get; } + + //Icons public abstract Color IconColor { get; } - public abstract Color IconPrimaryColor { get; } - - //Buttons + public abstract Color IconPrimaryColor { get; } + + //Buttons public abstract Color ButtonTextColor { get; } - public abstract Color ButtonBackgroundColor { get; } - - //Card + public abstract Color ButtonBackgroundColor { get; } + + //Card public abstract Color CardSurfaceColor { get; } public abstract Color CardBorderColor { get; } - public abstract Color SeparatorColor { get; } - - //Card Stats Color + public abstract Color SeparatorColor { get; } + + //Card Stats Color public abstract Color CardStarsStatsTextColor { get; } public abstract Color CardStarsStatsIconColor { get; } public abstract Color CardForksStatsTextColor { get; } @@ -140,9 +140,9 @@ protected BaseTheme() public abstract Color CardUniqueViewsStatsIconColor { get; } public abstract Color CardUniqueClonesStatsTextColor { get; } public abstract Color CardUniqueClonesStatsIconColor { get; } - public abstract Color CardTrendingStatsColor { get; } - - //Settings Components + public abstract Color CardTrendingStatsColor { get; } + + //Settings Components public abstract Color SettingsLabelTextColor { get; } public abstract Color BorderButtonBorderColor { get; } public abstract Color BorderButtonFontColor { get; } diff --git a/GitTrends/Themes/DarkTheme.cs b/GitTrends/Themes/DarkTheme.cs index 54eee10f2..301cd1e89 100644 --- a/GitTrends/Themes/DarkTheme.cs +++ b/GitTrends/Themes/DarkTheme.cs @@ -23,25 +23,25 @@ public class DarkTheme : BaseTheme const string _cardSurfaceHex = "#1D2221"; const string _toolbarSurfaceHex = "#1E2423"; const string _circleImageBackgroundHex = "#FFFFFF"; - const string _githubButtonSurfaceHex = "#231F20"; - - //Saturated colors from light theme + const string _githubButtonSurfaceHex = "#231F20"; + + //Saturated colors from light theme const string _lightAccentYellowHex = "#FCBC66"; const string _lightAccentOrangeHex = CoralColorHex; const string _lightAccentLightBlueHex = "#66A7FC"; const string _lightAccentPurpleHex = "#8F3795"; - const string _lightPrimaryTealHex = LightTealColorHex; - - //Graph Palette + const string _lightPrimaryTealHex = LightTealColorHex; + + //Graph Palette const string _saturatedLightBlueHex = "#2BC3BE"; const string _saturatedIndigoHex = "#5D6AB1"; const string _saturatedYellowHex = "#FFC534"; - const string _saturatedPinkHex = "#F2726F"; - - //Blended Colors - const string _white12PercentBlend = "#2F2F2F"; - - //Surface Elevations + const string _saturatedPinkHex = "#F2726F"; + + //Blended Colors + const string _white12PercentBlend = "#2F2F2F"; + + //Surface Elevations const string _surfaceElevation0dpHex = "#121212"; const string _surfaceElevation1dpHex = "#181B1B"; const string _surfaceElevation2dpHex = "#1B1F1F"; @@ -51,51 +51,51 @@ public class DarkTheme : BaseTheme const string _surfaceElevation8dpHex = "#212827"; const string _surfaceElevation12dpHex = "#232B2A"; const string _surfaceElevation16dpHex = "#242D2C"; - const string _surfaceElevation24dpHex = "#262F2E"; - - //Surfaces + const string _surfaceElevation24dpHex = "#262F2E"; + + //Surfaces public override Color NavigationBarBackgroundColor { get; } = Color.FromHex(_toolbarSurfaceHex); public override Color NavigationBarTextColor { get; } = Color.FromHex(_toolbarTextHex); public override Color PageBackgroundColor { get; } = Color.FromHex(PageBackgroundColorHex); - public override Color PageBackgroundColor_85Opactity { get; } = Color.FromHex(PageBackgroundColorHex).MultiplyAlpha(0.85); - - //Text + public override Color PageBackgroundColor_85Opactity { get; } = Color.FromHex(PageBackgroundColorHex).MultiplyAlpha(0.85); + + //Text public override Color PrimaryTextColor { get; } = Color.FromHex(_primaryTextHex); - public override Color TextColor { get; } = Color.FromHex(_textHex); - - //Chart + public override Color TextColor { get; } = Color.FromHex(_textHex); + + //Chart public override Color TotalViewsColor { get; } = Color.FromHex(_saturatedLightBlueHex); public override Color TotalUniqueViewsColor { get; } = Color.FromHex(_saturatedIndigoHex); public override Color TotalClonesColor { get; } = Color.FromHex(_saturatedYellowHex); public override Color TotalUniqueClonesColor { get; } = Color.FromHex(_saturatedPinkHex); public override Color ChartAxisTextColor { get; } = Color.FromHex(_primaryTextHex); - public override Color ChartAxisLineColor { get; } = Color.FromHex(_primaryTextHex); - - //Components - //Splash - public override Color SplashScreenStatusColor { get; } = Color.FromHex(_offWhite); - - //Icons + public override Color ChartAxisLineColor { get; } = Color.FromHex(_primaryTextHex); + + //Components + //Splash + public override Color SplashScreenStatusColor { get; } = Color.FromHex(_offWhite); + + //Icons public override Color IconColor { get; } = Color.FromHex(_primaryTealHex); - public override Color IconPrimaryColor { get; } = Color.FromHex(_lightPrimaryTealHex); - - //Buttons + public override Color IconPrimaryColor { get; } = Color.FromHex(_lightPrimaryTealHex); + + //Buttons public override Color ButtonTextColor { get; } = Color.FromHex(_lightPrimaryTealHex); - public override Color ButtonBackgroundColor { get; } = Color.FromHex(_buttonTextColor); - - //Indicators + public override Color ButtonBackgroundColor { get; } = Color.FromHex(_buttonTextColor); + + //Indicators public override Color ActivityIndicatorColor { get; } = Color.FromHex(_lightPrimaryTealHex); - public override Color PullToRefreshColor { get; } = Device.RuntimePlatform is Device.iOS ? Color.FromHex(_lightPrimaryTealHex) : Color.FromHex(_toolbarSurfaceHex); - - //Card + public override Color PullToRefreshColor { get; } = Device.RuntimePlatform is Device.iOS ? Color.FromHex(_lightPrimaryTealHex) : Color.FromHex(_toolbarSurfaceHex); + + //Card public override Color CardSurfaceColor { get; } = Color.FromHex(_cardSurfaceHex); public override Color CardBorderColor { get; } = Color.FromHex(_cardSurfaceHex); - public override Color SeparatorColor { get; } = Color.FromHex(_white12PercentBlend); - - //Card Stats Color + public override Color SeparatorColor { get; } = Color.FromHex(_white12PercentBlend); + + //Card Stats Color public override Color CardStarsStatsTextColor { get; } = Color.FromHex(_lightAccentYellowHex); public override Color CardStarsStatsIconColor { get; } = Color.FromHex(_lightAccentYellowHex); public override Color CardForksStatsTextColor { get; } = Color.FromHex(_lightPrimaryTealHex); @@ -110,9 +110,9 @@ public class DarkTheme : BaseTheme public override Color CardUniqueViewsStatsIconColor { get; } = Color.FromHex(_saturatedIndigoHex); public override Color CardUniqueClonesStatsTextColor { get; } = Color.FromHex(_saturatedPinkHex); public override Color CardUniqueClonesStatsIconColor { get; } = Color.FromHex(_saturatedPinkHex); - public override Color CardTrendingStatsColor { get; } = Color.FromHex(_primaryTealHex); - - //Settings Components + public override Color CardTrendingStatsColor { get; } = Color.FromHex(_primaryTealHex); + + //Settings Components public override Color SettingsLabelTextColor { get; } = Color.FromHex(_textHex); public override Color BorderButtonBorderColor { get; } = Color.FromHex(_white12PercentBlend); public override Color BorderButtonFontColor { get; } = Color.FromHex(_textHex); diff --git a/GitTrends/Themes/LightTheme.cs b/GitTrends/Themes/LightTheme.cs index 48c553e5a..16ded90e8 100644 --- a/GitTrends/Themes/LightTheme.cs +++ b/GitTrends/Themes/LightTheme.cs @@ -20,61 +20,61 @@ public class LightTheme : BaseTheme const string _cardSurfaceHex = "#FFFFFF"; const string _toolbarSurfaceHex = LightTealColorHex; const string _circleImageBackgroundHex = "#FFFFFF"; - const string _githubButtonSurfaceHex = "#231F20"; - - //Graph Palette + const string _githubButtonSurfaceHex = "#231F20"; + + //Graph Palette const string _saturatedLightBlueHex = "#2BC3BE"; const string _saturatedIndigoHex = "#5D6AB1"; const string _saturatedYellowHex = "#FFC534"; - const string _saturatedPinkHex = "#F2726F"; - - //Blended Colors - const string _black12PercentBlend = "#E0E0E0"; - - //Surfaces + const string _saturatedPinkHex = "#F2726F"; + + //Blended Colors + const string _black12PercentBlend = "#E0E0E0"; + + //Surfaces public override Color NavigationBarBackgroundColor { get; } = Color.FromHex(_toolbarSurfaceHex); public override Color NavigationBarTextColor { get; } = Color.FromHex(_toolbarTextHex); public override Color PageBackgroundColor { get; } = Color.FromHex(_pageBackgroundColorHex); - public override Color PageBackgroundColor_85Opactity { get; } = Color.FromHex(_pageBackgroundColorHex).MultiplyAlpha(0.85); - - //Text + public override Color PageBackgroundColor_85Opactity { get; } = Color.FromHex(_pageBackgroundColorHex).MultiplyAlpha(0.85); + + //Text public override Color PrimaryTextColor { get; } = Color.FromHex(_primaryTextHex); - public override Color TextColor { get; } = Color.FromHex(_textHex); - - - //Chart + public override Color TextColor { get; } = Color.FromHex(_textHex); + + + //Chart public override Color TotalViewsColor { get; } = Color.FromHex(_saturatedLightBlueHex); public override Color TotalUniqueViewsColor { get; } = Color.FromHex(_saturatedIndigoHex); public override Color TotalClonesColor { get; } = Color.FromHex(_saturatedYellowHex); public override Color TotalUniqueClonesColor { get; } = Color.FromHex(_saturatedPinkHex); public override Color ChartAxisTextColor { get; } = Color.FromHex(_primaryTextHex); - public override Color ChartAxisLineColor { get; } = Color.FromHex(_primaryTextHex); - - //Components - //Splash - public override Color SplashScreenStatusColor { get; } = Color.FromHex(_primaryTextHex); - - //Icons + public override Color ChartAxisLineColor { get; } = Color.FromHex(_primaryTextHex); + + //Components + //Splash + public override Color SplashScreenStatusColor { get; } = Color.FromHex(_primaryTextHex); + + //Icons public override Color IconColor { get; } = Color.FromHex(_iconColor); - public override Color IconPrimaryColor { get; } = Color.FromHex(_primaryTealHex); - - //Buttons + public override Color IconPrimaryColor { get; } = Color.FromHex(_primaryTealHex); + + //Buttons public override Color ButtonTextColor { get; } = Color.FromHex(_buttonTextColor); - public override Color ButtonBackgroundColor { get; } = Color.FromHex(_primaryTealHex); - - //Indicators + public override Color ButtonBackgroundColor { get; } = Color.FromHex(_primaryTealHex); + + //Indicators public override Color ActivityIndicatorColor { get; } = Color.FromHex(_primaryDarkTealHex); - public override Color PullToRefreshColor { get; } = Color.FromHex(_toolbarSurfaceHex); - - //Card + public override Color PullToRefreshColor { get; } = Color.FromHex(_toolbarSurfaceHex); + + //Card public override Color CardSurfaceColor { get; } = Color.FromHex(_cardSurfaceHex); public override Color CardBorderColor { get; } = Color.FromHex(_black12PercentBlend); - public override Color SeparatorColor { get; } = Color.FromHex(_black12PercentBlend); - - //Card Stats Color + public override Color SeparatorColor { get; } = Color.FromHex(_black12PercentBlend); + + //Card Stats Color public override Color CardStarsStatsTextColor { get; } = Color.FromHex(_textHex); public override Color CardStarsStatsIconColor { get; } = Color.FromHex(_accentYellowHex); public override Color CardForksStatsTextColor { get; } = Color.FromHex(_textHex); @@ -89,9 +89,9 @@ public class LightTheme : BaseTheme public override Color CardUniqueViewsStatsIconColor { get; } = Color.FromHex(_saturatedIndigoHex); public override Color CardUniqueClonesStatsTextColor { get; } = Color.FromHex(_textHex); public override Color CardUniqueClonesStatsIconColor { get; } = Color.FromHex(_saturatedPinkHex); - public override Color CardTrendingStatsColor { get; } = Color.FromHex(_primaryTealHex); - - //Settings Components + public override Color CardTrendingStatsColor { get; } = Color.FromHex(_primaryTealHex); + + //Settings Components public override Color SettingsLabelTextColor { get; } = Color.FromHex(_primaryTextHex); public override Color BorderButtonBorderColor { get; } = Color.FromHex(_black12PercentBlend); public override Color BorderButtonFontColor { get; } = Color.FromHex(_primaryTextHex); diff --git a/GitTrends/Views/Base/BorderButton.cs b/GitTrends/Views/Base/BorderButton.cs index cbad94131..1f2cab6c7 100644 --- a/GitTrends/Views/Base/BorderButton.cs +++ b/GitTrends/Views/Base/BorderButton.cs @@ -13,9 +13,9 @@ public BorderButton(in string automationId) FontFamily = FontFamilyConstants.RobotoMedium; Padding = new Thickness(10, 0); - BorderWidth = Device.RuntimePlatform is Device.Android ? 0.75 : 1; - - //Use the default corner radius on iOS + BorderWidth = Device.RuntimePlatform is Device.Android ? 0.75 : 1; + + //Use the default corner radius on iOS CornerRadius = Device.RuntimePlatform is Device.Android ? 7 : -1; diff --git a/GitTrends/Views/Base/EmptyDataView.cs b/GitTrends/Views/Base/EmptyDataView.cs index 8faadfb60..4f79a9341 100644 --- a/GitTrends/Views/Base/EmptyDataView.cs +++ b/GitTrends/Views/Base/EmptyDataView.cs @@ -15,9 +15,9 @@ class EmptyDataView : Grid public EmptyDataView(in string imageSource, in string automationId) : this(automationId) { ImageSource = imageSource; - } - - //Workaround for https://github.com/xamarin/Xamarin.Forms/issues/10551 + } + + //Workaround for https://github.com/xamarin/Xamarin.Forms/issues/10551 public EmptyDataView(in string automationId) { AutomationId = automationId; diff --git a/GitTrends/Views/Settings/OrganizationsCarouselOverlay.cs b/GitTrends/Views/Settings/OrganizationsCarouselOverlay.cs index f11a07902..e50d31572 100644 --- a/GitTrends/Views/Settings/OrganizationsCarouselOverlay.cs +++ b/GitTrends/Views/Settings/OrganizationsCarouselOverlay.cs @@ -102,12 +102,12 @@ public CloseButton(Func dismissOverlay, IAnalyticsService analyticsService { IsEnabled = false; - analyticsService.Track($"{nameof(OrganizationsCarouselOverlay)} Close Button Tapped"); - - // Make the button disappear before OrganizationsCarouselFrame - await Task.WhenAll(dismissOverlay(), this.FadeTo(0)); - - //Ensure the Button is visible and reenabled when it next appears + analyticsService.Track($"{nameof(OrganizationsCarouselOverlay)} Close Button Tapped"); + + // Make the button disappear before OrganizationsCarouselFrame + await Task.WhenAll(dismissOverlay(), this.FadeTo(0)); + + //Ensure the Button is visible and reenabled when it next appears Opacity = 1; IsEnabled = true; }); @@ -163,9 +163,9 @@ public OrganizationsCarouselFrame(IAnalyticsService analyticsService, } static Color GetBackgroundColor(int position) => position % 2 is 0 - ? Color.FromHex(BaseTheme.LightTealColorHex) // Even-numbered Pages are Teal - : Color.FromHex(BaseTheme.CoralColorHex); // Odd-numbered Pages are Coral - + ? Color.FromHex(BaseTheme.LightTealColorHex) // Even-numbered Pages are Teal + : Color.FromHex(BaseTheme.CoralColorHex); // Odd-numbered Pages are Coral + void HandlePositionChanged(object sender, PositionChangedEventArgs e) { LightThemeBackgroundColor = GetBackgroundColor(e.CurrentPosition); diff --git a/GitTrends/Views/Trends/StarsChart.cs b/GitTrends/Views/Trends/StarsChart.cs index 04cb784f0..ca9798c88 100644 --- a/GitTrends/Views/Trends/StarsChart.cs +++ b/GitTrends/Views/Trends/StarsChart.cs @@ -19,8 +19,8 @@ public StarsChart(IMainThread mainThread) : base(new StarsTrendsChart(mainThread } class StarsTrendsChart : BaseTrendsChart - { - //MinimumStarCount > MaximumDays > MaximumStarCount + { + //MinimumStarCount > MaximumDays > MaximumStarCount const int _maximumDays = 365; const int _minimumStarCount = 10; const int _maximumStarCount = 100; @@ -87,9 +87,9 @@ async Task ZoomStarsChart(IReadOnlyList dailyStarsList) { var mostRecentDailyStarsModel = dailyStarsList[^1]; - var maximumDaysDateTime = DateTimeOffset.UtcNow.Subtract(TimeSpan.FromDays(_maximumDays)); - - //Zoom to Maximum Stars + var maximumDaysDateTime = DateTimeOffset.UtcNow.Subtract(TimeSpan.FromDays(_maximumDays)); + + //Zoom to Maximum Stars if (dailyStarsList.Count >= _maximumStarCount) { var maximumStarsDailyStarsModel = dailyStarsList[^_maximumStarCount]; @@ -98,8 +98,8 @@ await SetZoom(maximumStarsDailyStarsModel.LocalDay.ToOADate(), mostRecentDailyStarsModel.LocalDay.ToOADate(), maximumStarsDailyStarsModel.TotalStars, mostRecentDailyStarsModel.TotalStars); - } - //Zoom to Maximum Days when Minimum Star Count has been met + } + //Zoom to Maximum Days when Minimum Star Count has been met else if (dailyStarsList[0].Day <= maximumDaysDateTime) { var nearestDailyStarsModel = getNearestDailyStarsModelToTimeStamp(dailyStarsList, maximumDaysDateTime); @@ -113,16 +113,16 @@ await SetZoom(maximumDaysDateTime.LocalDateTime.ToOADate(), mostRecentDailyStarsModel.TotalStars); } } - } - - //https://stackoverflow.com/a/1757221/5953643 + } + + //https://stackoverflow.com/a/1757221/5953643 static DailyStarsModel getNearestDailyStarsModelToTimeStamp(in IReadOnlyList dailyStarsList, DateTimeOffset timeStamp) { var starsListOrderedByProximityToTimeStamp = dailyStarsList.OrderBy(t => Math.Abs((t.Day - timeStamp).Ticks)); foreach (var dailyStarsModel in starsListOrderedByProximityToTimeStamp) - { - //Get the nearest DailyStarsModel before timeStamp + { + //Get the nearest DailyStarsModel before timeStamp if (dailyStarsModel.Day < timeStamp) return dailyStarsModel; } @@ -139,8 +139,8 @@ void HandleStarSeriesPropertyChanged(object sender, PropertyChangedEventArgs e) var dailyStarsList = (IReadOnlyList)trendsAreaSeries.ItemsSource; if (dailyStarsList.Any()) - { - //Wait for SFChart to finish Rendering before Zooming + { + //Wait for SFChart to finish Rendering before Zooming PropertyChanged += HandleSFChartPropertyChanged; } @@ -148,9 +148,9 @@ async void HandleSFChartPropertyChanged(object sender, PropertyChangedEventArgs { if (e.PropertyName is "Renderer") { - PropertyChanged -= HandleSFChartPropertyChanged; - - //Yeild to the UI thread to allow the render to finish + PropertyChanged -= HandleSFChartPropertyChanged; + + //Yeild to the UI thread to allow the render to finish await Task.Yield(); await ZoomStarsChart(dailyStarsList);