diff options
author | Piotr Czaja <p.czaja@samsung.com> | 2017-04-24 09:53:20 +0200 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2017-07-10 11:11:24 +0900 |
commit | 22c4e5ca4e254287a39dee475d8dddd16f2877a3 (patch) | |
tree | 891e39ff2aa8619a8a646006b1a1f8ac29cd5938 /Xamarin.Forms.Platform.Tizen/Renderers | |
parent | 50f0bc05f71913b7355ebb27857684412be7f37c (diff) | |
download | xamarin-forms-22c4e5ca4e254287a39dee475d8dddd16f2877a3.tar.gz xamarin-forms-22c4e5ca4e254287a39dee475d8dddd16f2877a3.tar.bz2 xamarin-forms-22c4e5ca4e254287a39dee475d8dddd16f2877a3.zip |
Optimize updating state of control properties
Change-Id: Id63470cbc88761e13bc5875fedfe9cffaa95f2bb
Signed-off-by: Piotr Czaja <p.czaja@samsung.com>
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs index 512e3047..978a5b5a 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; using Xamarin.Forms.Internals; +using System.Linq; using ElmSharp; using ESize = ElmSharp.Size; using ERect = ElmSharp.Rect; @@ -537,14 +538,14 @@ namespace Xamarin.Forms.Platform.Tizen /// <param name="initialization">If set to <c>true</c> the method is called for an uninitialized object.</param> protected void UpdateAllProperties(bool initialization) { - foreach (KeyValuePair<string, Action<bool>> kvp in _propertyHandlersWithInit) + foreach (var action in _propertyHandlersWithInit.Values.Distinct()) { - kvp.Value(initialization); + action(initialization); } - foreach (KeyValuePair<string, Action> kvp in _propertyHandlers) + foreach (var action in _propertyHandlers.Values.Distinct()) { - kvp.Value(); + action(); } } |