[NUI] Add ReleasePolicy for ImageView (#1789)
authortscholb <scholb.kim@samsung.com>
Tue, 7 Jul 2020 01:52:24 +0000 (10:52 +0900)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2020 01:52:24 +0000 (10:52 +0900)
Add ReleasePolicy to allow the application to determine the release policy of the image

src/Tizen.NUI/src/public/BaseComponents/ImageView.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index c622cb4..bf602f7
@@ -885,7 +885,27 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-
+        /// <summary>
+        /// Gets or sets ReleasePolicy for image.<br />
+        /// If not supplied, the default is ReleasePolicyType.Detached.<br />
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ReleasePolicyType ReleasePolicy
+        {
+            get
+            {
+                int ret = (int)ReleasePolicyType.Detached;
+                PropertyMap imageMap = new PropertyMap();
+                Tizen.NUI.Object.GetProperty(swigCPtr, ImageView.Property.IMAGE).Get(imageMap);
+                imageMap?.Find(ImageVisualProperty.ReleasePolicy)?.Get(out ret);
+                return (ReleasePolicyType)ret;
+            }
+            set
+            {
+                UpdateImage(ImageVisualProperty.ReleasePolicy, new PropertyValue((int)value));
+            }
+        }
         /// <summary>
         /// Gets or sets the wrap mode for the u coordinate.<br />
         /// It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.<br />