[Xaml] Add MergeStyle to View
authorFang Xiaohui <xiaohui.fang@samsung.com>
Wed, 25 Aug 2021 02:20:13 +0000 (10:20 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 1 Sep 2021 08:20:01 +0000 (17:20 +0900)
src/Tizen.NUI/src/internal/XamlBinding/MergedStyle.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs

index bf0c29b..f4c0671 100755 (executable)
@@ -59,7 +59,7 @@ namespace Tizen.NUI.Binding
                     foreach (var styleClass in _styleClass)
                     {
                         var classStyleProperty = BindableProperty.Create("ClassStyle", typeof(IList<XamlStyle>), typeof(View), default(IList<XamlStyle>),
-                            propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.OnClassStyleChanged());
+                            propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable).MergedStyle.OnClassStyleChanged());
                         _classStyleProperties.Add(classStyleProperty);
                         Target.OnSetDynamicResource(classStyleProperty, Tizen.NUI.Binding.XamlStyle.StyleClassPrefix + styleClass);
                     }
index 0006b64..577ef2d 100755 (executable)
@@ -2397,6 +2397,19 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public XamlStyle XamlStyle
+        {
+            get
+            {
+                return (XamlStyle)GetValue(XamlStyleProperty);
+            }
+            set
+            {
+                SetValue(XamlStyleProperty, value);
+            }
+        }
+
         /// <summary>
         /// The Color of View. This is an RGBA value.
         /// </summary>
index e533477..ff6ba0a 100755 (executable)
@@ -1705,6 +1705,12 @@ namespace Tizen.NUI.BaseComponents
         });
 
         /// <summary>
+        /// XamlStyleProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty XamlStyleProperty = BindableProperty.Create(nameof(XamlStyle), typeof(XamlStyle), typeof(View), default(XamlStyle), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable).MergedStyle.Style = (XamlStyle)newvalue);
+
+        /// <summary>
         /// EnableControlState property
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
index f40cd3c..4f58fb4 100755 (executable)
@@ -33,7 +33,7 @@ namespace Tizen.NUI.BaseComponents
         private MergedStyle mergedStyle = null;
         internal string styleName;
 
-        internal MergedStyle _mergedStyle
+        internal MergedStyle MergedStyle
         {
             get
             {