[NUI] Remove Transition for xaml
authorseungho <sbsh.baek@samsung.com>
Fri, 19 Mar 2021 01:45:08 +0000 (10:45 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 19 Mar 2021 08:05:58 +0000 (17:05 +0900)
Signed-off-by: seungho <sbsh.baek@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs
src/Tizen.NUI/src/public/XamlBinding/Transition.cs [deleted file]

index 116982b..c10764b 100755 (executable)
@@ -40,13 +40,11 @@ namespace Tizen.NUI.BaseComponents
         private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
         private float weight = 0.0f; // Weighting of child View in a Layout
         private bool backgroundImageSynchronosLoading = false;
-        private Dictionary<string, Transition> transDictionary = new Dictionary<string, Transition>();
         private bool controlStatePropagation = false;
         private ViewStyle viewStyle;
         private bool themeChangeSensitive = false;
         private bool excludeLayouting = false;
         private LayoutTransition layoutTransition;
-
         private ControlState controlStates = ControlState.Normal;
 
         static View() { }
@@ -2750,15 +2748,6 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Used to restore the transition.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public IList<Transition> TransitionList
-        {
-            get;
-        } = new List<Transition>();
-
-        /// <summary>
         /// Get whether the View is culled or not.
         /// True means that the View is out of the view frustum.
         /// </summary>
index 0760e9e..9a2b6f6 100755 (executable)
@@ -633,17 +633,6 @@ namespace Tizen.NUI.BaseComponents
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-
-
-        /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public Transition GetTransition(string transitionName)
-        {
-            Transition trans = null;
-            transDictionary.TryGetValue(transitionName, out trans);
-            return trans;
-        }
-
         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void ObjectDump()
diff --git a/src/Tizen.NUI/src/public/XamlBinding/Transition.cs b/src/Tizen.NUI/src/public/XamlBinding/Transition.cs
deleted file mode 100755 (executable)
index a2cceab..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Reflection;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Xaml;
-
-namespace Tizen.NUI
-{
-    /// <since_tizen> 5 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
-    public class AnimationBehavior
-    {
-        private string key = null;
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public string Key
-        {
-            get
-            {
-                return key;
-            }
-            set
-            {
-                key = value;
-            }
-        }
-
-        private string property = null;
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public string Property
-        {
-            get
-            {
-                return property;
-            }
-            set
-            {
-                property = value;
-            }
-        }
-
-        private string destValue = null;
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public string DestValue
-        {
-            get
-            {
-                return destValue;
-            }
-            set
-            {
-                destValue = value;
-            }
-        }
-
-        private int startTime = -1;
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int StartTime
-        {
-            get
-            {
-                return startTime;
-            }
-            set
-            {
-                startTime = value;
-            }
-        }
-
-        private int endTime = -1;
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int EndTime
-        {
-            get
-            {
-                return endTime;
-            }
-            set
-            {
-                endTime = value;
-            }
-        }
-    }
-
-
-    /// <summary>
-    /// It is the container to contain the behaviors of Transition.
-    /// </summary>
-    [EditorBrowsable(EditorBrowsableState.Never)]
-    public class BehaviorContainer : List<AnimationBehavior>
-    {
-        private Dictionary<string, AnimationBehavior> behaviors = new Dictionary<string, AnimationBehavior>();
-
-        /// <summary>
-        /// The method for user to add behavior.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public void Add(object obj)
-        {
-            var behavior = obj as AnimationBehavior;
-
-            if (null != behavior)
-            {
-                behaviors.Add(behavior.Key, behavior);
-            }
-        }
-
-        /// <summary>
-        /// The method for user to get the behavior by the key.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public AnimationBehavior GetAnimationBehavior(string key)
-        {
-            AnimationBehavior behavior = null;
-            behaviors.TryGetValue(key, out behavior);
-
-            return behavior;
-        }
-    }
-
-    /// <since_tizen> 5 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
-    public class Transition : Animation
-    {
-        private string name;
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public string Name
-        {
-            get
-            {
-                return name;
-            }
-            set
-            {
-                name = value;
-            }
-        }
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public void AnimateTo(View instance, string behaviorKey)
-        {
-            AnimationBehavior behavior = Behaviors?.GetAnimationBehavior(behaviorKey);
-
-            if (null != instance && null != behavior)
-            {
-                var elementType = instance.GetType();
-                PropertyInfo propertyInfo = elementType.GetProperties().FirstOrDefault(fi => fi.Name == behavior.Property);
-
-                if (propertyInfo != null)
-                {
-                    object destinationValue = ConvertTo(behavior.DestValue, propertyInfo.PropertyType);
-
-                    if (destinationValue != null)
-                    {
-                        if (0 <= behavior.StartTime)
-                        {
-                            AnimateTo(instance, behavior.Property, destinationValue, behavior.StartTime, behavior.EndTime);
-                        }
-                        else
-                        {
-                            AnimateTo(instance, behavior.Property, destinationValue);
-                        }
-                    }
-                }
-            }
-            else
-            {
-                throw new XamlParseException(string.Format("Behaviors don't have key {0}", behaviorKey), new XmlLineInfo());
-            }
-        }
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public void AnimateBy(View instance, string behaviorKey)
-        {
-            AnimationBehavior behavior = Behaviors?.GetAnimationBehavior(behaviorKey);
-
-            if (null != instance && null != behavior)
-            {
-                var elementType = instance.GetType();
-                PropertyInfo propertyInfo = elementType.GetProperties().FirstOrDefault(fi => fi.Name == behavior.Property);
-
-                if (propertyInfo != null)
-                {
-                    object destinationValue = ConvertTo(behavior.DestValue, propertyInfo.PropertyType);
-
-                    if (destinationValue != null)
-                    {
-                        if (0 <= behavior.StartTime)
-                        {
-                            AnimateBy(instance, behavior.Property, destinationValue, behavior.StartTime, behavior.EndTime);
-                        }
-                        else
-                        {
-                            AnimateBy(instance, behavior.Property, destinationValue);
-                        }
-                    }
-                }
-            }
-            else
-            {
-                throw new XamlParseException(string.Format("Behaviors don't have key {0}", behaviorKey), new XmlLineInfo());
-            }
-        }
-
-        /// <since_tizen> 5 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public BehaviorContainer Behaviors
-        {
-            get;
-        } = new BehaviorContainer();
-    }
-}