From 569d58d3407635c06554a9d6ee531bc46a553733 Mon Sep 17 00:00:00 2001 From: zhouleonlei <56956725+zhouleonlei@users.noreply.github.com> Date: Thu, 9 Jan 2020 14:47:55 +0800 Subject: [PATCH] [NUI] Implement switch's Old background API (#1288) --- src/Tizen.NUI.Components/Controls/Switch.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Switch.cs b/src/Tizen.NUI.Components/Controls/Switch.cs index a0639ae..c89449e 100755 --- a/src/Tizen.NUI.Components/Controls/Switch.cs +++ b/src/Tizen.NUI.Components/Controls/Switch.cs @@ -97,7 +97,6 @@ namespace Tizen.NUI.Components } } - private StringSelector switchBackgroundImageURLSelector = new StringSelector(); /// /// Background image's resource url selector in Switch. /// @@ -106,11 +105,16 @@ namespace Tizen.NUI.Components { get { - return switchBackgroundImageURLSelector; + StringSelector strSl = new StringSelector(); + strSl.Clone(Style?.Track?.ResourceUrl); + return strSl; } set { - switchBackgroundImageURLSelector.Clone(value); + if (null != value && null != Style?.Track) + { + Style.Track.ResourceUrl = value; + } } } @@ -133,7 +137,6 @@ namespace Tizen.NUI.Components } } - private StringSelector switchHandlerImageURLSelector = new StringSelector(); /// /// Handler image's resource url selector in Switch. /// @@ -142,11 +145,16 @@ namespace Tizen.NUI.Components { get { - return switchHandlerImageURLSelector; + StringSelector strSl = new StringSelector(); + strSl.Clone(Style?.Thumb?.ResourceUrl); + return strSl; } set { - switchHandlerImageURLSelector.Clone(value); + if (null != value && null != Style?.Thumb) + { + Style.Thumb.ResourceUrl = value; + } } } -- 2.7.4