[NUI] Remove deprecated APIs in Slider and Switch (#1716)
authorzhouleonlei <56956725+zhouleonlei@users.noreply.github.com>
Tue, 16 Jun 2020 10:00:32 +0000 (18:00 +0800)
committerGitHub <noreply@github.com>
Tue, 16 Jun 2020 10:00:32 +0000 (18:00 +0800)
src/Tizen.NUI.Components/Controls/Slider.cs
src/Tizen.NUI.Components/Controls/Switch.cs
test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/SliderSample.cs

index 2ead05f..ea530cf 100755 (executable)
@@ -132,21 +132,7 @@ namespace Tizen.NUI.Components
             var instance = (Slider)bindable;
             return instance.privateTrackThickness;
         });
-        /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty TrackPaddingProperty = BindableProperty.Create(nameof(TrackPadding), typeof(Extents), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
-        {
-            var instance = (Slider)bindable;
-            if (newValue != null)
-            {
-                instance.privateTrackPadding.CopyFrom((Extents)newValue);
-            }
-        },
-        defaultValueCreator: (bindable) =>
-        {
-            var instance = (Slider)bindable;
-            return instance.privateTrackPadding;
-        });
+
         static Slider() { }
 
         /// <summary>
@@ -271,38 +257,6 @@ namespace Tizen.NUI.Components
         public new SliderStyle Style => ViewStyle as SliderStyle;
 
         /// <summary>
-        /// Get or set low indicator text.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public TextLabel LowIndicatorText
-        {
-            get
-            {
-                return CreateLowIndicatorText();
-            }
-            internal set
-            {
-                lowIndicatorText = value;
-            }
-        }
-
-        /// <summary>
-        /// Get or set high indicator text.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public TextLabel HighIndicatorText
-        {
-            get
-            {
-                return CreateHighIndicatorText();
-            }
-            internal set
-            {
-                highIndicatorText = value;
-            }
-        }
-
-        /// <summary>
         /// Gets or sets the direction type of slider.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
@@ -690,32 +644,15 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return TrackPadding.Start;
+                return privateTrackPadding.Start;
             }
             set
             {
                 ushort val = (ushort)value;
-                TrackPadding = new Extents(val, val, val, val);
+                privateTrackPadding = new Extents(val, val, val, val);
             }
         }
 
-        /// <summary>
-        /// Gets or sets the value of the space between track and indicator.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public Extents TrackPadding
-        {
-            get
-            {
-                return (Extents)GetValue(TrackPaddingProperty);
-            }
-            set
-            {
-                SetValue(TrackPaddingProperty, value);
-            }
-        }
         private Extents privateTrackPadding
         {
             get
index 3591d17..3d89015 100755 (executable)
@@ -168,27 +168,6 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// Switch's track part.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public string SwitchBackgroundImageURL
-        {
-            get
-            {
-                return Style?.Track?.ResourceUrl?.All;
-            }
-            set
-            {
-                if (null != value && null != Style?.Track)
-                {
-                    Style.Track.ResourceUrl = value;
-                }
-            }
-        }
-
-        /// <summary>
         /// Background image's resource url selector in Switch.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
index fbd5e94..1001a5d 100755 (executable)
@@ -39,11 +39,11 @@ namespace Tizen.NUI.Samples
             // Null style construction
             slider_null_style[0] = CreateByProperty(800, 50, 20, Slider.DirectionType.Horizontal);
             slider_null_style[1] = CreateByProperty(800, 50, 30, Slider.DirectionType.Horizontal);
-            slider_null_style[1].LowIndicatorText.Text = "SubText";
+            slider_null_style[1].LowIndicatorTextContent = "SubText";
             slider_null_style[1].LowIndicatorSize = new Size(100, 40);
             slider_null_style[2] = CreateByProperty(50, 400, 20, Slider.DirectionType.Vertical);
             slider_null_style[3] = CreateByProperty(50, 400, 30, Slider.DirectionType.Vertical);
-            slider_null_style[3].LowIndicatorText.Text = "SubText";
+            slider_null_style[3].LowIndicatorTextContent = "SubText";
             slider_null_style[3].LowIndicatorSize = new Size(100, 40);
 
             // Style construction
@@ -83,11 +83,11 @@ namespace Tizen.NUI.Samples
             };
             slider_style[0] = CreateByStyle(st, 800, 50, 20, Slider.DirectionType.Horizontal);
             slider_style[1] = CreateByStyle(st, 800, 50, 30, Slider.DirectionType.Horizontal);
-            slider_style[1].LowIndicatorText.Text = "SubText";
+            slider_style[1].LowIndicatorTextContent = "SubText";
             slider_style[1].LowIndicatorSize = new Size(100, 40);
             slider_style[2] = CreateByStyle(st, 50, 400, 20, Slider.DirectionType.Vertical);
             slider_style[3] = CreateByStyle(st, 50, 400, 30, Slider.DirectionType.Vertical);
-            slider_style[3].LowIndicatorText.Text = "SubText";
+            slider_style[3].LowIndicatorTextContent = "SubText";
             slider_style[3].LowIndicatorSize = new Size(100, 40);
         }