From 0f687e4b654b2643920011bcd32f5c5e8f0c242d Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Thu, 18 Jun 2020 18:59:31 +0900 Subject: [PATCH] [Tizen] Ensure the update of color after theme style changing (#11080) --- Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs | 1 + Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs | 4 ++++ Xamarin.Forms.Platform.Tizen/Renderers/SwitchRenderer.cs | 3 +++ Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs index 49193247f..fba98a736 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/ButtonRenderer.cs @@ -63,6 +63,7 @@ namespace Xamarin.Forms.Platform.Tizen { (Control as IButton)?.UpdateStyle(style); ((IVisualElementController)Element).NativeSizeChanged(); + UpdateBackgroundColor(false); } } diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs index cfe818924..b86accf43 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/ProgressBarRenderer.cs @@ -56,7 +56,11 @@ namespace Xamarin.Forms.Platform.Tizen { var themeStyle = SpecificVE.GetStyle(Element); if (!string.IsNullOrEmpty(themeStyle)) + { Control.Style = themeStyle; + UpdateBackgroundColor(false); + UpdateProgressColor(false); + } } void UpdateAll() diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/SwitchRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/SwitchRenderer.cs index 74e7c7964..3a8f29492 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/SwitchRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/SwitchRenderer.cs @@ -69,6 +69,9 @@ namespace Xamarin.Forms.Platform.Tizen break; } ((IVisualElementController)Element).NativeSizeChanged(); + UpdateBackgroundColor(false); + UpdateOnColor(false); + UpdateColor(); } protected virtual void UpdateColor() diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs index cb812e656..43029177d 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/TabbedPageRenderer.cs @@ -155,6 +155,10 @@ namespace Xamarin.Forms.Platform.Tizen { _toolbar.Style = style; ((IVisualElementController)Element).NativeSizeChanged(); + UpdateBackgroundColor(false); + UpdateBarBackgroundColor(false); + UpdateSelectedTabColor(false); + UpdateUnselectedTabColor(false); } }