summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
diff options
context:
space:
mode:
authorKangho Hur <kangho.hur@samsung.com>2017-04-25 10:30:14 +0000
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>2017-04-25 10:30:14 +0000
commit6e8e89f0547f885a041d94c81c3caaeab7c24331 (patch)
tree669c5a01630cdc99a05b731854dbb3f007b2e77d /Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs
parentdf3dbe717622df2041b67d2aa243680f749328ad (diff)
parent23ba74bf28124ee320b2ed9177c4b6a32d09e456 (diff)
downloadxamarin-forms-6e8e89f0547f885a041d94c81c3caaeab7c24331.tar.gz
xamarin-forms-6e8e89f0547f885a041d94c81c3caaeab7c24331.tar.bz2
xamarin-forms-6e8e89f0547f885a041d94c81c3caaeab7c24331.zip
Merge "Optimize updating state of control properties" into tizen
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/VisualElementRenderer.cs9
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();
}
}