From 23356e411413e18aa4bbed2eb497077264dbdb11 Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Fri, 5 Jun 2020 18:18:49 +0900 Subject: [PATCH] [Tizen] Improve the SwitchCell performance (#10952) --- Xamarin.Forms.Platform.Tizen/Cells/SwitchCellRenderer.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Xamarin.Forms.Platform.Tizen/Cells/SwitchCellRenderer.cs b/Xamarin.Forms.Platform.Tizen/Cells/SwitchCellRenderer.cs index 790d943cb8b..bd45ace400a 100644 --- a/Xamarin.Forms.Platform.Tizen/Cells/SwitchCellRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Cells/SwitchCellRenderer.cs @@ -59,6 +59,13 @@ protected override EvasObject OnGetContent(Cell cell, string part) { nativeView.PropagateEvents = false; } + + _cacheCandidate[nativeView] = toggle; + nativeView.Deleted += (sender, e) => + { + _cacheCandidate.Remove(sender as EvasObject); + }; + return nativeView; } return null;