[NUI] Remove boxing/unboxing in RecyclerView, etc.
authorhuayong.xu <huayong.xu@samsung.com>
Thu, 6 Mar 2025 09:57:52 +0000 (17:57 +0800)
committerWonsik Jung <sidein@samsung.com>
Wed, 12 Mar 2025 04:26:52 +0000 (13:26 +0900)
19 files changed:
src/Tizen.NUI.Components/Controls/Loading.cs
src/Tizen.NUI.Components/Controls/Picker.cs
src/Tizen.NUI.Components/Controls/PickerBindableProperty.cs
src/Tizen.NUI.Components/Controls/Popup.cs
src/Tizen.NUI.Components/Controls/PopupBindableProperty.cs
src/Tizen.NUI.Components/Controls/Progress.cs
src/Tizen.NUI.Components/Controls/ProgressBindableProperty.cs
src/Tizen.NUI.Components/Controls/RecyclerView/CollectionView.cs
src/Tizen.NUI.Components/Controls/RecyclerView/CollectionViewBindableProperty.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultGridItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultGridItemBindableProperty.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultLinearItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultLinearItemBindableProperty.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultTitleItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/DefaultTitleItemBindableProperty.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/RecyclerViewItem.cs
src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs
src/Tizen.NUI.Components/Controls/TimePicker.cs
src/Tizen.NUI.Components/Style/LoadingStyle.cs

index 1c187af990492c66d662d384ffd088e2668dd0cb..f64dd55fa28b1c30d4f3f33ef7e5c638a84c7017 100755 (executable)
@@ -40,9 +40,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ImageArrayProperty = null;
         internal static void SetInternalImageArrayProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Loading)bindable;
             if (newValue != null)
             {
+                var instance = (Loading)bindable;
                 instance.InternalImageArray = newValue as string[];
             }
         }
@@ -57,15 +57,13 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ImageListProperty = null;
         internal static void SetInternalImageListProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            Debug.Assert(((Loading)bindable).imageVisual != null);
-
-            var newList = newValue as List<string>;
-            ((Loading)bindable).imageVisual.URLS = newList == null ? new List<string>() : newList;
+            var instance = (Loading)bindable;
+            instance.SetInternalImageList(newValue as List<string>);
         }
         internal static object GetInternalImageListProperty(BindableObject bindable)
         {
-            Debug.Assert(((Loading)bindable).imageVisual != null);
-            return ((Loading)bindable).imageVisual.URLS;
+            var instance = (Loading)bindable;
+            return instance.GetInternalImageList();
         }
 
         /// <summary>The lottie resource url bindable property.</summary>
@@ -74,13 +72,12 @@ namespace Tizen.NUI.Components
         internal static void SetInternalLottieResourceUrlProperty(BindableObject bindable, object oldValue, object newValue)
         {
             var instance = (Loading)bindable;
-            instance.RemoveImageVisual();
-            instance.EnsureLottieView(newValue as string ?? string.Empty);
+            instance.SetInternalLottieResourceUrl(newValue as string);
         }
         internal static object GetInternalLottieResourceUrlProperty(BindableObject bindable)
         {
-            var lottie = ((Loading)bindable).defaultLottieView;
-            return lottie == null ? string.Empty : lottie.URL;
+            var instance = (Loading)bindable;
+            return instance.GetInternalLottieResourceUrl();
         }
 
         /// <summary>The Size bindable property.</summary>
@@ -88,11 +85,9 @@ namespace Tizen.NUI.Components
         public new static readonly BindableProperty SizeProperty = null;
         internal static new void SetInternalSizeProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Loading)bindable;
             if (newValue != null)
             {
-                Size size = (Size)newValue;
-                ((View)bindable).Size = size;
+                ((View)bindable).Size = (Size)newValue;
             }
         }
         internal static new object GetInternalSizeProperty(BindableObject bindable)
@@ -107,15 +102,12 @@ namespace Tizen.NUI.Components
         internal static void SetInternalFrameRateProperty(BindableObject bindable, object oldValue, object newValue)
         {
             var instance = (Loading)bindable;
-            instance.frameRate = (int)newValue;
-            if (0 != instance.frameRate && instance.imageVisual != null) //It will crash if 0
-            {
-                instance.imageVisual.FrameDelay = instance.frameRate;
-            }
+            instance.SetInternalFrameRate((int)newValue);
         }
         internal static object GetInternalFrameRateProperty(BindableObject bindable)
         {
-            return ((Loading)bindable).frameRate;
+            var instance = (Loading)bindable;
+            return instance.GetInternalFrameRate();
         }
 
         private const string ImageVisualName = "loadingImageVisual";
@@ -210,21 +202,20 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalImageArrayProperty(this) as string[];
+                    return InternalImageArray;
                 }
             }
             set
             {
                 RemoveLottieView();
                 EnsureImageVisual();
-
                 if (NUIApplication.IsUsingXaml)
                 {
                     SetValue(ImageArrayProperty, value);
                 }
                 else
                 {
-                    SetInternalImageArrayProperty(this, null, value);
+                    InternalImageArray = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -239,7 +230,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (GetInternalImageListProperty(this) as List<string>)?.ToArray() ?? null;
+                    return (GetInternalImageList() as List<string>)?.ToArray() ?? null;
                 }
             }
             set
@@ -250,7 +241,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalImageListProperty(this, null, value == null ? new List<string>() : new List<string>((string[])value));
+                    SetInternalImageList(value == null ? new List<string>() : new List<string>(value));
                 }
             }
         }
@@ -269,11 +260,24 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalImageListProperty(this) as IList<string>;
+                    return GetInternalImageList();
                 }
             }
         }
 
+        internal void SetInternalImageList(IList<string> newValue)
+        {
+            Debug.Assert(imageVisual != null);
+            var newList = newValue as List<string>;
+            imageVisual.URLS = newList == null ? new List<string>() : newList;
+        }
+
+        private IList<string> GetInternalImageList()
+        {
+            Debug.Assert(imageVisual != null);
+            return imageVisual.URLS;
+        }
+
         /// <summary>
         /// Gets or sets an lottie resource url.
         /// The mutually exclusive with "ImageArray".
@@ -289,7 +293,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalLottieResourceUrlProperty(this) as string;
+                    return GetInternalLottieResourceUrl();
                 }
             }
             set
@@ -300,11 +304,23 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalLottieResourceUrlProperty(this, null, value);
+                    SetInternalLottieResourceUrl(value);
                 }
             }
         }
 
+        private void SetInternalLottieResourceUrl(string newValue)
+        {
+            RemoveImageVisual();
+            EnsureLottieView(newValue ?? string.Empty);
+        }
+
+        private string GetInternalLottieResourceUrl()
+        {
+            var lottie = defaultLottieView;
+            return lottie == null ? string.Empty : lottie.URL;
+        }
+
         /// <summary>
         /// Gets or sets loading size.
         /// </summary>
@@ -319,7 +335,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (Size)GetInternalSizeProperty(this);
+                    return base.Size;
                 }
             }
             set
@@ -330,7 +346,10 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalSizeProperty(this, null, value);
+                    if (value != null)
+                    {
+                        base.Size = value;
+                    }
                 }
             }
         }
@@ -349,7 +368,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalFrameRateProperty(this);
+                    return GetInternalFrameRate();
                 }
             }
             set
@@ -364,11 +383,25 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalFrameRateProperty(this, null, value);
+                    SetInternalFrameRate(value);
                 }
             }
         }
 
+        private void SetInternalFrameRate(int newValue)
+        {
+            frameRate = newValue;
+            if (0 != frameRate && imageVisual != null) //It will crash if 0
+            {
+                imageVisual.FrameDelay = frameRate;
+            }
+        }
+
+        private int GetInternalFrameRate()
+        {
+            return frameRate;
+        }
+
         /// <inheritdoc/>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override void OnInitialize()
index 6a0af71ef93a632d1d4bbef36cf6d4d22a0cba05..c6c253d7f35a3a258121c8ffb96a18300bc60f64 100755 (executable)
@@ -233,7 +233,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalCurrentValueProperty(this);
+                    return InternalCurrentValue;
                 }
             }
             set
@@ -244,7 +244,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalCurrentValueProperty(this, null, value);
+                    InternalCurrentValue =  value;
                 }
                 NotifyPropertyChanged();
             }
@@ -280,7 +280,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalMaxValueProperty(this);
+                    return InternalMaxValue;
                 }
             }
             set
@@ -291,7 +291,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalMaxValueProperty(this, null, value);
+                    InternalMaxValue =  value;
                 }
                 NotifyPropertyChanged();
             }
@@ -328,7 +328,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalMinValueProperty(this);
+                    return InternalMinValue;
                 }
             }
             set
@@ -339,7 +339,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalMinValueProperty(this, null, value);
+                    InternalMinValue = value;
                 }
                 NotifyPropertyChanged();
             }
index ab4b630b6ad1d701a58d738df5b485da919ce8eb..51a2dd0e390f2cfa0c9e7d17c7f54eb3bfd9eaad 100755 (executable)
@@ -12,9 +12,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty CurrentValueProperty = null;
         internal static void SetInternalCurrentValueProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Picker)bindable;
             if (newValue != null)
             {
+                var instance = (Picker)bindable;
                 instance.InternalCurrentValue = (int)newValue;
             }
         }
@@ -31,9 +31,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty MaxValueProperty = null;
         internal static void SetInternalMaxValueProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Picker)bindable;
             if (newValue != null)
             {
+                var instance = (Picker)bindable;
                 instance.InternalMaxValue = (int)newValue;
             }
         }
@@ -50,9 +50,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty MinValueProperty = null;
         internal static void SetInternalMinValueProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Picker)bindable;
             if (newValue != null)
             {
+                var instance = (Picker)bindable;
                 instance.InternalMinValue = (int)newValue;
             }
         }
index 26f112bb1d23423734d9a41151369349eb300242..376ad698f46726de01aaec89c6505fd0d27144de 100755 (executable)
@@ -29,149 +29,6 @@ namespace Tizen.NUI.Components
     [Obsolete("Deprecated in API8; Will be removed in API10")]
     public partial class Popup : Control
     {
-        /// 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 ButtonHeightProperty = null;
-        internal static void SetInternalButtonHeightProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.Itemheight = (int)newValue;
-                instance.UpdateView();
-            }
-        }
-        internal static object GetInternalButtonHeightProperty(BindableObject bindable)
-        {
-            return (int)((Popup)bindable).btGroup.Itemheight;
-        }
-
-        /// 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 ButtonTextPointSizeProperty = null;
-        internal static void SetInternalButtonTextPointSizeProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.ItemPointSize = (float)newValue;
-            }
-        }
-        internal static object GetInternalButtonTextPointSizeProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemPointSize;
-        }
-
-        /// 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 ButtonFontFamilyProperty = null;
-        internal static void SetInternalButtonFontFamilyProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.ItemFontFamily = (string)newValue;
-            }
-        }
-        internal static object GetInternalButtonFontFamilyProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemFontFamily;
-        }
-
-        /// 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 ButtonTextColorProperty = null;
-        internal static void SetInternalButtonTextColorProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.ItemTextColor = (Color)newValue;
-            }
-        }
-        internal static object GetInternalButtonTextColorProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemTextColor;
-        }
-
-        /// 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 ButtonOverLayBackgroundColorSelectorProperty = null;
-        internal static void SetInternalButtonOverLayBackgroundColorSelectorProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.OverLayBackgroundColorSelector = (Selector<Color>)newValue;
-            }
-        }
-        internal static object GetInternalButtonOverLayBackgroundColorSelectorProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.OverLayBackgroundColorSelector;
-        }
-
-        /// 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 ButtonTextAlignmentProperty = null;
-        internal static void SetInternalButtonTextAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.ItemTextAlignment = (HorizontalAlignment)newValue;
-            }
-        }
-        internal static object GetInternalButtonTextAlignmentProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemTextAlignment;
-        }
-
-        /// 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 ButtonBackgroundProperty = null;
-        internal static void SetInternalButtonBackgroundProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.ItemBackgroundImageUrl = (string)newValue;
-            }
-        }
-        internal static object GetInternalButtonBackgroundProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemBackgroundImageUrl;
-        }
-
-        /// 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 ButtonBackgroundBorderProperty = null;
-        internal static void SetInternalButtonBackgroundBorderProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            if (newValue != null)
-            {
-                instance.btGroup.ItemBackgroundBorder = (Rectangle)newValue;
-            }
-        }
-        internal static object GetInternalButtonBackgroundBorderProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemBackgroundBorder;
-        }
-
-        /// 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 ButtonImageShadowProperty = null;
-        internal static void SetInternalButtonImageShadowProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Popup)bindable;
-            ImageShadow shadow = (ImageShadow)newValue;
-            instance.btGroup.ItemImageShadow = new ImageShadow(shadow);
-        }
-        internal static object GetInternalButtonImageShadowProperty(BindableObject bindable)
-        {
-            return ((Popup)bindable).btGroup.ItemImageShadow;
-        }
-
         private TextLabel titleText;
         private ButtonGroup btGroup = null;
         private Window window = null;
@@ -382,7 +239,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTitleTextProperty(this) as string;
+                    return InternalTitleText;
                 }
             }
             set
@@ -393,7 +250,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTitleTextProperty(this, null, value);
+                    InternalTitleText = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -419,7 +276,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (float)GetInternalTitlePointSizeProperty(this);
+                    return InternalTitlePointSize;
                 }
             }
             set
@@ -430,7 +287,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTitlePointSizeProperty(this, null, value);
+                    InternalTitlePointSize = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -456,7 +313,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTitleTextColorProperty(this) as Color;
+                    return InternalTitleTextColor;
                 }
             }
             set
@@ -467,7 +324,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTitleTextColorProperty(this, null, value);
+                    InternalTitleTextColor = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -493,7 +350,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (HorizontalAlignment)GetInternalTitleTextHorizontalAlignmentProperty(this);
+                    return InternalTitleTextHorizontalAlignment;
                 }
             }
             set
@@ -504,7 +361,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTitleTextHorizontalAlignmentProperty(this, null, value);
+                    InternalTitleTextHorizontalAlignment = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -530,7 +387,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTitleTextPositionProperty(this) as Position;
+                    return InternalTitleTextPosition;
                 }
             }
             set
@@ -541,7 +398,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTitleTextPositionProperty(this, null, value);
+                    InternalTitleTextPosition =  value;
                 }
                 NotifyPropertyChanged();
             }
@@ -567,7 +424,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalTitleHeightProperty(this);
+                    return InternalTitleHeight;
                 }
             }
             set
@@ -578,7 +435,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTitleHeightProperty(this, null, value);
+                    InternalTitleHeight = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -615,7 +472,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalButtonCountProperty(this);
+                    return InternalButtonCount;
                 }
             }
             set
@@ -626,7 +483,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonCountProperty(this, null, value);
+                    InternalButtonCount = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -652,7 +509,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (int)GetInternalButtonHeightProperty(this);
+                    return GetInternalButtonHeight();
                 }
             }
             set
@@ -663,11 +520,22 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonHeightProperty(this, null, value);
+                    SetInternalButtonHeight(value);
                 }
             }
         }
 
+        private void SetInternalButtonHeight(int newValue)
+        {
+            btGroup.Itemheight = newValue;
+            UpdateView();
+        }
+
+        private int GetInternalButtonHeight()
+        {
+            return (int)btGroup.Itemheight;
+        }
+
         /// <summary>
         /// Button text point size in Popup.
         /// </summary>
@@ -683,7 +551,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (float)GetInternalButtonTextPointSizeProperty(this);
+                    return btGroup.ItemPointSize;
                 }
             }
             set
@@ -694,7 +562,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonTextPointSizeProperty(this, null, value);
+                    btGroup.ItemPointSize = value;
                 }
             }
         }
@@ -714,7 +582,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (string)GetInternalButtonFontFamilyProperty(this);
+                    return btGroup.ItemFontFamily;
                 }
             }
             set
@@ -725,7 +593,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonFontFamilyProperty(this, null, value);
+                    btGroup.ItemFontFamily =  value;
                 }
             }
         }
@@ -745,7 +613,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (Color)GetInternalButtonTextColorProperty(this);
+                    return btGroup.ItemTextColor;
                 }
             }
             set
@@ -756,7 +624,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonTextColorProperty(this, null, value);
+                    btGroup.ItemTextColor = value;
                 }
             }
         }
@@ -777,7 +645,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (Selector<Color>)GetInternalButtonOverLayBackgroundColorSelectorProperty(this);
+                    return btGroup.OverLayBackgroundColorSelector;
                 }
             }
             set
@@ -788,7 +656,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonOverLayBackgroundColorSelectorProperty(this, null, value);
+                    btGroup.OverLayBackgroundColorSelector = value;
                 }
             }
         }
@@ -808,7 +676,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (HorizontalAlignment)GetInternalButtonTextAlignmentProperty(this);
+                    return btGroup.ItemTextAlignment;
                 }
             }
             set
@@ -819,7 +687,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonTextAlignmentProperty(this, null, value);
+                    btGroup.ItemTextAlignment = value;
                 }
             }
         }
@@ -840,7 +708,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (string)GetInternalButtonBackgroundProperty(this);
+                    return btGroup.ItemBackgroundImageUrl;
                 }
             }
             set
@@ -851,7 +719,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonBackgroundProperty(this, null, value);
+                    btGroup.ItemBackgroundImageUrl = value;
                 }
             }
         }
@@ -872,7 +740,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (Rectangle)GetInternalButtonBackgroundBorderProperty(this);
+                    return btGroup.ItemBackgroundBorder;
                 }
             }
             set
@@ -883,7 +751,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonBackgroundBorderProperty(this, null, value);
+                    btGroup.ItemBackgroundBorder = value;
                 }
             }
         }
@@ -904,7 +772,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (ImageShadow)GetInternalButtonImageShadowProperty(this);
+                    return btGroup.ItemImageShadow;
                 }
             }
             set
@@ -915,7 +783,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalButtonImageShadowProperty(this, null, value);
+                    btGroup.ItemImageShadow = new ImageShadow(value);
                 }
             }
         }
index a7e9dee966195f9d588fd700402d8b596fd3229c..77afff56ef952d956baf3751e1c3d16580b5010e 100755 (executable)
 using System.ComponentModel;
+using Tizen.NUI.BaseComponents;
 using Tizen.NUI.Binding;
 
 namespace Tizen.NUI.Components
 {
     public partial class Popup
     {
+        /// 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 ButtonHeightProperty = null;
+        internal static void SetInternalButtonHeightProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.SetInternalButtonHeight((int)newValue);
+            }
+        }
+        internal static object GetInternalButtonHeightProperty(BindableObject bindable)
+        {
+            var instance = (Popup)bindable;
+            return instance.GetInternalButtonHeight();
+        }
+
+        /// 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 ButtonTextPointSizeProperty = null;
+        internal static void SetInternalButtonTextPointSizeProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.ItemPointSize = (float)newValue;
+            }
+        }
+        internal static object GetInternalButtonTextPointSizeProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemPointSize;
+        }
+
+        /// 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 ButtonFontFamilyProperty = null;
+        internal static void SetInternalButtonFontFamilyProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.ItemFontFamily = (string)newValue;
+            }
+        }
+        internal static object GetInternalButtonFontFamilyProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemFontFamily;
+        }
+
+        /// 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 ButtonTextColorProperty = null;
+        internal static void SetInternalButtonTextColorProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.ItemTextColor = (Color)newValue;
+            }
+        }
+        internal static object GetInternalButtonTextColorProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemTextColor;
+        }
+
+        /// 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 ButtonOverLayBackgroundColorSelectorProperty = null;
+        internal static void SetInternalButtonOverLayBackgroundColorSelectorProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.OverLayBackgroundColorSelector = (Selector<Color>)newValue;
+            }
+        }
+        internal static object GetInternalButtonOverLayBackgroundColorSelectorProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.OverLayBackgroundColorSelector;
+        }
+
+        /// 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 ButtonTextAlignmentProperty = null;
+        internal static void SetInternalButtonTextAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.ItemTextAlignment = (HorizontalAlignment)newValue;
+            }
+        }
+        internal static object GetInternalButtonTextAlignmentProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemTextAlignment;
+        }
+
+        /// 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 ButtonBackgroundProperty = null;
+        internal static void SetInternalButtonBackgroundProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.ItemBackgroundImageUrl = (string)newValue;
+            }
+        }
+        internal static object GetInternalButtonBackgroundProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemBackgroundImageUrl;
+        }
+
+        /// 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 ButtonBackgroundBorderProperty = null;
+        internal static void SetInternalButtonBackgroundBorderProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Popup)bindable;
+                instance.btGroup.ItemBackgroundBorder = (Rectangle)newValue;
+            }
+        }
+        internal static object GetInternalButtonBackgroundBorderProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemBackgroundBorder;
+        }
+
+        /// 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 ButtonImageShadowProperty = null;
+        internal static void SetInternalButtonImageShadowProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            var instance = (Popup)bindable;
+            instance.btGroup.ItemImageShadow = new ImageShadow((ImageShadow)newValue);
+        }
+        internal static object GetInternalButtonImageShadowProperty(BindableObject bindable)
+        {
+            return ((Popup)bindable).btGroup.ItemImageShadow;
+        }
+
         /// <summary>
         /// TitleTextProperty
         /// </summary>
@@ -12,9 +155,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TitleTextProperty = null;
         internal static void SetInternalTitleTextProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalTitleText = newValue as string;
             }
         }
@@ -31,9 +174,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TitlePointSizeProperty = null;
         internal static void SetInternalTitlePointSizeProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalTitlePointSize = (float)newValue;
             }
         }
@@ -50,9 +193,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TitleTextColorProperty = null;
         internal static void SetInternalTitleTextColorProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalTitleTextColor = newValue as Color;
             }
         }
@@ -69,9 +212,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TitleTextHorizontalAlignmentProperty = null;
         internal static void SetInternalTitleTextHorizontalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalTitleTextHorizontalAlignment = (HorizontalAlignment)newValue;
             }
         }
@@ -88,9 +231,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TitleTextPositionProperty = null;
         internal static void SetInternalTitleTextPositionProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalTitleTextPosition = newValue as Position;
             }
         }
@@ -107,9 +250,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TitleHeightProperty = null;
         internal static void SetInternalTitleHeightProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalTitleHeight = (int)newValue;
             }
         }
@@ -126,9 +269,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ButtonCountProperty = null;
         internal static void SetInternalButtonCountProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Popup)bindable;
             if (newValue != null)
             {
+                var instance = (Popup)bindable;
                 instance.InternalButtonCount = (int)newValue;
             }
         }
index 8acea16555029f3c860fe89d602d814462dff147..4f5e1031ba4273766f51d874d161867788b970d8 100755 (executable)
@@ -32,114 +32,6 @@ namespace Tizen.NUI.Components
     {
         private const int IndeterminateAnimationDuration = 2000;
 
-        /// <summary>
-        /// MaxValueProperty
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty MaxValueProperty = null;
-        internal static void SetInternalMaxValueProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Progress)bindable;
-            if (newValue != null)
-            {
-                instance.maxValue = (float)newValue;
-                instance.UpdateValue();
-            }
-        }
-        internal static object GetInternalMaxValueProperty(BindableObject bindable)
-        {
-            var instance = (Progress)bindable;
-            return instance.maxValue;
-        }
-
-        /// <summary>
-        /// MinValueProperty
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty MinValueProperty = null;
-        internal static void SetInternalMinValueProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Progress)bindable;
-            if (newValue != null)
-            {
-                instance.minValue = (float)newValue;
-                instance.UpdateValue();
-            }
-        }
-        internal static object GetInternalMinValueProperty(BindableObject bindable)
-        {
-            var instance = (Progress)bindable;
-            return instance.minValue;
-        }
-
-        /// <summary>
-        /// CurrentValueProperty
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty CurrentValueProperty = null;
-        internal static void SetInternalCurrentValueProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Progress)bindable;
-            if (newValue != null)
-            {
-                if ((float)newValue > instance.maxValue || (float)newValue < instance.minValue)
-                {
-                    return;
-                }
-                instance.currentValue = (float)newValue;
-                instance.UpdateValue();
-            }
-        }
-        internal static object GetInternalCurrentValueProperty(BindableObject bindable)
-        {
-            var instance = (Progress)bindable;
-            return instance.currentValue;
-        }
-
-        /// <summary>
-        /// BufferValueProperty
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty BufferValueProperty = null;
-        internal static void SetInternalBufferValueProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Progress)bindable;
-            if (newValue != null)
-            {
-                if ((float)newValue > instance.maxValue || (float)newValue < instance.minValue)
-                {
-                    return;
-                }
-                instance.bufferValue = (float)newValue;
-                instance.UpdateValue();
-            }
-        }
-        internal static object GetInternalBufferValueProperty(BindableObject bindable)
-        {
-            var instance = (Progress)bindable;
-            return instance.bufferValue;
-        }
-
-        /// <summary>
-        /// ProgressStateProperty
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static readonly BindableProperty ProgressStateProperty = null;
-        internal static void SetInternalProgressStateProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var instance = (Progress)bindable;
-            if (newValue != null)
-            {
-                instance.state = (ProgressStatusType)newValue;
-                instance.UpdateStates();
-            }
-        }
-        internal static object GetInternalProgressStateProperty(BindableObject bindable)
-        {
-            var instance = (Progress)bindable;
-            return instance.state;
-        }
-
         /// This needs to be considered more if public-open is necessary.
         private ProgressStatusType state = ProgressStatusType.Determinate;
 
@@ -263,7 +155,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTrackImageURLProperty(this) as string;
+                    return InternalTrackImageURL;
                 }
             }
             set
@@ -274,7 +166,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTrackImageURLProperty(this, null, value);
+                    InternalTrackImageURL = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -299,7 +191,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalProgressImageURLProperty(this) as string;
+                    return InternalProgressImageURL;
                 }
             }
             set
@@ -310,7 +202,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalProgressImageURLProperty(this, null, value);
+                    InternalProgressImageURL = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -335,7 +227,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalBufferImageURLProperty(this) as string;
+                    return InternalBufferImageURL;
                 }
             }
             set
@@ -346,7 +238,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalBufferImageURLProperty(this, null, value);
+                    InternalBufferImageURL = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -372,7 +264,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalIndeterminateImageUrlProperty(this) as string;
+                    return InternalIndeterminateImageUrl;
                 }
             }
             set
@@ -383,7 +275,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIndeterminateImageUrlProperty(this, null, value);
+                    InternalIndeterminateImageUrl = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -428,7 +320,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTrackColorProperty(this) as Color;
+                    return InternalTrackColor;
                 }
             }
             set
@@ -439,7 +331,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTrackColorProperty(this, null, value);
+                    InternalTrackColor = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -464,7 +356,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalProgressColorProperty(this) as Color;
+                    return InternalProgressColor;
                 }
             }
             set
@@ -475,7 +367,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalProgressColorProperty(this, null, value);
+                    InternalProgressColor = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -500,7 +392,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalBufferColorProperty(this) as Color;
+                    return InternalBufferColor;
                 }
             }
             set
@@ -511,7 +403,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalBufferColorProperty(this, null, value);
+                    InternalBufferColor = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -536,7 +428,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (float)GetInternalMaxValueProperty(this);
+                    return GetInternalMaxValue();
                 }
             }
             set
@@ -547,11 +439,22 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalMaxValueProperty(this, null, value);
+                    SetInternalMaxValue(value);
                 }
             }
         }
 
+        private void SetInternalMaxValue(float newValue)
+        {
+            maxValue = newValue;
+            UpdateValue();
+        }
+
+        private float GetInternalMaxValue()
+        {
+            return maxValue;
+        }
+
         /// <summary>
         /// The property to get/set the minim value of the Progress.
         /// </summary>
@@ -566,7 +469,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (float)GetInternalMinValueProperty(this);
+                    return GetInternalMinValue();
                 }
             }
             set
@@ -577,11 +480,22 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalMinValueProperty(this, null, value);
+                    SetInternalMinValue(value);
                 }
             }
         }
 
+        private void SetInternalMinValue(float newValue)
+        {
+            minValue = newValue;
+            UpdateValue();
+        }
+
+        private float GetInternalMinValue()
+        {
+            return minValue;
+        }
+
         /// <summary>
         /// The property to get/set the current value of the Progress.
         /// </summary>
@@ -596,7 +510,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (float)GetInternalCurrentValueProperty(this);
+                    return GetInternalCurrentValue();
                 }
             }
             set
@@ -607,7 +521,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalCurrentValueProperty(this, null, value);
+                    SetInternalCurrentValue(value);
                 }
                 if (Accessibility.Accessibility.IsEnabled && IsHighlighted)
                 {
@@ -616,6 +530,21 @@ namespace Tizen.NUI.Components
             }
         }
 
+        private void SetInternalCurrentValue(float newValue)
+        {
+            if ((float)newValue > maxValue || (float)newValue < minValue)
+            {
+                return;
+            }
+            currentValue = newValue;
+            UpdateValue();
+        }
+
+        private float GetInternalCurrentValue()
+        {
+            return currentValue;
+        }
+
         /// <summary>
         /// The property to get/set the buffer value of the Progress.
         /// </summary>
@@ -630,7 +559,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (float)GetInternalBufferValueProperty(this);
+                    return GetInternalBufferValue();
                 }
             }
             set
@@ -641,11 +570,26 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalBufferValueProperty(this, null, value);
+                    SetInternalBufferValue(value);
                 }
             }
         }
 
+        private void SetInternalBufferValue(float newValue)
+        {
+            if ((float)newValue > maxValue || (float)newValue < minValue)
+            {
+                return;
+            }
+            bufferValue = newValue;
+            UpdateValue();
+        }
+
+        private float GetInternalBufferValue()
+        {
+            return bufferValue;
+        }
+
         /// <summary>
         /// Gets or sets state of progress.
         /// </summary>
@@ -660,7 +604,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (ProgressStatusType)GetInternalProgressStateProperty(this);
+                    return GetInternalProgressState();
                 }
             }
             set
@@ -671,11 +615,22 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalProgressStateProperty(this, null, value);
+                    SetInternalProgressState(value);
                 }
             }
         }
 
+        private void SetInternalProgressState(ProgressStatusType newValue)
+        {
+            state = newValue;
+            UpdateStates();
+        }
+
+        private ProgressStatusType GetInternalProgressState()
+        {
+            return state;
+        }
+
         /// <inheritdoc/>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public override void OnInitialize()
index e11985bdd7f43c514baa5ac8e11ec66f0948a79c..4569a208a558b7153ccb9d6a2ba4c2fc1e465e7d 100755 (executable)
@@ -5,6 +5,101 @@ namespace Tizen.NUI.Components
 {
     public partial class Progress
     {
+        /// <summary>
+        /// MaxValueProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty MaxValueProperty = null;
+        internal static void SetInternalMaxValueProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Progress)bindable;
+                instance.SetInternalMaxValue((float)newValue);
+            }
+        }
+        internal static object GetInternalMaxValueProperty(BindableObject bindable)
+        {
+            var instance = (Progress)bindable;
+            return instance.GetInternalMaxValue();
+        }
+
+        /// <summary>
+        /// MinValueProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty MinValueProperty = null;
+        internal static void SetInternalMinValueProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            var instance = (Progress)bindable;
+            if (newValue != null)
+            {
+                instance.SetInternalMinValue((float)newValue);
+            }
+        }
+        internal static object GetInternalMinValueProperty(BindableObject bindable)
+        {
+            var instance = (Progress)bindable;
+            return instance.GetInternalMinValue();
+        }
+
+        /// <summary>
+        /// CurrentValueProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty CurrentValueProperty = null;
+        internal static void SetInternalCurrentValueProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Progress)bindable;
+                instance.SetInternalCurrentValue((float)newValue);
+            }
+        }
+        internal static object GetInternalCurrentValueProperty(BindableObject bindable)
+        {
+            var instance = (Progress)bindable;
+            return instance.GetInternalCurrentValue();
+        }
+
+        /// <summary>
+        /// BufferValueProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty BufferValueProperty = null;
+        internal static void SetInternalBufferValueProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Progress)bindable;
+                instance.SetInternalBufferValue((float)newValue);
+            }
+        }
+        internal static object GetInternalBufferValueProperty(BindableObject bindable)
+        {
+            var instance = (Progress)bindable;
+            return instance.GetInternalBufferValue();
+        }
+
+        /// <summary>
+        /// ProgressStateProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty ProgressStateProperty = null;
+        internal static void SetInternalProgressStateProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            if (newValue != null)
+            {
+                var instance = (Progress)bindable;
+                instance.SetInternalProgressState((ProgressStatusType)newValue);
+            }
+        }
+        internal static object GetInternalProgressStateProperty(BindableObject bindable)
+        {
+            var instance = (Progress)bindable;
+            return instance.GetInternalProgressState();
+        }
+
         /// <summary>
         /// TrackImageURLProperty
         /// </summary>
@@ -12,9 +107,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TrackImageURLProperty = null;
         internal static void SetInternalTrackImageURLProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalTrackImageURL = newValue as string;
             }
         }
@@ -31,9 +126,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ProgressImageURLProperty = null;
         internal static void SetInternalProgressImageURLProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalProgressImageURL = newValue as string;
             }
         }
@@ -50,9 +145,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty BufferImageURLProperty = null;
         internal static void SetInternalBufferImageURLProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalBufferImageURL = newValue as string;
             }
         }
@@ -69,9 +164,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty IndeterminateImageUrlProperty = null;
         internal static void SetInternalIndeterminateImageUrlProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalIndeterminateImageUrl = newValue as string;
             }
         }
@@ -88,9 +183,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TrackColorProperty = null;
         internal static void SetInternalTrackColorProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalTrackColor = newValue as Color;
             }
         }
@@ -107,9 +202,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ProgressColorProperty = null;
         internal static void SetInternalProgressColorProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalProgressColor = newValue as Color;
             }
         }
@@ -126,9 +221,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty BufferColorProperty = null;
         internal static void SetInternalBufferColorProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (Progress)bindable;
             if (newValue != null)
             {
+                var instance = (Progress)bindable;
                 instance.InternalBufferColor = newValue as Color;
             }
         }
index e25eb87ab0175a7c3a44b28f37e0ce36b9511315..17287e30310fd79a0f09b7395b49a2518f7d2839 100755 (executable)
@@ -31,112 +31,6 @@ namespace Tizen.NUI.Components
     /// <since_tizen> 9 </since_tizen>
     public partial class CollectionView : RecyclerView
     {
-        /// <summary>
-        /// Binding Property of selected item in single selection.
-        /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        public static readonly BindableProperty SelectedItemProperty = null;
-        internal static void SetInternalSelectedItemProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var colView = bindable as CollectionView;
-            if (colView == null)
-            {
-                throw new Exception("Bindable object is not CollectionView.");
-            }
-
-            oldValue = colView.selectedItem;
-            colView.selectedItem = newValue;
-
-            var args = new SelectionChangedEventArgs(oldValue, newValue);
-            foreach (RecyclerViewItem item in colView.ContentContainer.Children.Where((item) => item is RecyclerViewItem))
-            {
-                if (item.BindingContext == null)
-                {
-                    continue;
-                }
-
-                if (item.BindingContext == oldValue)
-                {
-                    item.IsSelected = false;
-                }
-                else if (item.BindingContext == newValue)
-                {
-                    item.IsSelected = true;
-                }
-            }
-
-            SelectionPropertyChanged(colView, args);
-        }
-        internal static object GetInternalSelectedItemProperty(BindableObject bindable)
-        {
-            var colView = bindable as CollectionView;
-            if (colView == null)
-            {
-                throw new Exception("Bindable object is not CollectionView.");
-            }
-
-            return colView.selectedItem;
-        }
-
-        /// <summary>
-        /// Binding Property of selected items list in multiple selection.
-        /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        public static readonly BindableProperty SelectedItemsProperty = null;
-        internal static void SetInternalSelectedItemsProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var colView = bindable as CollectionView;
-            if (colView == null)
-            {
-                throw new Exception("Bindable object is not CollectionView.");
-            }
-
-            var oldSelection = colView.selectedItems ?? selectEmpty;
-            //FIXME : CoerceSelectedItems calls only isCreatedByXaml
-            var newSelection = (SelectionList)CoerceSelectedItems(colView, newValue);
-            colView.selectedItems = newSelection;
-            colView.SelectedItemsPropertyChanged(oldSelection, newSelection);
-        }
-        internal static object GetInternalSelectedItemsProperty(BindableObject bindable)
-        {
-            var colView = bindable as CollectionView;
-            if (colView == null)
-            {
-                throw new Exception("Bindable object is not CollectionView.");
-            }
-
-            colView.selectedItems = colView.selectedItems ?? new SelectionList(colView);
-            return colView.selectedItems;
-        }
-
-        /// <summary>
-        /// Binding Property of selected items list in multiple selection.
-        /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        public static readonly BindableProperty SelectionModeProperty = null;
-        internal static void SetInternalSelectionModeProperty(BindableObject bindable, object oldValue, object newValue)
-        {
-            var colView = bindable as CollectionView;
-            if (colView == null)
-            {
-                throw new Exception("Bindable object is not CollectionView.");
-            }
-
-            oldValue = colView.selectionMode;
-            colView.selectionMode = (ItemSelectionMode)newValue;
-            SelectionModePropertyChanged(colView, oldValue, newValue);
-        }
-        internal static object GetInternalSelectionModeProperty(BindableObject bindable)
-        {
-            var colView = bindable as CollectionView;
-            if (colView == null)
-            {
-                throw new Exception("Bindable object is not CollectionView.");
-            }
-
-            return colView.selectionMode;
-        }
-
         private static readonly IList<object> selectEmpty = new List<object>(0);
         private DataTemplate itemTemplate = null;
         private IEnumerable itemsSource = null;
@@ -288,22 +182,22 @@ namespace Tizen.NUI.Components
             {
                 if (NUIApplication.IsUsingXaml)
                 {
-                    return GetValue(RecyclerView.ItemsSourceProperty) as IEnumerable;
+                    return GetValue(ItemsSourceProperty) as IEnumerable;
                 }
                 else
                 {
-                    return GetInternalItemsSourceProperty(this) as IEnumerable;
+                    return InternalItemsSource;
                 }
             }
             set
             {
                 if (NUIApplication.IsUsingXaml)
                 {
-                    SetValue(RecyclerView.ItemsSourceProperty, value);
+                    SetValue(ItemsSourceProperty, value);
                 }
                 else
                 {
-                    SetInternalItemsSourceProperty(this, null, value);
+                    InternalItemsSource = value;
                 }
             }
         }
@@ -330,7 +224,7 @@ namespace Tizen.NUI.Components
                     selectedItems?.Clear();
                 }
 
-                itemsSource = value as IEnumerable;
+                itemsSource = value;
 
                 if (itemsSource == null)
                 {
@@ -373,7 +267,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalItemTemplateProperty(this) as DataTemplate;
+                    return InternalItemTemplate;
                 }
             }
             set
@@ -384,7 +278,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalItemTemplateProperty(this, null, value);
+                    InternalItemTemplate = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -426,7 +320,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalItemsLayouterProperty(this) as ItemsLayouter;
+                    return InternalItemsLayouter;
                 }
             }
             set
@@ -437,13 +331,12 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalItemsLayouterProperty(this, null, value);
+                    InternalItemsLayouter = value;
                 }
                 NotifyPropertyChanged();
             }
         }
 
-
         /// <inheritdoc/>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected override ItemsLayouter InternalItemsLayouter
@@ -491,7 +384,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (Direction)GetInternalScrollingDirectionProperty(this);
+                    return InternalScrollingDirection;
                 }
             }
             set
@@ -502,7 +395,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalScrollingDirectionProperty(this, null, value);
+                    InternalScrollingDirection = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -568,12 +461,20 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalSelectedItemsProperty(this) as IList<object>;
+                    return GetInternalSelectedItems();
                 }
             }
             // set => SetValue(SelectedItemsProperty, new SelectionList(this, value));
         }
 
+        //NOTE: if setter is uncommented, a function like SetInternalSelectedItems need be added here.
+
+        private IList<object> GetInternalSelectedItems()
+        {
+            selectedItems = selectedItems ?? new SelectionList(this);
+            return selectedItems;
+        }
+
         /// <summary>
         /// Selection mode to handle items selection. See ItemSelectionMode for details.
         /// </summary>
@@ -588,7 +489,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (ItemSelectionMode)GetInternalSelectionModeProperty(this);
+                    return GetInternalSelectionMode();
                 }
             }
             set
@@ -599,11 +500,23 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalSelectionModeProperty(this, null, value);
+                    SetInternalSelectionMode(value);
                 }
             }
         }
 
+        private void SetInternalSelectionMode(ItemSelectionMode newValue)
+        {
+            ItemSelectionMode oldValue = selectionMode;
+            selectionMode = newValue;
+            SelectionModePropertyChanged(this, oldValue, newValue);
+        }
+
+        private ItemSelectionMode GetInternalSelectionMode()
+        {
+            return selectionMode;
+        }
+
         /// <summary>
         /// Command of selection changed.
         /// </summary>
@@ -618,7 +531,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalSelectionChangedCommandProperty(this) as ICommand;
+                    return InternalSelectionChangedCommand;
                 }
             }
             set
@@ -629,7 +542,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalSelectionChangedCommandProperty(this, null, value);
+                    InternalSelectionChangedCommand = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -683,7 +596,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalHeaderProperty(this) as RecyclerViewItem;
+                    return InternalHeader;
                 }
             }
             set
@@ -694,7 +607,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalHeaderProperty(this, null, value);
+                    InternalHeader = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -741,7 +654,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalFooterProperty(this) as RecyclerViewItem;
+                    return InternalFooter;
                 }
             }
             set
@@ -752,7 +665,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalFooterProperty(this, null, value);
+                    InternalFooter = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -798,7 +711,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (bool)GetInternalIsGroupedProperty(this);
+                    return InternalIsGrouped;
                 }
             }
             set
@@ -809,7 +722,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIsGroupedProperty(this, null, value);
+                    InternalIsGrouped =  value;
                 }
                 NotifyPropertyChanged();
             }
@@ -852,7 +765,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalGroupHeaderTemplateProperty(this) as DataTemplate;
+                    return InternalGroupHeaderTemplate;
                 }
             }
             set
@@ -863,7 +776,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalGroupHeaderTemplateProperty(this, null, value);
+                    InternalGroupHeaderTemplate = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -910,7 +823,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalGroupFooterTemplateProperty(this) as DataTemplate;
+                    return InternalGroupFooterTemplate;
                 }
             }
             set
@@ -921,7 +834,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalGroupFooterTemplateProperty(this, null, value);
+                    InternalGroupFooterTemplate = value;
                 }
                 NotifyPropertyChanged();
             }
index d3525ee79496f5b2f18501fba4af73c9cbe5f88b..7cb9048d2758e08afa5a8c64eff0087d005e6303 100755 (executable)
@@ -1,5 +1,6 @@
 using System;
 using System.ComponentModel;
+using System.Linq;
 using System.Windows.Input;
 using Tizen.NUI.Binding;
 
@@ -7,6 +8,104 @@ namespace Tizen.NUI.Components
 {
     public partial class CollectionView
     {
+        /// <summary>
+        /// Binding Property of selected item in single selection.
+        /// </summary>
+        /// <since_tizen> 9 </since_tizen>
+        public static readonly BindableProperty SelectedItemProperty = null;
+        internal static void SetInternalSelectedItemProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            var colView = bindable as CollectionView;
+            if (colView == null)
+            {
+                throw new Exception("Bindable object is not CollectionView.");
+            }
+
+            oldValue = colView.selectedItem;
+            colView.selectedItem = newValue;
+
+            var args = new SelectionChangedEventArgs(oldValue, newValue);
+            foreach (RecyclerViewItem item in colView.ContentContainer.Children.Where((item) => item is RecyclerViewItem))
+            {
+                if (item.BindingContext == null)
+                {
+                    continue;
+                }
+
+                if (item.BindingContext == oldValue)
+                {
+                    item.IsSelected = false;
+                }
+                else if (item.BindingContext == newValue)
+                {
+                    item.IsSelected = true;
+                }
+            }
+            SelectionPropertyChanged(colView, args);
+        }
+        internal static object GetInternalSelectedItemProperty(BindableObject bindable)
+        {
+            var colView = bindable as CollectionView;
+            if (colView == null)
+            {
+                throw new Exception("Bindable object is not CollectionView.");
+            }
+            return colView.selectedItem;
+        }
+
+        /// <summary>
+        /// Binding Property of selected items list in multiple selection.
+        /// </summary>
+        /// <since_tizen> 9 </since_tizen>
+        public static readonly BindableProperty SelectedItemsProperty = null;
+        internal static void SetInternalSelectedItemsProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            var colView = bindable as CollectionView;
+            if (colView == null)
+            {
+                throw new Exception("Bindable object is not CollectionView.");
+            }
+
+            var oldSelection = colView.selectedItems ?? selectEmpty;
+            //FIXME : CoerceSelectedItems calls only isCreatedByXaml
+            var newSelection = (SelectionList)CoerceSelectedItems(colView, newValue);
+            colView.selectedItems = newSelection;
+            colView.SelectedItemsPropertyChanged(oldSelection, newSelection);
+        }
+        internal static object GetInternalSelectedItemsProperty(BindableObject bindable)
+        {
+            var colView = bindable as CollectionView;
+            if (colView == null)
+            {
+                throw new Exception("Bindable object is not CollectionView.");
+            }
+            return colView.GetInternalSelectedItems();
+        }
+
+        /// <summary>
+        /// Binding Property of selected items list in multiple selection.
+        /// </summary>
+        /// <since_tizen> 9 </since_tizen>
+        public static readonly BindableProperty SelectionModeProperty = null;
+        internal static void SetInternalSelectionModeProperty(BindableObject bindable, object oldValue, object newValue)
+        {
+            var colView = bindable as CollectionView;
+            if (colView == null)
+            {
+                throw new Exception("Bindable object is not CollectionView.");
+            }
+            colView.SetInternalSelectionMode((ItemSelectionMode)newValue);
+        }
+        internal static object GetInternalSelectionModeProperty(BindableObject bindable)
+        {
+            var colView = bindable as CollectionView;
+            if (colView == null)
+            {
+                throw new Exception("Bindable object is not CollectionView.");
+            }
+            return colView.GetInternalSelectionMode();
+        }
+
         /// <summary>
         /// ItemsLayouterProperty
         /// </summary>
@@ -39,7 +138,7 @@ namespace Tizen.NUI.Components
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public static readonly new BindableProperty ScrollingDirectionProperty = null;
-        internal static void SetInternalScrollingDirectionProperty(BindableObject bindable, object oldValue, object newValue)
+        internal static new void SetInternalScrollingDirectionProperty(BindableObject bindable, object oldValue, object newValue)
         {
             var instance = bindable as CollectionView;
             if (instance == null)
@@ -51,7 +150,7 @@ namespace Tizen.NUI.Components
                 instance.InternalScrollingDirection = (Direction)newValue;
             }
         }
-        internal static object GetInternalScrollingDirectionProperty(BindableObject bindable)
+        internal static new object GetInternalScrollingDirectionProperty(BindableObject bindable)
         {
             var instance = bindable as CollectionView;
             if (instance == null)
index c6a20e66a0d58752a69c49fb3d637b2bff66646a..e8e935e38b7ce63bfc9e71ca29a62948d5ef9d88 100755 (executable)
@@ -155,7 +155,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalBadgeProperty(this) as View;
+                    return InternalBadge;
                 }
             }
             set
@@ -166,7 +166,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalBadgeProperty(this, null, value);
+                    InternalBadge = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -205,7 +205,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalResourceUrlProperty(this) as string;
+                    return InternalResourceUrl;
                 }
             }
             set
@@ -216,7 +216,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalResourceUrlProperty(this, null, value);
+                    InternalResourceUrl = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -275,7 +275,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTextProperty(this) as string;
+                    return InternalText;
                 }
             }
             set
@@ -286,7 +286,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTextProperty(this, null, value);
+                    InternalText = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -313,11 +313,11 @@ namespace Tizen.NUI.Components
             {
                 if (NUIApplication.IsUsingXaml)
                 {
-                    return (Tizen.NUI.Components.DefaultGridItem.LabelOrientation)GetValue(LabelOrientationTypeProperty);
+                    return (LabelOrientation)GetValue(LabelOrientationTypeProperty);
                 }
                 else
                 {
-                    return (Tizen.NUI.Components.DefaultGridItem.LabelOrientation)GetInternalLabelOrientationTypeProperty(this);
+                    return InternalLabelOrientationType;
                 }
             }
             set
@@ -328,12 +328,12 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalLabelOrientationTypeProperty(this, null, value);
+                    InternalLabelOrientationType = value;
                 }
                 NotifyPropertyChanged();
             }
         }
-        private Tizen.NUI.Components.DefaultGridItem.LabelOrientation InternalLabelOrientationType
+        private LabelOrientation InternalLabelOrientationType
         {
             get
             {
index 858c500e90bcf8670f8ec212b9fbb263fdd4f235..c6cd102b98c736fdb9715d604008bb05b083451f 100755 (executable)
@@ -13,9 +13,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty BadgeProperty = null;
         internal static void SetInternalBadgeProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultGridItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultGridItem)bindable;
                 instance.InternalBadge = newValue as View;
             }
         }
@@ -32,9 +32,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TextProperty = null;
         internal static void SetInternalTextProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultGridItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultGridItem)bindable;
                 instance.InternalText = newValue as string;
             }
         }
@@ -51,9 +51,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ResourceUrlProperty = null;
         internal static void SetInternalResourceUrlProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultGridItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultGridItem)bindable;
                 instance.InternalResourceUrl = newValue as string;
             }
         }
@@ -70,10 +70,10 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty LabelOrientationTypeProperty = null;
         internal static void SetInternalLabelOrientationTypeProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultGridItem)bindable;
             if (newValue != null)
             {
-                instance.InternalLabelOrientationType = (Tizen.NUI.Components.DefaultGridItem.LabelOrientation)newValue;
+                var instance = (DefaultGridItem)bindable;
+                instance.InternalLabelOrientationType = (LabelOrientation)newValue;
             }
         }
         internal static object GetInternalLabelOrientationTypeProperty(BindableObject bindable)
index fa4370dc7ad586dd72d0549a774b02c5547467d8..8eee07cb367d96c8c13c07d7aacb4272459cee20 100755 (executable)
@@ -92,7 +92,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalIconProperty(this) as View;
+                    return InternalIcon;
                 }
             }
             set
@@ -103,7 +103,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIconProperty(this, null, value);
+                    InternalIcon = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -206,7 +206,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTextProperty(this) as string;
+                    return InternalText;
                 }
             }
             set
@@ -217,7 +217,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTextProperty(this, null, value);
+                    InternalText = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -276,7 +276,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalSubTextProperty(this) as string;
+                    return InternalSubText;
                 }
             }
             set
@@ -287,7 +287,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalSubTextProperty(this, null, value);
+                    InternalSubText = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -318,7 +318,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalExtraProperty(this) as View;
+                    return InternalExtra;
                 }
             }
             set
@@ -329,7 +329,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalExtraProperty(this, null, value);
+                    InternalExtra = value;
                 }
                 NotifyPropertyChanged();
             }
index 813b1a08804c4b98b349c5d2dec262e57dc260c0..1898e3148d000de0ffdfc00c84dd6c392c342754 100755 (executable)
@@ -13,9 +13,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty IconProperty = null;
         internal static void SetInternalIconProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultLinearItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultLinearItem)bindable;
                 instance.InternalIcon = newValue as View;
             }
         }
@@ -32,9 +32,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TextProperty = null;
         internal static void SetInternalTextProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultLinearItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultLinearItem)bindable;
                 instance.InternalText = newValue as string;
             }
         }
@@ -51,9 +51,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty SubTextProperty = null;
         internal static void SetInternalSubTextProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultLinearItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultLinearItem)bindable;
                 instance.InternalSubText = newValue as string;
             }
         }
@@ -70,9 +70,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ExtraProperty = null;
         internal static void SetInternalExtraProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultLinearItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultLinearItem)bindable;
                 instance.InternalExtra = newValue as View;
             }
         }
index fad25e9782a9b2cc88cb140e8a4cb8bb15e2011d..824796c3fe0b9075abf7440af15852a4b8ffc2a9 100755 (executable)
@@ -85,7 +85,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalIconProperty(this) as View;
+                    return InternalIcon;
                 }
             }
             set
@@ -96,7 +96,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIconProperty(this, null, value);
+                    InternalIcon = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -194,7 +194,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalTextProperty(this) as string;
+                    return InternalText;
                 }
             }
             set
@@ -205,7 +205,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTextProperty(this, null, value);
+                    InternalText = value;
                 }
                 NotifyPropertyChanged();
             }
index e168cc8e6e1c7b999ae4cb68c15f7a44d1b3d419..5c4e4760c9b1ce270f4e025ade43121a7999dec5 100755 (executable)
@@ -13,9 +13,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty IconProperty = null;
         internal static void SetInternalIconProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultTitleItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultTitleItem)bindable;
                 instance.InternalIcon = newValue as View;
             }
         }
@@ -32,9 +32,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TextProperty = null;
         internal static void SetInternalTextProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (DefaultTitleItem)bindable;
             if (newValue != null)
             {
+                var instance = (DefaultTitleItem)bindable;
                 instance.InternalText = newValue as string;
             }
         }
index cd05cc01b5f84d41871ca29c95645a04da14857a..b93901832601ad117ced4cbbc38ddd869da0cad5 100755 (executable)
@@ -39,57 +39,16 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty IsSelectedProperty = null;
         internal static void SetInternalIsSelectedProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (RecyclerViewItem)bindable;
             if (newValue != null)
             {
-                bool newSelected = (bool)newValue;
-                if (instance.isSelected != newSelected)
-                {
-                    instance.isSelected = newSelected;
-
-                    if (instance.isSelectable)
-                    {
-                        instance.UpdateState();
-                    }
-                    if (instance.ParentItemsView is CollectionView collectionView)
-                    {
-                        var context = instance.BindingContext;
-                        if (collectionView.SelectionMode is ItemSelectionMode.Single ||
-                            collectionView.SelectionMode is ItemSelectionMode.SingleAlways)
-                        {
-                            if (newSelected && collectionView.SelectedItem != context)
-                            {
-                                collectionView.SelectedItem = context;
-                            }
-                            else if (!newSelected && collectionView.SelectedItem == context)
-                            {
-                                collectionView.SelectedItem = null;
-                            }
-                        }
-                        else if (collectionView.SelectionMode is ItemSelectionMode.Multiple)
-                        {
-                            var selectedList = collectionView.SelectedItems;
-                            if (selectedList != null && context != null)
-                            {
-                                bool contains = selectedList.Contains(context);
-                                if (newSelected && !contains)
-                                {
-                                    selectedList.Add(context);
-                                }
-                                else if (!newSelected && contains)
-                                {
-                                    selectedList.Remove(context);
-                                }
-                            }
-                        }
-                    }
-                }
+                var instance = (RecyclerViewItem)bindable;
+                instance.SetInternalIsSelected((bool)newValue);
             }
         }
         internal static object GetInternalIsSelectedProperty(BindableObject bindable)
         {
             var instance = (RecyclerViewItem)bindable;
-            return instance.isSelectable && instance.isSelected;
+            return instance.GetInternalIsSelected();
         }
 
         /// <summary>
@@ -99,25 +58,20 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty IsSelectableProperty = null;
         internal static void SetInternalIsSelectableProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (RecyclerViewItem)bindable;
             if (newValue != null)
             {
-                bool newSelectable = (bool)newValue;
-                if (instance.isSelectable != newSelectable)
-                {
-                    instance.isSelectable = newSelectable;
-                    instance.UpdateState();
-                }
+                var instance = (RecyclerViewItem)bindable;
+                instance.SetInternalIsSelectable((bool)newValue);
             }
         }
         internal static object GetInternalIsSelectableProperty(BindableObject bindable)
         {
-            return ((RecyclerViewItem)bindable).isSelectable;
+            var instance = (RecyclerViewItem)bindable;
+            return instance.GetInternalIsSelectable();
         }
 
         private bool isSelected = false;
         private bool isSelectable = true;
-        private RecyclerViewItemStyle ItemStyle => ViewStyle as RecyclerViewItemStyle;
 
         static RecyclerViewItem()
         {
@@ -176,7 +130,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (bool)GetInternalIsSelectableProperty(this);
+                    return GetInternalIsSelectable();
                 }
             }
             set
@@ -187,12 +141,27 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIsSelectableProperty(this, null, value);
+                    SetInternalIsSelectable(value);
                 }
                 OnPropertyChanged(nameof(IsSelectable));
             }
         }
 
+        private void SetInternalIsSelectable(bool newValue)
+        {
+            bool newSelectable = newValue;
+            if (isSelectable != newSelectable)
+            {
+                isSelectable = newSelectable;
+                UpdateState();
+            }
+        }
+
+        private bool GetInternalIsSelectable()
+        {
+            return isSelectable;
+        }
+
         /// <summary>
         /// Flag to decide selected state in RecyclerViewItem.
         /// </summary>
@@ -207,7 +176,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (bool)GetInternalIsSelectedProperty(this);
+                    return GetInternalIsSelected();
                 }
             }
             set
@@ -218,12 +187,63 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIsSelectedProperty(this, null, value);
+                    SetInternalIsSelected(value);
                 }
                 OnPropertyChanged(nameof(IsSelected));
             }
         }
 
+        private void SetInternalIsSelected(bool newValue)
+        {
+            bool newSelected = newValue;
+            if (isSelected != newSelected)
+            {
+                isSelected = newSelected;
+
+                if (isSelectable)
+                {
+                    UpdateState();
+                }
+                if (ParentItemsView is CollectionView collectionView)
+                {
+                    var context = BindingContext;
+                    if (collectionView.SelectionMode is ItemSelectionMode.Single ||
+                        collectionView.SelectionMode is ItemSelectionMode.SingleAlways)
+                    {
+                        if (newSelected && collectionView.SelectedItem != context)
+                        {
+                            collectionView.SelectedItem = context;
+                        }
+                        else if (!newSelected && collectionView.SelectedItem == context)
+                        {
+                            collectionView.SelectedItem = null;
+                        }
+                    }
+                    else if (collectionView.SelectionMode is ItemSelectionMode.Multiple)
+                    {
+                        var selectedList = collectionView.SelectedItems;
+                        if (selectedList != null && context != null)
+                        {
+                            bool contains = selectedList.Contains(context);
+                            if (newSelected && !contains)
+                            {
+                                selectedList.Add(context);
+                            }
+                            else if (!newSelected && contains)
+                            {
+                                selectedList.Remove(context);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        private bool GetInternalIsSelected()
+        {
+            return isSelectable && isSelected;
+        }
+
         /// <summary>
         /// Flag to decide enabled state in RecyclerViewItem.
         /// Set enabled state false makes item untouchable and unfocusable.
index ab1c66ec082694e3e5bf0ba78b7c8e15c3c90aa0..506fb551aad474a3c3c5e35069a47dcf20ff1118 100755 (executable)
@@ -17,6 +17,7 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Linq;
 using Tizen.NUI.Binding;
 
 namespace Tizen.NUI.Components
@@ -130,7 +131,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalItemsSourceProperty(this) as IEnumerable;
+                    return InternalItemsSource;
                 }
             }
             set
@@ -141,11 +142,12 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalItemsSourceProperty(this, null, value);
+                    InternalItemsSource = value;
                 }
                 NotifyPropertyChanged();
             }
         }
+
         internal virtual IEnumerable InternalItemsSource { get; set; }
 
         /// <summary>
@@ -162,7 +164,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return GetInternalItemTemplateProperty(this) as DataTemplate;
+                    return InternalItemTemplate;
                 }
             }
             set
@@ -173,7 +175,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalItemTemplateProperty(this, null, value);
+                    InternalItemTemplate = value;
                 }
                 NotifyPropertyChanged();
             }
index 7f3f290095f0235ed29d3d625bc6683f85a1ed92..16f6995b5c8fda6a8e80cb44826287db55a5e39d 100755 (executable)
@@ -63,9 +63,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty TimeProperty = null;
         internal static void SetInternalTimeProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (TimePicker)bindable;
             if (newValue != null)
             {
+                var instance = (TimePicker)bindable;
                 instance.InternalTime = (DateTime)newValue;
             }
         }
@@ -82,9 +82,9 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty Is24HourViewProperty = null;
         internal static void SetInternalIs24HourViewProperty(BindableObject bindable, object oldValue, object newValue)
         {
-            var instance = (TimePicker)bindable;
             if (newValue != null)
             {
+                var instance = (TimePicker)bindable;
                 instance.InternalIs24HourView = (bool)newValue;
             }
         }
@@ -190,7 +190,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (DateTime)GetInternalTimeProperty(this);
+                    return InternalTime;
                 }
             }
             set
@@ -201,7 +201,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalTimeProperty(this, null, value);
+                    InternalTime = value;
                 }
                 NotifyPropertyChanged();
             }
@@ -252,7 +252,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    return (bool)GetInternalIs24HourViewProperty(this);
+                    return InternalIs24HourView;
                 }
             }
             set
@@ -263,7 +263,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    SetInternalIs24HourViewProperty(this, null, value);
+                    InternalIs24HourView = value;
                 }
                 NotifyPropertyChanged();
             }
index 0efceb5d9d64eafcd24e72ca4412f3859586701a..9702ae67eed158f63fcb73ed83b504377794717b 100755 (executable)
@@ -29,7 +29,7 @@ namespace Tizen.NUI.Components
     {
         // NOTE framerate selector does not work.
         static readonly IStyleProperty FrameRateProperty = new StyleProperty<Loading, Selector<int?>>((v, o) => v.FrameRate = (int)o.Normal);
-        static readonly IStyleProperty ImageListProperty = new StyleProperty<Loading, IList<string>>((v, o) => Loading.SetInternalImageListProperty(v, null, o));
+        static readonly IStyleProperty ImageListProperty = new StyleProperty<Loading, IList<string>>((v, o) => v.SetInternalImageList(o));
         static readonly IStyleProperty LottieResourceUrlProperty = new StyleProperty<Loading, string>((v, o) => v.LottieResourceUrl = o);
 
         private Size loadingSize;