Release 12.0.0.18314
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / ViewBindableProperty.cs
1 /*
2  * Copyright(c) 2019-2022 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using global::System;
19 using System.ComponentModel;
20 using Tizen.NUI.Binding;
21
22 namespace Tizen.NUI.BaseComponents
23 {
24     /// <summary>
25     /// View is the base class for all views.
26     /// </summary>
27     /// <since_tizen> 3 </since_tizen>
28     public partial class View
29     {
30         private float userSizeWidth = 0.0f;
31         private float userSizeHeight = 0.0f;
32
33         /// <summary>
34         /// StyleNameProperty (DALi json)
35         /// </summary>
36         [EditorBrowsable(EditorBrowsableState.Never)]
37 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
38         public static BindableProperty StyleNameProperty = null;
39 #else
40         public static readonly BindableProperty StyleNameProperty = null;
41 #endif
42         internal static void SetInternalStyleNameProperty(BindableObject bindable, object oldValue, object newValue)
43         {
44             var view = (View)bindable;
45             if (newValue != null)
46             {
47                 string styleName = (string)newValue;
48
49                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.StyleName, styleName);
50
51                 view.styleName = styleName;
52
53                 if (string.IsNullOrEmpty(styleName)) return;
54
55                 var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
56
57                 if (style == null) return;
58
59                 view.ApplyStyle(style);
60                 view.SetThemeApplied();
61             }
62         }
63         internal static object GetInternalStyleNameProperty(BindableObject bindable)
64         {
65             var view = (View)bindable;
66
67             if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
68
69             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.StyleName);
70         }
71
72         /// <summary>
73         /// KeyInputFocusProperty
74         /// </summary>
75         [EditorBrowsable(EditorBrowsableState.Never)]
76 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
77         public static BindableProperty KeyInputFocusProperty = null;
78 #else
79         public static readonly BindableProperty KeyInputFocusProperty = null;
80 #endif
81         internal static void SetInternalKeyInputFocusProperty(BindableObject bindable, object oldValue, object newValue)
82         {
83             var view = (View)bindable;
84             if (newValue != null)
85             {
86                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus, (bool)newValue);
87             }
88         }
89         internal static object GetInternalKeyInputFocusProperty(BindableObject bindable)
90         {
91             var view = (View)bindable;
92             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus);
93         }
94
95         /// <summary>
96         /// BackgroundColorProperty
97         /// </summary>
98         [EditorBrowsable(EditorBrowsableState.Never)]
99 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
100         public static BindableProperty BackgroundColorProperty = null;
101 #else
102         public static readonly BindableProperty BackgroundColorProperty = null;
103 #endif
104         internal static void SetInternalBackgroundColorProperty(BindableObject bindable, object oldValue, object newValue)
105         {
106             var view = (View)bindable;
107
108             if (NUIApplication.IsUsingXaml)
109             {
110                 view.themeData?.selectorData?.ClearBackground(view);
111
112                 if (newValue is Selector<Color> selector)
113                 {
114                     if (selector.HasAll()) view.SetBackgroundColor(selector.All);
115                     else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
116                 }
117                 else
118                 {
119                     view.SetBackgroundColor((Color)newValue);
120                 }
121
122             }
123             else
124             {
125                 view.SetBackgroundColor((Color)newValue);
126             }
127         }
128         internal static object GetInternalBackgroundColorProperty(BindableObject bindable)
129         {
130             var view = (View)bindable;
131
132             if (view.internalBackgroundColor == null)
133             {
134                 view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
135             }
136
137             int visualType = (int)Visual.Type.Invalid;
138             Interop.View.InternalRetrievingVisualPropertyInt(view.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType);
139             if (visualType == (int)Visual.Type.Color)
140             {
141                 Interop.View.InternalRetrievingVisualPropertyVector4(view.SwigCPtr, Property.BACKGROUND, ColorVisualProperty.MixColor, Color.getCPtr(view.internalBackgroundColor));
142             }
143             return view.internalBackgroundColor;
144         }
145
146         /// <summary>
147         /// ColorProperty
148         /// </summary>
149         [EditorBrowsable(EditorBrowsableState.Never)]
150 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
151         public static BindableProperty ColorProperty = null;
152 #else
153         public static readonly BindableProperty ColorProperty = null;
154 #endif
155         internal static void SetInternalColorProperty(BindableObject bindable, object oldValue, object newValue)
156         {
157             var view = (View)bindable;
158
159             view.themeData?.selectorData?.Color?.Reset(view);
160
161             if (newValue is Selector<Color> selector)
162             {
163                 if (selector.HasAll()) view.SetColor(selector.All);
164                 else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
165             }
166             else
167             {
168                 view.SetColor((Color)newValue);
169             }
170         }
171         internal static object GetInternalColorProperty(BindableObject bindable)
172         {
173             var view = (View)bindable;
174
175             if (view.internalColor == null)
176             {
177                 view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
178             }
179             Object.InternalRetrievingPropertyVector4(view.SwigCPtr, View.Property.COLOR, view.internalColor.SwigCPtr);
180             return view.internalColor;
181         }
182
183         /// <summary>
184         /// ColorRedProperty
185         /// </summary>
186         [EditorBrowsable(EditorBrowsableState.Never)]
187 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
188         public static BindableProperty ColorRedProperty = null;
189 #else
190         public static readonly BindableProperty ColorRedProperty = null;
191 #endif
192         internal static void SetInternalColorRedProperty(BindableObject bindable, object oldValue, object newValue)
193         {
194             var view = (View)bindable;
195             view.SetColorRed((float?)newValue);
196         }
197         internal static object GetInternalColorRedProperty(BindableObject bindable)
198         {
199             var view = (View)bindable;
200             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorRed);
201         }
202
203         /// <summary>
204         /// ColorGreenProperty
205         /// </summary>
206         [EditorBrowsable(EditorBrowsableState.Never)]
207 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
208         public static BindableProperty ColorGreenProperty = null;
209 #else
210         public static readonly BindableProperty ColorGreenProperty = null;
211 #endif
212         internal static void SetInternalColorGreenProperty(BindableObject bindable, object oldValue, object newValue)
213         {
214             var view = (View)bindable;
215             view.SetColorGreen((float?)newValue);
216
217         }
218         internal static object GetInternalColorGreenProperty(BindableObject bindable)
219         {
220             var view = (View)bindable;
221             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorGreen);
222
223         }
224
225         /// <summary>
226         /// ColorBlueProperty
227         /// </summary>
228         [EditorBrowsable(EditorBrowsableState.Never)]
229 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
230         public static BindableProperty ColorBlueProperty = null;
231 #else
232         public static readonly BindableProperty ColorBlueProperty = null;
233 #endif
234         internal static void SetInternalColorBlueProperty(BindableObject bindable, object oldValue, object newValue)
235         {
236             var view = (View)bindable;
237             view.SetColorBlue((float?)newValue);
238
239         }
240         internal static object GetInternalColorBlueProperty(BindableObject bindable)
241         {
242             var view = (View)bindable;
243             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorBlue);
244
245         }
246
247         /// <summary> 
248         /// BackgroundImageProperty 
249         /// </summary>
250         [EditorBrowsable(EditorBrowsableState.Never)]
251 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
252         public static BindableProperty BackgroundImageProperty = null;
253 #else
254         public static readonly BindableProperty BackgroundImageProperty = null;
255 #endif
256         internal static void SetInternalBackgroundImageProperty(BindableObject bindable, object oldValue, object newValue)
257         {
258             if (String.Equals(oldValue, newValue))
259             {
260                 NUILog.Debug($"oldValue={oldValue} newValue={newValue} are same. just return here");
261                 return;
262             }
263
264             var view = (View)bindable;
265
266             if (view.themeData?.selectorData != null)
267             {
268                 view.themeData.selectorData.BackgroundColor?.Reset(view);
269                 view.themeData.selectorData.BackgroundImage?.Reset(view);
270             }
271
272             if (newValue is Selector<string> selector)
273             {
274                 if (selector.HasAll()) view.SetBackgroundImage(selector.All);
275                 else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
276             }
277             else
278             {
279                 view.SetBackgroundImage((string)newValue);
280             }
281         }
282         internal static object GetInternalBackgroundImageProperty(BindableObject bindable)
283         {
284             var view = (View)bindable;
285
286             return (string)view.backgroundImageUrl;
287         }
288
289
290         /// <summary>
291         /// BackgroundImageBorderProperty
292         /// </summary>
293         [EditorBrowsable(EditorBrowsableState.Never)]
294 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
295         public static BindableProperty BackgroundImageBorderProperty = null;
296 #else
297         public static readonly BindableProperty BackgroundImageBorderProperty = null;
298 #endif
299         internal static void SetInternalBackgroundImageBorderProperty(BindableObject bindable, object oldValue, object newValue)
300         {
301             var view = (View)bindable;
302
303             view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
304
305             if (newValue is Selector<Rectangle> selector)
306             {
307                 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
308                 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
309             }
310             else
311             {
312                 view.SetBackgroundImageBorder((Rectangle)newValue);
313             }
314         }
315         internal static object GetInternalBackgroundImageBorderProperty(BindableObject bindable)
316         {
317             var view = (View)bindable;
318
319             return view.backgroundExtraData?.BackgroundImageBorder;
320         }
321
322         /// <summary>
323         /// BackgroundProperty
324         /// </summary>
325         [EditorBrowsable(EditorBrowsableState.Never)]
326 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
327         public static BindableProperty BackgroundProperty = null;
328 #else
329         public static readonly BindableProperty BackgroundProperty = null;
330 #endif
331         internal static void SetInternalBackgroundProperty(BindableObject bindable, object oldValue, object newValue)
332         {
333             var view = (View)bindable;
334             if (newValue != null)
335             {
336                 PropertyMap map = (PropertyMap)newValue;
337
338                 // Background extra data is not valid anymore. We should ignore lazy UpdateBackgroundExtraData
339                 view.backgroundExtraData = null;
340                 view.backgroundExtraDataUpdatedFlag = BackgroundExtraDataUpdatedFlag.None;
341
342                 // Update backgroundImageUrl and backgroundImageSynchronousLoading from Map
343                 foreach (int key in cachedNUIViewBackgroundImagePropertyKeyList)
344                 {
345                     using PropertyValue propertyValue = map.Find(key);
346                     if (propertyValue != null)
347                     {
348                         if (key == ImageVisualProperty.URL)
349                         {
350                             propertyValue.Get(out view.backgroundImageUrl);
351                         }
352                         else if (key == ImageVisualProperty.SynchronousLoading)
353                         {
354                             propertyValue.Get(out view.backgroundImageSynchronousLoading);
355                         }
356                     }
357                 }
358
359                 using var mapValue = new PropertyValue(map);
360                 Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, mapValue);
361             }
362         }
363         internal static object GetInternalBackgroundProperty(BindableObject bindable)
364         {
365             var view = (View)bindable;
366
367             // Sync as current properties
368             view.UpdateBackgroundExtraData();
369
370             PropertyMap tmp = new PropertyMap();
371             var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
372             propertyValue.Get(tmp);
373             propertyValue.Dispose();
374             propertyValue = null;
375             return tmp;
376         }
377
378         /// <summary>
379         /// StateProperty
380         /// </summary>
381         [EditorBrowsable(EditorBrowsableState.Never)]
382 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
383         public static BindableProperty StateProperty = null;
384 #else
385         public static readonly BindableProperty StateProperty = null;
386 #endif
387         internal static void SetInternalStateProperty(BindableObject bindable, object oldValue, object newValue)
388         {
389             var view = (View)bindable;
390             if (newValue != null)
391             {
392                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.STATE, (int)newValue);
393             }
394         }
395         internal static object GetInternalStateProperty(BindableObject bindable)
396         {
397             var view = (View)bindable;
398             int temp = 0;
399             temp = Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.STATE);
400             switch (temp)
401             {
402                 case 0: return States.Normal;
403                 case 1: return States.Focused;
404                 case 2: return States.Disabled;
405                 default: return States.Normal;
406             }
407         }
408
409         /// <summary>
410         /// SubStateProperty
411         /// </summary>
412         [EditorBrowsable(EditorBrowsableState.Never)]
413 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
414         public static BindableProperty SubStateProperty = null;
415 #else
416         public static readonly BindableProperty SubStateProperty = null;
417 #endif
418         internal static void SetInternalSubStateProperty(BindableObject bindable, object oldValue, object newValue)
419         {
420             var view = (View)bindable;
421             string valueToString = "";
422             if (newValue != null)
423             {
424                 valueToString = ((States)newValue).GetDescription();
425                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SubState, valueToString);
426             }
427         }
428         internal static object GetInternalSubStateProperty(BindableObject bindable)
429         {
430             var view = (View)bindable;
431             string temp;
432             temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.SubState);
433             return temp.GetValueByDescription<States>();
434         }
435
436         /// <summary>
437         /// TooltipProperty
438         /// </summary>
439         [EditorBrowsable(EditorBrowsableState.Never)]
440 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
441         public static BindableProperty TooltipProperty = null;
442 #else
443         public static readonly BindableProperty TooltipProperty = null;
444 #endif
445         internal static void SetInternalTooltipProperty(BindableObject bindable, object oldValue, object newValue)
446         {
447             var view = (View)bindable;
448             if (newValue != null)
449             {
450                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
451             }
452         }
453         internal static object GetInternalTooltipProperty(BindableObject bindable)
454         {
455             var view = (View)bindable;
456             Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
457             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
458             return temp;
459         }
460
461         /// <summary>
462         /// FlexProperty
463         /// </summary>
464         [EditorBrowsable(EditorBrowsableState.Never)]
465 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
466         public static BindableProperty FlexProperty = null;
467 #else
468         public static readonly BindableProperty FlexProperty = null;
469 #endif
470         internal static void SetInternalFlexProperty(BindableObject bindable, object oldValue, object newValue)
471         {
472             var view = (View)bindable;
473             if (newValue != null)
474             {
475                 Object.InternalSetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX, (float)newValue);
476             }
477         }
478         internal static object GetInternalFlexProperty(BindableObject bindable)
479         {
480             var view = (View)bindable;
481             return Object.InternalGetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX);
482         }
483
484         /// <summary>
485         /// AlignSelfProperty
486         /// </summary>
487         [EditorBrowsable(EditorBrowsableState.Never)]
488 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
489         public static BindableProperty AlignSelfProperty = null;
490 #else
491         public static readonly BindableProperty AlignSelfProperty = null;
492 #endif
493         internal static void SetInternalAlignSelfProperty(BindableObject bindable, object oldValue, object newValue)
494         {
495             var view = (View)bindable;
496             if (newValue != null)
497             {
498                 Object.InternalSetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, (int)newValue);
499             }
500         }
501         internal static object GetInternalAlignSelfProperty(BindableObject bindable)
502         {
503             var view = (View)bindable;
504             return Object.InternalGetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf);
505         }
506
507         /// <summary>
508         /// FlexMarginProperty
509         /// </summary>
510         [EditorBrowsable(EditorBrowsableState.Never)]
511 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
512         public static BindableProperty FlexMarginProperty = null;
513 #else
514         public static readonly BindableProperty FlexMarginProperty = null;
515 #endif
516         internal static void SetInternalFlexMarginProperty(BindableObject bindable, object oldValue, object newValue)
517         {
518             var view = (View)bindable;
519             if (newValue != null)
520             {
521                 Object.InternalSetPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, ((Vector4)newValue).SwigCPtr);
522             }
523         }
524         internal static object GetInternalFlexMarginProperty(BindableObject bindable)
525         {
526             var view = (View)bindable;
527             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
528             Object.InternalRetrievingPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, temp.SwigCPtr);
529             return temp;
530         }
531
532         /// <summary>
533         /// CellIndexProperty
534         /// </summary>
535         [EditorBrowsable(EditorBrowsableState.Never)]
536 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
537         public static BindableProperty CellIndexProperty = null;
538 #else
539         public static readonly BindableProperty CellIndexProperty = null;
540 #endif
541         internal static void SetInternalCellIndexProperty(BindableObject bindable, object oldValue, object newValue)
542         {
543             var view = (View)bindable;
544             if (newValue != null)
545             {
546                 Object.InternalSetPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, ((Vector2)newValue).SwigCPtr);
547             }
548
549         }
550         internal static object GetInternalCellIndexProperty(BindableObject bindable)
551         {
552             var view = (View)bindable;
553             if (view.internalCellIndex == null)
554             {
555                 view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
556             }
557             Object.InternalRetrievingPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, view.internalCellIndex.SwigCPtr);
558             return view.internalCellIndex;
559
560         }
561
562         /// <summary>
563         /// RowSpanProperty
564         /// </summary>
565         [EditorBrowsable(EditorBrowsableState.Never)]
566 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
567         public static BindableProperty RowSpanProperty = null;
568 #else
569         public static readonly BindableProperty RowSpanProperty = null;
570 #endif
571         internal static void SetInternalRowSpanProperty(BindableObject bindable, object oldValue, object newValue)
572         {
573             var view = (View)bindable;
574             if (newValue != null)
575             {
576                 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan, (float)newValue);
577             }
578         }
579         internal static object GetInternalRowSpanProperty(BindableObject bindable)
580         {
581             var view = (View)bindable;
582             return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan);
583         }
584
585         /// <summary>
586         /// ColumnSpanProperty
587         /// </summary>
588         [EditorBrowsable(EditorBrowsableState.Never)]
589 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
590         public static BindableProperty ColumnSpanProperty = null;
591 #else
592         public static readonly BindableProperty ColumnSpanProperty = null;
593 #endif
594         internal static void SetInternalColumnSpanProperty(BindableObject bindable, object oldValue, object newValue)
595         {
596             var view = (View)bindable;
597             if (newValue != null)
598             {
599                 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan, (float)newValue);
600             }
601         }
602         internal static object GetInternalColumnSpanProperty(BindableObject bindable)
603         {
604             var view = (View)bindable;
605             return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan);
606         }
607
608         /// <summary>
609         /// CellHorizontalAlignmentProperty
610         /// </summary>
611         [EditorBrowsable(EditorBrowsableState.Never)]
612 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
613         public static BindableProperty CellHorizontalAlignmentProperty = null;
614 #else
615         public static readonly BindableProperty CellHorizontalAlignmentProperty = null;
616 #endif
617         internal static void SetInternalCellHorizontalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
618         {
619             var view = (View)bindable;
620             string valueToString = "";
621
622             if (newValue != null)
623             {
624                 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
625                 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, valueToString);
626             }
627         }
628         internal static object GetInternalCellHorizontalAlignmentProperty(BindableObject bindable)
629         {
630             var view = (View)bindable;
631             string temp;
632             temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment);
633             return temp.GetValueByDescription<HorizontalAlignmentType>();
634         }
635
636         /// <summary>
637         /// CellVerticalAlignmentProperty
638         /// </summary>
639         [EditorBrowsable(EditorBrowsableState.Never)]
640 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
641         public static BindableProperty CellVerticalAlignmentProperty = null;
642 #else
643         public static readonly BindableProperty CellVerticalAlignmentProperty = null;
644 #endif
645         internal static void SetInternalCellVerticalAlignmentProperty(BindableObject bindable, object oldValue, object newValue)
646         {
647             var view = (View)bindable;
648             string valueToString = "";
649
650             if (newValue != null)
651             {
652                 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
653                 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, valueToString);
654             }
655         }
656         internal static object GetInternalCellVerticalAlignmentProperty(BindableObject bindable)
657         {
658             var view = (View)bindable;
659             string temp;
660             temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment);
661             return temp.GetValueByDescription<VerticalAlignmentType>();
662         }
663
664         /// <summary>
665         /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
666         /// This needs to be hidden as inhouse API until all applications using it have been updated.  Do not make public.
667         /// </summary>
668         [EditorBrowsable(EditorBrowsableState.Never)]
669 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
670         public static BindableProperty WeightProperty = null;
671 #else
672         public static readonly BindableProperty WeightProperty = null;
673 #endif
674         internal static void SetInternalWeightProperty(BindableObject bindable, object oldValue, object newValue)
675         {
676             var view = (View)bindable;
677             if (newValue != null)
678             {
679                 view.Weight = (float)newValue;
680             }
681         }
682         internal static object GetInternalWeightProperty(BindableObject bindable)
683         {
684             var view = (View)bindable;
685             return view.Weight;
686         }
687
688         /// <summary>
689         /// LeftFocusableViewProperty
690         /// </summary>
691         [EditorBrowsable(EditorBrowsableState.Never)]
692 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
693         public static BindableProperty LeftFocusableViewProperty = null;
694 #else
695         public static readonly BindableProperty LeftFocusableViewProperty = null;
696 #endif
697         internal static void SetInternalLeftFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
698         {
699             var view = (View)bindable;
700             if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
701             else { view.LeftFocusableViewId = -1; }
702         }
703         internal static object GetInternalLeftFocusableViewProperty(BindableObject bindable)
704         {
705             var view = (View)bindable;
706             if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
707             return null;
708         }
709
710         /// <summary>
711         /// RightFocusableViewProperty
712         /// </summary>
713         [EditorBrowsable(EditorBrowsableState.Never)]
714 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
715         public static BindableProperty RightFocusableViewProperty = null;
716 #else
717         public static readonly BindableProperty RightFocusableViewProperty = null;
718 #endif
719         internal static void SetInternalRightFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
720         {
721             var view = (View)bindable;
722             if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
723             else { view.RightFocusableViewId = -1; }
724         }
725         internal static object GetInternalRightFocusableViewProperty(BindableObject bindable)
726         {
727             var view = (View)bindable;
728             if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
729             return null;
730         }
731
732         /// <summary>
733         /// UpFocusableViewProperty
734         /// </summary>
735         [EditorBrowsable(EditorBrowsableState.Never)]
736 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
737         public static BindableProperty UpFocusableViewProperty = null;
738 #else
739         public static readonly BindableProperty UpFocusableViewProperty = null;
740 #endif
741         internal static void SetInternalUpFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
742         {
743             var view = (View)bindable;
744             if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
745             else { view.UpFocusableViewId = -1; }
746         }
747         internal static object GetInternalUpFocusableViewProperty(BindableObject bindable)
748         {
749             var view = (View)bindable;
750             if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
751             return null;
752         }
753
754         /// <summary>
755         /// DownFocusableViewProperty
756         /// </summary>
757         [EditorBrowsable(EditorBrowsableState.Never)]
758 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
759         public static BindableProperty DownFocusableViewProperty = null;
760 #else
761         public static readonly BindableProperty DownFocusableViewProperty = null;
762 #endif
763         internal static void SetInternalDownFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
764         {
765             var view = (View)bindable;
766             if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
767             else { view.DownFocusableViewId = -1; }
768         }
769         internal static object GetInternalDownFocusableViewProperty(BindableObject bindable)
770         {
771             var view = (View)bindable;
772             if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
773             return null;
774         }
775
776         /// <summary>
777         /// ClockwiseFocusableViewProperty
778         /// </summary>
779         [EditorBrowsable(EditorBrowsableState.Never)]
780 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
781         public static BindableProperty ClockwiseFocusableViewProperty = null;
782 #else
783         public static readonly BindableProperty ClockwiseFocusableViewProperty = null;
784 #endif
785         internal static void SetInternalClockwiseFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
786         {
787             var view = (View)bindable;
788             if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
789             else { view.ClockwiseFocusableViewId = -1; }
790         }
791         internal static object GetInternalClockwiseFocusableViewProperty(BindableObject bindable)
792         {
793             var view = (View)bindable;
794             if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
795             return null;
796         }
797
798         /// <summary>
799         /// CounterClockwiseFocusableViewProperty
800         /// </summary>
801         [EditorBrowsable(EditorBrowsableState.Never)]
802 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
803         public static BindableProperty CounterClockwiseFocusableViewProperty = null;
804 #else
805         public static readonly BindableProperty CounterClockwiseFocusableViewProperty = null;
806 #endif
807         internal static void SetInternalCounterClockwiseFocusableViewProperty(BindableObject bindable, object oldValue, object newValue)
808         {
809             var view = (View)bindable;
810             if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
811             else { view.CounterClockwiseFocusableViewId = -1; }
812         }
813         internal static object GetInternalCounterClockwiseFocusableViewProperty(BindableObject bindable)
814         {
815             var view = (View)bindable;
816             if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
817             return null;
818         }
819
820         /// <summary>
821         /// FocusableProperty
822         /// </summary>
823         [EditorBrowsable(EditorBrowsableState.Never)]
824 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
825         public static BindableProperty FocusableProperty = null;
826 #else
827         public static readonly BindableProperty FocusableProperty = null;
828 #endif
829         internal static void SetInternalFocusableProperty(BindableObject bindable, object oldValue, object newValue)
830         {
831             var view = (View)bindable;
832             if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
833         }
834         internal static object GetInternalFocusableProperty(BindableObject bindable)
835         {
836             var view = (View)bindable;
837             return view.IsKeyboardFocusable();
838         }
839
840         /// <summary>
841         /// FocusableChildrenProperty
842         /// </summary>
843         [EditorBrowsable(EditorBrowsableState.Never)]
844 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
845         public static BindableProperty FocusableChildrenProperty = null;
846 #else
847         public static readonly BindableProperty FocusableChildrenProperty = null;
848 #endif
849         internal static void SetInternalFocusableChildrenProperty(BindableObject bindable, object oldValue, object newValue)
850         {
851             var view = (View)bindable;
852             if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
853         }
854         internal static object GetInternalFocusableChildrenProperty(BindableObject bindable)
855         {
856             var view = (View)bindable;
857             return view.AreChildrenKeyBoardFocusable();
858         }
859
860         /// <summary>
861         /// FocusableInTouchProperty
862         /// </summary>
863         [EditorBrowsable(EditorBrowsableState.Never)]
864 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
865         public static BindableProperty FocusableInTouchProperty = null;
866 #else
867         public static readonly BindableProperty FocusableInTouchProperty = null;
868 #endif
869         internal static void SetInternalFocusableInTouchProperty(BindableObject bindable, object oldValue, object newValue)
870         {
871             var view = (View)bindable;
872             if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
873         }
874         internal static object GetInternalFocusableInTouchProperty(BindableObject bindable)
875         {
876             var view = (View)bindable;
877             return view.IsFocusableInTouch();
878         }
879
880         /// <summary>
881         /// Size2DProperty
882         /// </summary>
883         [EditorBrowsable(EditorBrowsableState.Never)]
884 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
885         public static BindableProperty Size2DProperty = null;
886 #else
887         public static readonly BindableProperty Size2DProperty = null;
888 #endif
889         internal static void SetInternalSize2DProperty(BindableObject bindable, object oldValue, object newValue)
890         {
891             var view = (View)bindable;
892             if (newValue != null)
893             {
894                 // Size property setter is only used by user.
895                 // Framework code uses SetSize() instead of Size property setter.
896                 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
897                 // SuggestedMinimumWidth/Height is used by Layout calculation.
898                 int width = ((Size2D)newValue).Width;
899                 int height = ((Size2D)newValue).Height;
900                 view.userSizeWidth = (float)width;
901                 view.userSizeHeight = (float)height;
902
903                 bool relayoutRequired = false;
904                 // To avoid duplicated size setup, change internal policy directly.
905                 if (view.widthPolicy != width)
906                 {
907                     view.widthPolicy = width;
908                     relayoutRequired = true;
909                 }
910                 if (view.heightPolicy != height)
911                 {
912                     view.heightPolicy = height;
913                     relayoutRequired = true;
914                 }
915                 if (relayoutRequired)
916                 {
917                     view.layout?.RequestLayout();
918                 }
919
920                 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, ((Size2D)newValue).SwigCPtr);
921             }
922         }
923         internal static object GetInternalSize2DProperty(BindableObject bindable)
924         {
925             var view = (View)bindable;
926             if (view.internalSize2D == null)
927             {
928                 view.internalSize2D = new Size2D(view.OnSize2DChanged, 0, 0);
929             }
930             Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize2D.SwigCPtr);
931
932             return view.internalSize2D;
933         }
934
935         /// <summary>
936         /// OpacityProperty
937         /// </summary>
938         [EditorBrowsable(EditorBrowsableState.Never)]
939 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
940         public static BindableProperty OpacityProperty = null;
941 #else
942         public static readonly BindableProperty OpacityProperty = null;
943 #endif
944         internal static void SetInternalOpacityProperty(BindableObject bindable, object oldValue, object newValue)
945         {
946             var view = (View)bindable;
947
948             view.themeData?.selectorData?.Opacity?.Reset(view);
949
950             if (newValue is Selector<float?> selector)
951             {
952                 if (selector.HasAll()) view.SetOpacity(selector.All);
953                 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
954             }
955             else
956             {
957                 view.SetOpacity((float?)newValue);
958             }
959         }
960         internal static object GetInternalOpacityProperty(BindableObject bindable)
961         {
962             var view = (View)bindable;
963             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.OPACITY);
964         }
965
966         /// <summary>
967         /// Position2DProperty
968         /// </summary>
969         [EditorBrowsable(EditorBrowsableState.Never)]
970 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
971         public static BindableProperty Position2DProperty = null;
972 #else
973         public static readonly BindableProperty Position2DProperty = null;
974 #endif
975         internal static void SetInternalPosition2DProperty(BindableObject bindable, object oldValue, object newValue)
976         {
977             var view = (View)bindable;
978             if (newValue != null)
979             {
980                 Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, ((Position2D)newValue).SwigCPtr);
981             }
982         }
983         internal static object GetInternalPosition2DProperty(BindableObject bindable)
984         {
985             var view = (View)bindable;
986             if (view.internalPosition2D == null)
987             {
988                 view.internalPosition2D = new Position2D(view.OnPosition2DChanged, 0, 0);
989             }
990             Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition2D.SwigCPtr);
991             return view.internalPosition2D;
992         }
993
994         /// <summary>
995         /// PositionUsesPivotPointProperty
996         /// </summary>
997         [EditorBrowsable(EditorBrowsableState.Never)]
998 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
999         public static BindableProperty PositionUsesPivotPointProperty = null;
1000 #else
1001         public static readonly BindableProperty PositionUsesPivotPointProperty = null;
1002 #endif
1003         internal static void SetInternalPositionUsesPivotPointProperty(BindableObject bindable, object oldValue, object newValue)
1004         {
1005             var view = (View)bindable;
1006             if (newValue != null)
1007             {
1008                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint, (bool)newValue);
1009             }
1010         }
1011         internal static object GetInternalPositionUsesPivotPointProperty(BindableObject bindable)
1012         {
1013             var view = (View)bindable;
1014             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint);
1015         }
1016
1017         /// <summary>
1018         /// SiblingOrderProperty
1019         /// </summary>
1020         [EditorBrowsable(EditorBrowsableState.Never)]
1021 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1022         public static BindableProperty SiblingOrderProperty = null;
1023 #else
1024         public static readonly BindableProperty SiblingOrderProperty = null;
1025 #endif
1026         internal static void SetInternalSiblingOrderProperty(BindableObject bindable, object oldValue, object newValue)
1027         {
1028             var view = (View)bindable;
1029             int value;
1030             if (newValue != null)
1031             {
1032                 value = (int)newValue;
1033                 if (value < 0)
1034                 {
1035                     NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
1036                     return;
1037                 }
1038                 var siblings = view.GetParent()?.Children;
1039                 if (siblings != null)
1040                 {
1041                     int currentOrder = siblings.IndexOf(view);
1042                     if (value != currentOrder)
1043                     {
1044                         if (value == 0) { view.LowerToBottom(); }
1045                         else if (value < siblings.Count - 1)
1046                         {
1047                             if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
1048                             else { view.LowerBelow(siblings[value]); }
1049                         }
1050                         else { view.RaiseToTop(); }
1051                     }
1052                 }
1053             }
1054         }
1055         internal static object GetInternalSiblingOrderProperty(BindableObject bindable)
1056         {
1057             var view = (View)bindable;
1058             var parentChildren = view.GetParent()?.Children;
1059             int currentOrder = 0;
1060             if (parentChildren != null)
1061             {
1062                 currentOrder = parentChildren.IndexOf(view);
1063
1064                 if (currentOrder < 0) { return 0; }
1065                 else if (currentOrder < parentChildren.Count) { return currentOrder; }
1066             }
1067
1068             return 0;
1069         }
1070
1071         /// <summary>
1072         /// ParentOriginProperty
1073         /// </summary>
1074         [EditorBrowsable(EditorBrowsableState.Never)]
1075 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1076         public static BindableProperty ParentOriginProperty = null;
1077 #else
1078         public static readonly BindableProperty ParentOriginProperty = null;
1079 #endif
1080         internal static void SetInternalParentOriginProperty(BindableObject bindable, object oldValue, object newValue)
1081         {
1082             var view = (View)bindable;
1083             if (newValue != null)
1084             {
1085                 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, ((Position)newValue).SwigCPtr);
1086             }
1087         }
1088         internal static object GetInternalParentOriginProperty(BindableObject bindable)
1089         {
1090             var view = (View)bindable;
1091             Position temp = new Position(0.0f, 0.0f, 0.0f);
1092             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, temp.SwigCPtr);
1093             return temp;
1094         }
1095
1096
1097         /// <summary>
1098         /// PivotPointProperty
1099         /// </summary>
1100         [EditorBrowsable(EditorBrowsableState.Never)]
1101 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1102         public static BindableProperty PivotPointProperty = null;
1103 #else
1104         public static readonly BindableProperty PivotPointProperty = null;
1105 #endif
1106         internal static void SetInternalPivotPointProperty(BindableObject bindable, object oldValue, object newValue)
1107         {
1108             var view = (View)bindable;
1109             if (newValue != null)
1110             {
1111                 view.SetAnchorPoint((Position)newValue);
1112             }
1113         }
1114         internal static object GetInternalPivotPointProperty(BindableObject bindable)
1115         {
1116             var view = (View)bindable;
1117             if (view.internalPivotPoint == null)
1118             {
1119                 view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
1120             }
1121             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.AnchorPoint, view.internalPivotPoint.SwigCPtr);
1122             return view.internalPivotPoint;
1123         }
1124
1125         /// <summary>
1126         /// SizeWidthProperty
1127         /// </summary>
1128         [EditorBrowsable(EditorBrowsableState.Never)]
1129 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1130         public static BindableProperty SizeWidthProperty = null;
1131 #else
1132         public static readonly BindableProperty SizeWidthProperty = null;
1133 #endif
1134         internal static void SetInternalSizeWidthProperty(BindableObject bindable, object oldValue, object newValue)
1135         {
1136             var view = (View)bindable;
1137             if (newValue != null)
1138             {
1139                 // Size property setter is only used by user.
1140                 // Framework code uses SetSize() instead of Size property setter.
1141                 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1142                 // SuggestedMinimumWidth/Height is used by Layout calculation.
1143                 float width = (float)newValue;
1144                 view.userSizeWidth = width;
1145
1146                 // To avoid duplicated size setup, change internal policy directly.
1147                 int widthPolicy = (int)System.Math.Ceiling(width);
1148                 if (view.widthPolicy != widthPolicy)
1149                 {
1150                     view.widthPolicy = widthPolicy;
1151                     view.layout?.RequestLayout();
1152                 }
1153
1154                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth, width);
1155             }
1156         }
1157         internal static object GetInternalSizeWidthProperty(BindableObject bindable)
1158         {
1159             var view = (View)bindable;
1160             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth);
1161         }
1162
1163         /// <summary>
1164         /// SizeHeightProperty
1165         /// </summary>
1166         [EditorBrowsable(EditorBrowsableState.Never)]
1167 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1168         public static BindableProperty SizeHeightProperty = null;
1169 #else
1170         public static readonly BindableProperty SizeHeightProperty = null;
1171 #endif
1172         internal static void SetInternalSizeHeightProperty(BindableObject bindable, object oldValue, object newValue)
1173         {
1174             var view = (View)bindable;
1175             if (newValue != null)
1176             {
1177                 // Size property setter is only used by user.
1178                 // Framework code uses SetSize() instead of Size property setter.
1179                 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1180                 // SuggestedMinimumWidth/Height is used by Layout calculation.
1181                 float height = (float)newValue;
1182                 view.userSizeHeight = height;
1183
1184                 // To avoid duplicated size setup, change internal policy directly.
1185                 int heightPolicy = (int)System.Math.Ceiling(height);
1186                 if (view.heightPolicy != heightPolicy)
1187                 {
1188                     view.heightPolicy = heightPolicy;
1189                     view.layout?.RequestLayout();
1190                 }
1191
1192                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight, height);
1193             }
1194         }
1195         internal static object GetInternalSizeHeightProperty(BindableObject bindable)
1196         {
1197             var view = (View)bindable;
1198             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight);
1199         }
1200
1201         /// <summary>
1202         /// PositionProperty
1203         /// </summary>
1204         [EditorBrowsable(EditorBrowsableState.Never)]
1205 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1206         public static BindableProperty PositionProperty = null;
1207 #else
1208         public static readonly BindableProperty PositionProperty = null;
1209 #endif
1210         internal static void SetInternalPositionProperty(BindableObject bindable, object oldValue, object newValue)
1211         {
1212             var view = (View)bindable;
1213             if (newValue != null)
1214             {
1215                 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.POSITION, ((Position)newValue).SwigCPtr);
1216             }
1217         }
1218         internal static object GetInternalPositionProperty(BindableObject bindable)
1219         {
1220             var view = (View)bindable;
1221             if (view.internalPosition == null)
1222             {
1223                 view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
1224             }
1225             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition.SwigCPtr);
1226             return view.internalPosition;
1227         }
1228
1229         /// <summary>
1230         /// PositionXProperty
1231         /// </summary>
1232         [EditorBrowsable(EditorBrowsableState.Never)]
1233 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1234         public static BindableProperty PositionXProperty = null;
1235 #else
1236         public static readonly BindableProperty PositionXProperty = null;
1237 #endif
1238         internal static void SetInternalPositionXProperty(BindableObject bindable, object oldValue, object newValue)
1239         {
1240             var view = (View)bindable;
1241             if (newValue != null)
1242             {
1243                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionX, (float)newValue);
1244             }
1245         }
1246         internal static object GetInternalPositionXProperty(BindableObject bindable)
1247         {
1248             var view = (View)bindable;
1249             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionX);
1250         }
1251
1252         /// <summary>
1253         /// PositionYProperty
1254         /// </summary>
1255         [EditorBrowsable(EditorBrowsableState.Never)]
1256 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1257         public static BindableProperty PositionYProperty = null;
1258 #else
1259         public static readonly BindableProperty PositionYProperty = null;
1260 #endif
1261         internal static void SetInternalPositionYProperty(BindableObject bindable, object oldValue, object newValue)
1262         {
1263             var view = (View)bindable;
1264             if (newValue != null)
1265             {
1266                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionY, (float)newValue);
1267             }
1268         }
1269         internal static object GetInternalPositionYProperty(BindableObject bindable)
1270         {
1271             var view = (View)bindable;
1272             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionY);
1273         }
1274
1275         /// <summary>
1276         /// PositionZProperty
1277         /// </summary>
1278         [EditorBrowsable(EditorBrowsableState.Never)]
1279 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1280         public static BindableProperty PositionZProperty = null;
1281 #else
1282         public static readonly BindableProperty PositionZProperty = null;
1283 #endif
1284         internal static void SetInternalPositionZProperty(BindableObject bindable, object oldValue, object newValue)
1285         {
1286             var view = (View)bindable;
1287             if (newValue != null)
1288             {
1289                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionZ, (float)newValue);
1290             }
1291
1292         }
1293         internal static object GetInternalPositionZProperty(BindableObject bindable)
1294         {
1295             var view = (View)bindable;
1296             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionZ);
1297         }
1298
1299         /// <summary>
1300         /// OrientationProperty
1301         /// </summary>
1302         [EditorBrowsable(EditorBrowsableState.Never)]
1303 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1304         public static BindableProperty OrientationProperty = null;
1305 #else
1306         public static readonly BindableProperty OrientationProperty = null;
1307 #endif
1308         internal static void SetInternalOrientationProperty(BindableObject bindable, object oldValue, object newValue)
1309         {
1310             var view = (View)bindable;
1311             if (newValue != null)
1312             {
1313                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1314             }
1315         }
1316         internal static object GetInternalOrientationProperty(BindableObject bindable)
1317         {
1318             var view = (View)bindable;
1319             Rotation temp = new Rotation();
1320             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1321             return temp;
1322         }
1323
1324         /// <summary>
1325         /// ScaleProperty
1326         /// </summary>
1327         [EditorBrowsable(EditorBrowsableState.Never)]
1328 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1329         public static BindableProperty ScaleProperty = null;
1330 #else
1331         public static readonly BindableProperty ScaleProperty = null;
1332 #endif
1333         internal static void SetInternalScaleProperty(BindableObject bindable, object oldValue, object newValue)
1334         {
1335             var view = (View)bindable;
1336             if (newValue != null)
1337             {
1338                 view.SetScale((Vector3)newValue);
1339             }
1340
1341         }
1342         internal static object GetInternalScaleProperty(BindableObject bindable)
1343         {
1344             var view = (View)bindable;
1345             if (view.internalScale == null)
1346             {
1347                 view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1348             }
1349             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SCALE, view.internalScale.SwigCPtr);
1350             return view.internalScale;
1351         }
1352
1353         /// <summary>
1354         /// ScaleXProperty
1355         /// </summary>
1356         [EditorBrowsable(EditorBrowsableState.Never)]
1357 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1358         public static BindableProperty ScaleXProperty = null;
1359 #else
1360         public static readonly BindableProperty ScaleXProperty = null;
1361 #endif
1362         internal static void SetInternalScaleXProperty(BindableObject bindable, object oldValue, object newValue)
1363         {
1364             var view = (View)bindable;
1365             if (newValue != null)
1366             {
1367                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleX, (float)newValue);
1368             }
1369         }
1370         internal static object GetInternalScaleXProperty(BindableObject bindable)
1371         {
1372             var view = (View)bindable;
1373             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleX);
1374         }
1375
1376         /// <summary>
1377         /// ScaleYProperty
1378         /// </summary>
1379         [EditorBrowsable(EditorBrowsableState.Never)]
1380 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1381         public static BindableProperty ScaleYProperty = null;
1382 #else
1383         public static readonly BindableProperty ScaleYProperty = null;
1384 #endif
1385         internal static void SetInternalScaleYProperty(BindableObject bindable, object oldValue, object newValue)
1386         {
1387             var view = (View)bindable;
1388             if (newValue != null)
1389             {
1390                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleY, (float)newValue);
1391             }
1392         }
1393         internal static object GetInternalScaleYProperty(BindableObject bindable)
1394         {
1395             var view = (View)bindable;
1396             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleY);
1397         }
1398
1399         /// <summary>
1400         /// ScaleZProperty
1401         /// </summary>
1402         [EditorBrowsable(EditorBrowsableState.Never)]
1403 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1404         public static BindableProperty ScaleZProperty = null;
1405 #else
1406         public static readonly BindableProperty ScaleZProperty = null;
1407 #endif
1408         internal static void SetInternalScaleZProperty(BindableObject bindable, object oldValue, object newValue)
1409         {
1410             var view = (View)bindable;
1411             if (newValue != null)
1412             {
1413                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ, (float)newValue);
1414             }
1415         }
1416         internal static object GetInternalScaleZProperty(BindableObject bindable)
1417         {
1418             var view = (View)bindable;
1419             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ);
1420         }
1421
1422         /// <summary>
1423         /// NameProperty
1424         /// </summary>
1425         [EditorBrowsable(EditorBrowsableState.Never)]
1426 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1427         public static BindableProperty NameProperty = null;
1428 #else
1429         public static readonly BindableProperty NameProperty = null;
1430 #endif
1431         internal static void SetInternalNameProperty(BindableObject bindable, object oldValue, object newValue)
1432         {
1433             var view = (View)bindable;
1434             if (newValue != null)
1435             {
1436                 view.internalName = (string)newValue;
1437                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.NAME, (string)newValue);
1438             }
1439         }
1440         internal static object GetInternalNameProperty(BindableObject bindable)
1441         {
1442             var view = (View)bindable;
1443             return view.internalName;
1444         }
1445
1446         /// <summary>
1447         /// SensitiveProperty
1448         /// </summary>
1449         [EditorBrowsable(EditorBrowsableState.Never)]
1450 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1451         public static BindableProperty SensitiveProperty = null;
1452 #else
1453         public static readonly BindableProperty SensitiveProperty = null;
1454 #endif
1455         internal static void SetInternalSensitiveProperty(BindableObject bindable, object oldValue, object newValue)
1456         {
1457             var view = (View)bindable;
1458             if (newValue != null)
1459             {
1460                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE, (bool)newValue);
1461             }
1462         }
1463         internal static object GetInternalSensitiveProperty(BindableObject bindable)
1464         {
1465             var view = (View)bindable;
1466             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE);
1467         }
1468
1469         /// <summary>
1470         /// IsEnabledProperty
1471         /// </summary>
1472         [EditorBrowsable(EditorBrowsableState.Never)]
1473 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1474         public static BindableProperty IsEnabledProperty = null;
1475 #else
1476         public static readonly BindableProperty IsEnabledProperty = null;
1477 #endif
1478         internal static void SetInternalIsEnabledProperty(BindableObject bindable, object oldValue, object newValue)
1479         {
1480             var view = (View)bindable;
1481             if (newValue != null)
1482             {
1483                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled, (bool)newValue);
1484                 view.OnEnabled((bool)newValue);
1485             }
1486         }
1487         internal static object GetInternalIsEnabledProperty(BindableObject bindable)
1488         {
1489             var view = (View)bindable;
1490             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled);
1491         }
1492
1493         /// <summary>
1494         /// DispatchKeyEventsProperty
1495         /// </summary>
1496         [EditorBrowsable(EditorBrowsableState.Never)]
1497 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1498         public static BindableProperty DispatchKeyEventsProperty = null;
1499 #else
1500         public static readonly BindableProperty DispatchKeyEventsProperty = null;
1501 #endif
1502         internal static void SetInternalDispatchKeyEventsProperty(BindableObject bindable, object oldValue, object newValue)
1503         {
1504             var view = (View)bindable;
1505             if (newValue != null)
1506             {
1507                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents, (bool)newValue);
1508             }
1509         }
1510         internal static object GetInternalDispatchKeyEventsProperty(BindableObject bindable)
1511         {
1512             var view = (View)bindable;
1513             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents);
1514         }
1515
1516         /// <summary>
1517         /// LeaveRequiredProperty
1518         /// </summary>
1519         [EditorBrowsable(EditorBrowsableState.Never)]
1520 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1521         public static BindableProperty LeaveRequiredProperty = null;
1522 #else
1523         public static readonly BindableProperty LeaveRequiredProperty = null;
1524 #endif
1525         internal static void SetInternalLeaveRequiredProperty(BindableObject bindable, object oldValue, object newValue)
1526         {
1527             var view = (View)bindable;
1528             if (newValue != null)
1529             {
1530                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired, (bool)newValue);
1531             }
1532         }
1533         internal static object GetInternalLeaveRequiredProperty(BindableObject bindable)
1534         {
1535             var view = (View)bindable;
1536             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired);
1537         }
1538
1539         /// <summary>
1540         /// InheritOrientationProperty
1541         /// </summary>
1542         [EditorBrowsable(EditorBrowsableState.Never)]
1543 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1544         public static BindableProperty InheritOrientationProperty = null;
1545 #else
1546         public static readonly BindableProperty InheritOrientationProperty = null;
1547 #endif
1548         internal static void SetInternalInheritOrientationProperty(BindableObject bindable, object oldValue, object newValue)
1549         {
1550             var view = (View)bindable;
1551             if (newValue != null)
1552             {
1553                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation, (bool)newValue);
1554             }
1555         }
1556         internal static object GetInternalInheritOrientationProperty(BindableObject bindable)
1557         {
1558             var view = (View)bindable;
1559             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation);
1560         }
1561
1562         /// <summary>
1563         /// InheritScaleProperty
1564         /// </summary>
1565         [EditorBrowsable(EditorBrowsableState.Never)]
1566 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1567         public static BindableProperty InheritScaleProperty = null;
1568 #else
1569         public static readonly BindableProperty InheritScaleProperty = null;
1570 #endif
1571         internal static void SetInternalInheritScaleProperty(BindableObject bindable, object oldValue, object newValue)
1572         {
1573             var view = (View)bindable;
1574             if (newValue != null)
1575             {
1576                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritScale, (bool)newValue);
1577             }
1578         }
1579         internal static object GetInternalInheritScaleProperty(BindableObject bindable)
1580         {
1581             var view = (View)bindable;
1582             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritScale);
1583         }
1584
1585         /// <summary>
1586         /// DrawModeProperty
1587         /// </summary>
1588         [EditorBrowsable(EditorBrowsableState.Never)]
1589 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1590         public static BindableProperty DrawModeProperty = null;
1591 #else
1592         public static readonly BindableProperty DrawModeProperty = null;
1593 #endif
1594         internal static void SetInternalDrawModeProperty(BindableObject bindable, object oldValue, object newValue)
1595         {
1596             var view = (View)bindable;
1597             if (newValue != null)
1598             {
1599                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.DrawMode, (int)newValue);
1600             }
1601         }
1602         internal static object GetInternalDrawModeProperty(BindableObject bindable)
1603         {
1604             var view = (View)bindable;
1605             return (DrawModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.DrawMode);
1606         }
1607
1608         /// <summary>
1609         /// SizeModeFactorProperty
1610         /// </summary>
1611         [EditorBrowsable(EditorBrowsableState.Never)]
1612 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1613         public static BindableProperty SizeModeFactorProperty = null;
1614 #else
1615         public static readonly BindableProperty SizeModeFactorProperty = null;
1616 #endif
1617         internal static void SetInternalSizeModeFactorProperty(BindableObject bindable, object oldValue, object newValue)
1618         {
1619             var view = (View)bindable;
1620             if (newValue != null)
1621             {
1622                 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, ((Vector3)newValue).SwigCPtr);
1623             }
1624
1625         }
1626         internal static object GetInternalSizeModeFactorProperty(BindableObject bindable)
1627         {
1628             var view = (View)bindable;
1629             if (view.internalSizeModeFactor == null)
1630             {
1631                 view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1632             }
1633             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, view.internalSizeModeFactor.SwigCPtr);
1634             return view.internalSizeModeFactor;
1635         }
1636
1637         /// <summary>
1638         /// WidthResizePolicyProperty
1639         /// </summary>
1640         [EditorBrowsable(EditorBrowsableState.Never)]
1641 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1642         public static BindableProperty WidthResizePolicyProperty = null;
1643 #else
1644         public static readonly BindableProperty WidthResizePolicyProperty = null;
1645 #endif
1646         internal static void SetInternalWidthResizePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1647         {
1648             var view = (View)bindable;
1649             if (newValue != null)
1650             {
1651                 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1652                 {
1653                     if (view.widthConstraint == null)
1654                     {
1655                         view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1656                         view.widthConstraint.Apply();
1657                     }
1658                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)ResizePolicyType.FillToParent);
1659                 }
1660                 else
1661                 {
1662                     view.widthConstraint?.Remove();
1663                     view.widthConstraint?.Dispose();
1664                     view.widthConstraint = null;
1665
1666                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)newValue);
1667                 }
1668                 // Match ResizePolicy to new Layouting.
1669                 // Parent relative policies can not be mapped at this point as parent size unknown.
1670                 switch ((ResizePolicyType)newValue)
1671                 {
1672                     case ResizePolicyType.UseNaturalSize:
1673                         {
1674                             view.WidthSpecification = LayoutParamPolicies.WrapContent;
1675                             break;
1676                         }
1677                     case ResizePolicyType.FillToParent:
1678                         {
1679                             view.WidthSpecification = LayoutParamPolicies.MatchParent;
1680                             break;
1681                         }
1682                     case ResizePolicyType.FitToChildren:
1683                         {
1684                             view.WidthSpecification = LayoutParamPolicies.WrapContent;
1685                             break;
1686                         }
1687                     default:
1688                         break;
1689                 }
1690             }
1691         }
1692         internal static object GetInternalWidthResizePolicyProperty(BindableObject bindable)
1693         {
1694             var view = (View)bindable;
1695             string temp;
1696
1697             temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.WidthResizePolicy);
1698             return temp.GetValueByDescription<ResizePolicyType>();
1699         }
1700
1701         /// <summary>
1702         /// HeightResizePolicyProperty
1703         /// </summary>
1704         [EditorBrowsable(EditorBrowsableState.Never)]
1705 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1706         public static BindableProperty HeightResizePolicyProperty = null;
1707 #else
1708         public static readonly BindableProperty HeightResizePolicyProperty = null;
1709 #endif
1710         internal static void SetInternalHeightResizePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1711         {
1712             var view = (View)bindable;
1713             if (newValue != null)
1714             {
1715                 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1716                 {
1717                     if (view.heightConstraint == null)
1718                     {
1719                         view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1720                         view.heightConstraint.Apply();
1721                     }
1722
1723                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)ResizePolicyType.FillToParent);
1724                 }
1725                 else
1726                 {
1727                     view.heightConstraint?.Remove();
1728                     view.heightConstraint?.Dispose();
1729                     view.heightConstraint = null;
1730
1731                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)newValue);
1732                 }
1733                 // Match ResizePolicy to new Layouting.
1734                 // Parent relative policies can not be mapped at this point as parent size unknown.
1735                 switch ((ResizePolicyType)newValue)
1736                 {
1737                     case ResizePolicyType.UseNaturalSize:
1738                         {
1739                             view.HeightSpecification = LayoutParamPolicies.WrapContent;
1740                             break;
1741                         }
1742                     case ResizePolicyType.FillToParent:
1743                         {
1744                             view.HeightSpecification = LayoutParamPolicies.MatchParent;
1745                             break;
1746                         }
1747                     case ResizePolicyType.FitToChildren:
1748                         {
1749                             view.HeightSpecification = LayoutParamPolicies.WrapContent;
1750                             break;
1751                         }
1752                     default:
1753                         break;
1754                 }
1755             }
1756         }
1757         internal static object GetInternalHeightResizePolicyProperty(BindableObject bindable)
1758         {
1759             var view = (View)bindable;
1760             string temp;
1761
1762             temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.HeightResizePolicy);
1763             return temp.GetValueByDescription<ResizePolicyType>();
1764         }
1765
1766         /// <summary>
1767         /// SizeScalePolicyProperty
1768         /// </summary>
1769         [EditorBrowsable(EditorBrowsableState.Never)]
1770 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1771         public static BindableProperty SizeScalePolicyProperty = null;
1772 #else
1773         public static readonly BindableProperty SizeScalePolicyProperty = null;
1774 #endif
1775         internal static void SetInternalSizeScalePolicyProperty(BindableObject bindable, object oldValue, object newValue)
1776         {
1777             var view = (View)bindable;
1778             string valueToString = "";
1779             if (newValue != null)
1780             {
1781                 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1782
1783                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SizeScalePolicy, valueToString);
1784             }
1785         }
1786         internal static object GetInternalSizeScalePolicyProperty(BindableObject bindable)
1787         {
1788             var view = (View)bindable;
1789
1790             return (SizeScalePolicyType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.SizeScalePolicy);
1791         }
1792
1793         /// <summary>
1794         /// WidthForHeightProperty
1795         /// </summary>
1796         [EditorBrowsable(EditorBrowsableState.Never)]
1797 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1798         public static BindableProperty WidthForHeightProperty = null;
1799 #else
1800         public static readonly BindableProperty WidthForHeightProperty = null;
1801 #endif
1802         internal static void SetInternalWidthForHeightProperty(BindableObject bindable, object oldValue, object newValue)
1803         {
1804             var view = (View)bindable;
1805             if (newValue != null)
1806             {
1807                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight, (bool)newValue);
1808             }
1809         }
1810         internal static object GetInternalWidthForHeightProperty(BindableObject bindable)
1811         {
1812             var view = (View)bindable;
1813
1814             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight);
1815         }
1816
1817         /// <summary>
1818         /// HeightForWidthProperty
1819         /// </summary>
1820         [EditorBrowsable(EditorBrowsableState.Never)]
1821 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1822         public static BindableProperty HeightForWidthProperty = null;
1823 #else
1824         public static readonly BindableProperty HeightForWidthProperty = null;
1825 #endif
1826         internal static void SetInternalHeightForWidthProperty(BindableObject bindable, object oldValue, object newValue)
1827         {
1828             var view = (View)bindable;
1829             if (newValue != null)
1830             {
1831
1832                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth, (bool)newValue);
1833             }
1834         }
1835         internal static object GetInternalHeightForWidthProperty(BindableObject bindable)
1836         {
1837             var view = (View)bindable;
1838
1839             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth);
1840         }
1841
1842         /// <summary>
1843         /// PaddingProperty
1844         /// </summary>
1845         [EditorBrowsable(EditorBrowsableState.Never)]
1846 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1847         public static BindableProperty PaddingProperty = null;
1848 #else
1849         public static readonly BindableProperty PaddingProperty = null;
1850 #endif
1851         internal static void SetInternalPaddingProperty(BindableObject bindable, object oldValue, object newValue)
1852         {
1853             var view = (View)bindable;
1854             if (newValue != null)
1855             {
1856                 if (view.Layout != null)
1857                 {
1858                     view.Layout.Padding = new Extents((Extents)newValue);
1859                     if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1860                     {
1861                         var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1862                         Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1863                         tmp?.Dispose();
1864                     }
1865                     view.Layout.RequestLayout();
1866                 }
1867                 else
1868                 {
1869                     var tmp = new PropertyValue((Extents)newValue);
1870                     Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1871                     tmp?.Dispose();
1872                 }
1873             }
1874         }
1875         internal static object GetInternalPaddingProperty(BindableObject bindable)
1876         {
1877             var view = (View)bindable;
1878             if ((view.internalPadding == null) || (view.Layout != null))
1879             {
1880                 ushort start = 0, end = 0, top = 0, bottom = 0;
1881                 if (view.Layout != null)
1882                 {
1883                     if (view.Layout.Padding != null)
1884                     {
1885                         start = view.Layout.Padding.Start;
1886                         end = view.Layout.Padding.End;
1887                         top = view.Layout.Padding.Top;
1888                         bottom = view.Layout.Padding.Bottom;
1889                     }
1890                 }
1891                 view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1892             }
1893
1894             if (view.Layout == null)
1895             {
1896                 var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1897                 tmp?.Get(view.internalPadding);
1898                 tmp?.Dispose();
1899             }
1900
1901             return view.internalPadding;
1902         }
1903
1904         /// <summary>
1905         /// SizeProperty
1906         /// </summary>
1907         [EditorBrowsable(EditorBrowsableState.Never)]
1908 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1909         public static BindableProperty SizeProperty = null;
1910 #else
1911         public static readonly BindableProperty SizeProperty = null;
1912 #endif
1913         internal static void SetInternalSizeProperty(BindableObject bindable, object oldValue, object newValue)
1914         {
1915             var view = (View)bindable;
1916             if (newValue != null)
1917             {
1918                 // Size property setter is only used by user.
1919                 // Framework code uses SetSize() instead of Size property setter.
1920                 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1921                 // SuggestedMinimumWidth/Height is used by Layout calculation.
1922                 float width = ((Size)newValue).Width;
1923                 float height = ((Size)newValue).Height;
1924                 float depth = ((Size)newValue).Depth;
1925
1926                 view.userSizeWidth = width;
1927                 view.userSizeHeight = height;
1928
1929                 // Set Specification so when layouts measure this View it matches the value set here.
1930                 // All Views are currently Layouts.
1931                 int widthPolicy = (int)System.Math.Ceiling(width);
1932                 int heightPolicy = (int)System.Math.Ceiling(height);
1933
1934                 bool relayoutRequired = false;
1935                 // To avoid duplicated size setup, change internal policy directly.
1936                 if (view.widthPolicy != widthPolicy)
1937                 {
1938                     view.widthPolicy = widthPolicy;
1939                     relayoutRequired = true;
1940                 }
1941                 if (view.heightPolicy != heightPolicy)
1942                 {
1943                     view.heightPolicy = heightPolicy;
1944                     relayoutRequired = true;
1945                 }
1946                 if (relayoutRequired)
1947                 {
1948                     view.layout?.RequestLayout();
1949                 }
1950
1951                 view.SetSize(width, height, depth);
1952             }
1953         }
1954         internal static object GetInternalSizeProperty(BindableObject bindable)
1955         {
1956             var view = (View)bindable;
1957
1958             if (view.internalSize == null)
1959             {
1960                 view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1961             }
1962             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr);
1963
1964             return view.internalSize;
1965         }
1966
1967         /// <summary>
1968         /// MinimumSizeProperty
1969         /// </summary>
1970         [EditorBrowsable(EditorBrowsableState.Never)]
1971 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
1972         public static BindableProperty MinimumSizeProperty = null;
1973 #else
1974         public static readonly BindableProperty MinimumSizeProperty = null;
1975 #endif
1976         internal static void SetInternalMinimumSizeProperty(BindableObject bindable, object oldValue, object newValue)
1977         {
1978             var view = (View)bindable;
1979             if (newValue != null)
1980             {
1981
1982                 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, ((Size2D)newValue).SwigCPtr);
1983             }
1984         }
1985         internal static object GetInternalMinimumSizeProperty(BindableObject bindable)
1986         {
1987
1988             var view = (View)bindable;
1989             if (view.internalMinimumSize == null)
1990             {
1991                 view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1992             }
1993             Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, view.internalMinimumSize.SwigCPtr);
1994             return view.internalMinimumSize;
1995         }
1996
1997         /// <summary>
1998         /// MaximumSizeProperty
1999         /// </summary>
2000         [EditorBrowsable(EditorBrowsableState.Never)]
2001 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2002         public static BindableProperty MaximumSizeProperty = null;
2003 #else
2004         public static readonly BindableProperty MaximumSizeProperty = null;
2005 #endif
2006         internal static void SetInternalMaximumSizeProperty(BindableObject bindable, object oldValue, object newValue)
2007         {
2008             var view = (View)bindable;
2009             if (newValue != null)
2010             {
2011
2012                 Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, ((Size2D)newValue).SwigCPtr);
2013             }
2014         }
2015         internal static object GetInternalMaximumSizeProperty(BindableObject bindable)
2016         {
2017             var view = (View)bindable;
2018
2019             if (view.internalMaximumSize == null)
2020             {
2021                 view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
2022             }
2023             Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, view.internalMaximumSize.SwigCPtr);
2024             return view.internalMaximumSize;
2025         }
2026
2027         /// <summary>
2028         /// InheritPositionProperty
2029         /// </summary>
2030         [EditorBrowsable(EditorBrowsableState.Never)]
2031 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2032         public static BindableProperty InheritPositionProperty = null;
2033 #else
2034         public static readonly BindableProperty InheritPositionProperty = null;
2035 #endif
2036         internal static void SetInternalInheritPositionProperty(BindableObject bindable, object oldValue, object newValue)
2037         {
2038             var view = (View)bindable;
2039             if (newValue != null)
2040             {
2041                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritPosition, (bool)newValue);
2042             }
2043         }
2044         internal static object GetInternalInheritPositionProperty(BindableObject bindable)
2045         {
2046             var view = (View)bindable;
2047
2048             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritPosition);
2049         }
2050
2051         /// <summary>
2052         /// ClippingModeProperty
2053         /// </summary>
2054         [EditorBrowsable(EditorBrowsableState.Never)]
2055 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2056         public static BindableProperty ClippingModeProperty = null;
2057 #else
2058         public static readonly BindableProperty ClippingModeProperty = null;
2059 #endif
2060         internal static void SetInternalClippingModeProperty(BindableObject bindable, object oldValue, object newValue)
2061         {
2062             var view = (View)bindable;
2063             if (newValue != null)
2064             {
2065
2066                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.ClippingMode, (int)newValue);
2067             }
2068         }
2069         internal static object GetInternalClippingModeProperty(BindableObject bindable)
2070         {
2071             var view = (View)bindable;
2072
2073             return (ClippingModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.ClippingMode);
2074         }
2075
2076         /// <summary>
2077         /// InheritLayoutDirectionProperty
2078         /// </summary>
2079         [EditorBrowsable(EditorBrowsableState.Never)]
2080 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2081         public static BindableProperty InheritLayoutDirectionProperty = null;
2082 #else
2083         public static readonly BindableProperty InheritLayoutDirectionProperty = null;
2084 #endif
2085         internal static void SetInternalInheritLayoutDirectionProperty(BindableObject bindable, object oldValue, object newValue)
2086         {
2087             var view = (View)bindable;
2088             if (newValue != null)
2089             {
2090
2091                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection, (bool)newValue);
2092             }
2093         }
2094         internal static object GetInternalInheritLayoutDirectionProperty(BindableObject bindable)
2095         {
2096             var view = (View)bindable;
2097
2098             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection);
2099         }
2100
2101         /// <summary>
2102         /// LayoutDirectionProperty
2103         /// </summary>
2104         [EditorBrowsable(EditorBrowsableState.Never)]
2105 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2106         public static BindableProperty LayoutDirectionProperty = null;
2107 #else
2108         public static readonly BindableProperty LayoutDirectionProperty = null;
2109 #endif
2110         internal static void SetInternalLayoutDirectionProperty(BindableObject bindable, object oldValue, object newValue)
2111         {
2112             var view = (View)bindable;
2113             if (newValue != null)
2114             {
2115
2116                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection, (int)newValue);
2117             }
2118         }
2119         internal static object GetInternalLayoutDirectionProperty(BindableObject bindable)
2120         {
2121             var view = (View)bindable;
2122
2123             return (ViewLayoutDirectionType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection);
2124         }
2125
2126         /// <summary>
2127         /// MarginProperty
2128         /// </summary>
2129         [EditorBrowsable(EditorBrowsableState.Never)]
2130 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2131         public static BindableProperty MarginProperty = null;
2132 #else
2133         public static readonly BindableProperty MarginProperty = null;
2134 #endif
2135         internal static void SetInternalMarginProperty(BindableObject bindable, object oldValue, object newValue)
2136         {
2137             var view = (View)bindable;
2138             if (newValue != null)
2139             {
2140                 if (view.Layout != null)
2141                 {
2142                     view.Layout.Margin = new Extents((Extents)newValue);
2143                     if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
2144                     {
2145                         var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
2146                         Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
2147                         tmp?.Dispose();
2148                     }
2149                     view.Layout.RequestLayout();
2150                 }
2151                 else
2152                 {
2153                     var tmp = new PropertyValue((Extents)newValue);
2154                     Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
2155                     tmp?.Dispose();
2156                 }
2157             }
2158         }
2159         internal static object GetInternalMarginProperty(BindableObject bindable)
2160         {
2161             var view = (View)bindable;
2162             if ((view.internalMargin == null) || (view.Layout != null))
2163             {
2164                 ushort start = 0, end = 0, top = 0, bottom = 0;
2165                 if (view.Layout != null)
2166                 {
2167                     if (view.Layout.Margin != null)
2168                     {
2169                         start = view.Layout.Margin.Start;
2170                         end = view.Layout.Margin.End;
2171                         top = view.Layout.Margin.Top;
2172                         bottom = view.Layout.Margin.Bottom;
2173                     }
2174                 }
2175                 view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
2176             }
2177
2178             if (view.Layout == null)
2179             {
2180
2181                 var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
2182                 tmp?.Get(view.internalMargin);
2183                 tmp?.Dispose();
2184             }
2185
2186             return view.internalMargin;
2187         }
2188
2189         /// <summary>
2190         /// UpdateAreaHintProperty
2191         /// </summary>
2192         [EditorBrowsable(EditorBrowsableState.Never)]
2193 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2194         public static BindableProperty UpdateAreaHintProperty = null;
2195 #else
2196         public static readonly BindableProperty UpdateAreaHintProperty = null;
2197 #endif
2198         internal static void SetInternalUpdateAreaHintProperty(BindableObject bindable, object oldValue, object newValue)
2199         {
2200             var view = (View)bindable;
2201             if (newValue != null)
2202             {
2203
2204                 Object.InternalSetPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), ((Vector4)newValue).SwigCPtr);
2205             }
2206         }
2207         internal static object GetInternalUpdateAreaHintProperty(BindableObject bindable)
2208         {
2209             var view = (View)bindable;
2210             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2211
2212             Object.InternalRetrievingPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), temp.SwigCPtr);
2213             return temp;
2214         }
2215
2216         /// <summary>
2217         /// ImageShadow Property
2218         /// </summary>
2219         [EditorBrowsable(EditorBrowsableState.Never)]
2220 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2221         public static BindableProperty ImageShadowProperty = null;
2222 #else
2223         public static readonly BindableProperty ImageShadowProperty = null;
2224 #endif
2225         internal static void SetInternalImageShadowProperty(BindableObject bindable, object oldValue, object newValue)
2226         {
2227             var view = (View)bindable;
2228
2229             view.themeData?.selectorData?.ClearShadow(view);
2230
2231             if (newValue is Selector<ImageShadow> selector)
2232             {
2233                 if (selector.HasAll()) view.SetShadow(selector.All);
2234                 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
2235             }
2236             else
2237             {
2238                 view.SetShadow((ImageShadow)newValue);
2239             }
2240         }
2241         internal static object GetInternalImageShadowProperty(BindableObject bindable)
2242         {
2243             var view = (View)bindable;
2244
2245             // Sync as current properties
2246             view.UpdateBackgroundExtraData();
2247
2248             PropertyMap map = new PropertyMap();
2249             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
2250
2251             var shadow = new ImageShadow(map);
2252             return shadow.IsEmpty() ? null : shadow;
2253         }
2254
2255         /// <summary>
2256         /// Shadow Property
2257         /// </summary>
2258         [EditorBrowsable(EditorBrowsableState.Never)]
2259 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2260         public static BindableProperty BoxShadowProperty = null;
2261 #else
2262         public static readonly BindableProperty BoxShadowProperty = null;
2263 #endif
2264         internal static void SetInternalBoxShadowProperty(BindableObject bindable, object oldValue, object newValue)
2265         {
2266             var view = (View)bindable;
2267
2268             view.themeData?.selectorData?.ClearShadow(view);
2269
2270             if (newValue is Selector<Shadow> selector)
2271             {
2272                 if (selector.HasAll()) view.SetShadow(selector.All);
2273                 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
2274             }
2275             else
2276             {
2277                 view.SetShadow((Shadow)newValue);
2278             }
2279         }
2280         internal static object GetInternalBoxShadowProperty(BindableObject bindable)
2281         {
2282             var view = (View)bindable;
2283
2284             // Sync as current properties
2285             view.UpdateBackgroundExtraData();
2286
2287             PropertyMap map = new PropertyMap();
2288             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
2289
2290             var shadow = new Shadow(map);
2291             return shadow.IsEmpty() ? null : shadow;
2292         }
2293
2294         /// <summary>
2295         /// CornerRadius Property
2296         /// </summary>
2297         [EditorBrowsable(EditorBrowsableState.Never)]
2298 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2299         public static BindableProperty CornerRadiusProperty = null;
2300 #else
2301         public static readonly BindableProperty CornerRadiusProperty = null;
2302 #endif
2303         internal static void SetInternalCornerRadiusProperty(BindableObject bindable, object oldValue, object newValue)
2304         {
2305             var view = (View)bindable;
2306             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
2307             view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
2308         }
2309         internal static object GetInternalCornerRadiusProperty(BindableObject bindable)
2310         {
2311             var view = (View)bindable;
2312             return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
2313         }
2314
2315         /// <summary>
2316         /// CornerRadiusPolicy Property
2317         /// </summary>
2318         [EditorBrowsable(EditorBrowsableState.Never)]
2319 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2320         public static BindableProperty CornerRadiusPolicyProperty = null;
2321 #else
2322         public static readonly BindableProperty CornerRadiusPolicyProperty = null;
2323 #endif
2324         internal static void SetInternalCornerRadiusPolicyProperty(BindableObject bindable, object oldValue, object newValue)
2325         {
2326             var view = (View)bindable;
2327             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
2328
2329             if (view.backgroundExtraData.CornerRadius != null)
2330             {
2331                 view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.CornerRadius);
2332             }
2333         }
2334         internal static object GetInternalCornerRadiusPolicyProperty(BindableObject bindable)
2335         {
2336             var view = (View)bindable;
2337             return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
2338         }
2339
2340         /// <summary>
2341         /// BorderlineWidth Property
2342         /// </summary>
2343         [EditorBrowsable(EditorBrowsableState.Never)]
2344 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2345         public static BindableProperty BorderlineWidthProperty = null;
2346 #else
2347         public static readonly BindableProperty BorderlineWidthProperty = null;
2348 #endif
2349         internal static void SetInternalBorderlineWidthProperty(BindableObject bindable, object oldValue, object newValue)
2350         {
2351             var view = (View)bindable;
2352             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
2353             view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2354         }
2355         internal static object GetInternalBorderlineWidthProperty(BindableObject bindable)
2356         {
2357             var view = (View)bindable;
2358             return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
2359         }
2360
2361         /// <summary>
2362         /// BorderlineColor Property
2363         /// </summary>
2364         [EditorBrowsable(EditorBrowsableState.Never)]
2365 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2366         public static BindableProperty BorderlineColorProperty = null;
2367 #else
2368         public static readonly BindableProperty BorderlineColorProperty = null;
2369 #endif
2370         internal static void SetInternalBorderlineColorProperty(BindableObject bindable, object oldValue, object newValue)
2371         {
2372             var view = (View)bindable;
2373
2374             view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2375
2376             if (newValue is Selector<Color> selector)
2377             {
2378                 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2379                 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2380             }
2381             else
2382             {
2383                 view.SetBorderlineColor((Color)newValue);
2384             }
2385         }
2386         internal static object GetInternalBorderlineColorProperty(BindableObject bindable)
2387         {
2388             var view = (View)bindable;
2389             return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
2390         }
2391
2392         /// <summary>
2393         /// BorderlineColorSelector Property
2394         /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
2395         /// So this API is internally used only.
2396         /// </summary>
2397         [EditorBrowsable(EditorBrowsableState.Never)]
2398 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2399         public static BindableProperty BorderlineColorSelectorProperty = null;
2400 #else
2401         public static readonly BindableProperty BorderlineColorSelectorProperty = null;
2402 #endif
2403         internal static void SetInternalBorderlineColorSelectorProperty(BindableObject bindable, object oldValue, object newValue)
2404         {
2405             var view = (View)bindable;
2406
2407             view.themeData?.selectorData?.BorderlineColor?.Reset(view);
2408
2409             if (newValue is Selector<Color> selector)
2410             {
2411                 if (selector.HasAll()) view.SetBorderlineColor(selector.All);
2412                 else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
2413             }
2414             else
2415             {
2416                 view.SetBorderlineColor((Color)newValue);
2417             }
2418         }
2419         internal static object GetInternalBorderlineColorSelectorProperty(BindableObject bindable)
2420         {
2421             var view = (View)bindable;
2422             var selector = view.themeData?.selectorData?.BorderlineColor?.Get();
2423             return (null != selector) ? selector : new Selector<Color>();
2424         }
2425
2426         /// <summary>
2427         /// BorderlineOffset Property
2428         /// </summary>
2429         [EditorBrowsable(EditorBrowsableState.Never)]
2430 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2431         public static BindableProperty BorderlineOffsetProperty = null;
2432 #else
2433         public static readonly BindableProperty BorderlineOffsetProperty = null;
2434 #endif
2435         internal static void SetInternalBorderlineOffsetProperty(BindableObject bindable, object oldValue, object newValue)
2436         {
2437             var view = (View)bindable;
2438             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
2439             view.UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
2440         }
2441         internal static object GetInternalBorderlineOffsetProperty(BindableObject bindable)
2442         {
2443             var view = (View)bindable;
2444             return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
2445         }
2446
2447         /// <summary>
2448         /// EnableControlState property
2449         /// </summary>
2450         [EditorBrowsable(EditorBrowsableState.Never)]
2451 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2452         public static BindableProperty EnableControlStateProperty = null;
2453 #else
2454         public static readonly BindableProperty EnableControlStateProperty = null;
2455 #endif
2456         internal static void SetInternalEnableControlStateProperty(BindableObject bindable, object oldValue, object newValue)
2457         {
2458             var view = (View)bindable;
2459             bool prev = view.enableControlState;
2460             view.enableControlState = (bool)newValue;
2461
2462             if (prev != view.enableControlState)
2463             {
2464                 if (prev)
2465                 {
2466                     view.TouchEvent -= view.EmptyOnTouch;
2467                 }
2468                 else
2469                 {
2470                     view.TouchEvent += view.EmptyOnTouch;
2471                 }
2472             }
2473         }
2474         internal static object GetInternalEnableControlStateProperty(BindableObject bindable)
2475         {
2476             return ((View)bindable).enableControlState;
2477         }
2478
2479         /// <summary>
2480         /// ThemeChangeSensitive property
2481         /// </summary>
2482         [EditorBrowsable(EditorBrowsableState.Never)]
2483 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2484         public static BindableProperty ThemeChangeSensitiveProperty = null;
2485 #else
2486         public static readonly BindableProperty ThemeChangeSensitiveProperty = null;
2487 #endif
2488         internal static void SetInternalThemeChangeSensitiveProperty(BindableObject bindable, object oldValue, object newValue)
2489         {
2490             var view = (View)bindable;
2491
2492             if (view.ThemeChangeSensitive == (bool)newValue) return;
2493
2494             if (view.themeData == null) view.themeData = new ThemeData();
2495
2496             view.themeData.ThemeChangeSensitive = (bool)newValue;
2497
2498             if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2499             {
2500                 view.themeData.ListeningThemeChangeEvent = true;
2501                 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2502             }
2503             else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2504             {
2505                 view.themeData.ListeningThemeChangeEvent = false;
2506                 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2507             }
2508         }
2509         internal static object GetInternalThemeChangeSensitiveProperty(BindableObject bindable)
2510         {
2511             return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2512         }
2513
2514         /// <summary>
2515         /// AccessibilityNameProperty
2516         /// </summary>
2517         [EditorBrowsable(EditorBrowsableState.Never)]
2518 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2519         public static BindableProperty AccessibilityNameProperty = null;
2520 #else
2521         public static readonly BindableProperty AccessibilityNameProperty = null;
2522 #endif
2523         internal static void SetInternalAccessibilityNameProperty(BindableObject bindable, object oldValue, object newValue)
2524         {
2525             var view = (View)bindable;
2526             if (newValue != null)
2527             {
2528                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityName, (string)newValue);
2529             }
2530         }
2531         internal static object GetInternalAccessibilityNameProperty(BindableObject bindable)
2532         {
2533             var view = (View)bindable;
2534             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityName);
2535         }
2536
2537         /// <summary>
2538         /// AccessibilityDescriptionProperty
2539         /// </summary>
2540         [EditorBrowsable(EditorBrowsableState.Never)]
2541 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2542         public static BindableProperty AccessibilityDescriptionProperty = null;
2543 #else
2544         public static readonly BindableProperty AccessibilityDescriptionProperty = null;
2545 #endif
2546         internal static void SetInternalAccessibilityDescriptionProperty(BindableObject bindable, object oldValue, object newValue)
2547         {
2548             var view = (View)bindable;
2549             if (newValue != null)
2550             {
2551
2552                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription, (string)newValue);
2553             }
2554         }
2555         internal static object GetInternalAccessibilityDescriptionProperty(BindableObject bindable)
2556         {
2557             var view = (View)bindable;
2558
2559             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription);
2560         }
2561
2562         /// <summary>
2563         /// AccessibilityTranslationDomainProperty
2564         /// </summary>
2565         [EditorBrowsable(EditorBrowsableState.Never)]
2566 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2567         public static BindableProperty AccessibilityTranslationDomainProperty = null;
2568 #else
2569         public static readonly BindableProperty AccessibilityTranslationDomainProperty = null;
2570 #endif
2571         internal static void SetInternalAccessibilityTranslationDomainProperty(BindableObject bindable, object oldValue, object newValue)
2572         {
2573             var view = (View)bindable;
2574             if (newValue != null)
2575             {
2576
2577                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain, (string)newValue);
2578             }
2579         }
2580         internal static object GetInternalAccessibilityTranslationDomainProperty(BindableObject bindable)
2581         {
2582             var view = (View)bindable;
2583
2584             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain);
2585         }
2586
2587         /// <summary>
2588         /// AccessibilityRoleProperty
2589         /// </summary>
2590         [EditorBrowsable(EditorBrowsableState.Never)]
2591 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2592         public static BindableProperty AccessibilityRoleProperty = null;
2593 #else
2594         public static readonly BindableProperty AccessibilityRoleProperty = null;
2595 #endif
2596         internal static void SetInternalAccessibilityRoleProperty(BindableObject bindable, object oldValue, object newValue)
2597         {
2598             var view = (View)bindable;
2599             if (newValue != null)
2600             {
2601
2602                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole, (int)newValue);
2603             }
2604         }
2605         internal static object GetInternalAccessibilityRoleProperty(BindableObject bindable)
2606         {
2607             var view = (View)bindable;
2608
2609             return (Role)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole);
2610         }
2611
2612         /// <summary>
2613         /// AccessibilityHighlightableProperty
2614         /// </summary>
2615         [EditorBrowsable(EditorBrowsableState.Never)]
2616 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2617         public static BindableProperty AccessibilityHighlightableProperty = null;
2618 #else
2619         public static readonly BindableProperty AccessibilityHighlightableProperty = null;
2620 #endif
2621         internal static void SetInternalAccessibilityHighlightableProperty(BindableObject bindable, object oldValue, object newValue)
2622         {
2623             var view = (View)bindable;
2624             if (newValue != null)
2625             {
2626
2627                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable, (bool)newValue);
2628             }
2629         }
2630         internal static object GetInternalAccessibilityHighlightableProperty(BindableObject bindable)
2631         {
2632             var view = (View)bindable;
2633
2634             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable);
2635         }
2636
2637         /// <summary>
2638         /// AccessibilityHiddenProperty
2639         /// </summary>
2640         [EditorBrowsable(EditorBrowsableState.Never)]
2641 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2642         public static BindableProperty AccessibilityHiddenProperty = null;
2643 #else
2644         public static readonly BindableProperty AccessibilityHiddenProperty = null;
2645 #endif
2646         internal static void SetInternalAccessibilityHiddenProperty(BindableObject bindable, object oldValue, object newValue)
2647         {
2648             var view = (View)bindable;
2649             if (newValue != null)
2650             {
2651
2652                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden, (bool)newValue);
2653             }
2654         }
2655         internal static object GetInternalAccessibilityHiddenProperty(BindableObject bindable)
2656         {
2657             var view = (View)bindable;
2658
2659             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden);
2660         }
2661
2662         /// <summary>
2663         /// ExcludeLayoutingProperty
2664         /// </summary>
2665         [EditorBrowsable(EditorBrowsableState.Never)]
2666 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2667         public static BindableProperty ExcludeLayoutingProperty = null;
2668 #else
2669         public static readonly BindableProperty ExcludeLayoutingProperty = null;
2670 #endif
2671         internal static void SetInternalExcludeLayoutingProperty(BindableObject bindable, object oldValue, object newValue)
2672         {
2673             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2674             if (newValue != null)
2675             {
2676                 instance.InternalExcludeLayouting = (bool)newValue;
2677             }
2678         }
2679         internal static object GetInternalExcludeLayoutingProperty(BindableObject bindable)
2680         {
2681             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2682             return instance.InternalExcludeLayouting;
2683         }
2684
2685         /// <summary>
2686         /// TooltipTextProperty
2687         /// </summary>
2688         [EditorBrowsable(EditorBrowsableState.Never)]
2689 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2690         public static BindableProperty TooltipTextProperty = null;
2691 #else
2692         public static readonly BindableProperty TooltipTextProperty = null;
2693 #endif
2694         internal static void SetInternalTooltipTextProperty(BindableObject bindable, object oldValue, object newValue)
2695         {
2696             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2697             if (newValue != null)
2698             {
2699                 instance.InternalTooltipText = (string)newValue;
2700             }
2701         }
2702         internal static object GetInternalTooltipTextProperty(BindableObject bindable)
2703         {
2704             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2705             return instance.InternalTooltipText;
2706         }
2707
2708         /// <summary>
2709         /// PositionUsesAnchorPointProperty
2710         /// </summary>
2711         [EditorBrowsable(EditorBrowsableState.Never)]
2712 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2713         public static BindableProperty PositionUsesAnchorPointProperty = null;
2714 #else
2715         public static readonly BindableProperty PositionUsesAnchorPointProperty = null;
2716 #endif
2717         internal static void SetInternalPositionUsesAnchorPointProperty(BindableObject bindable, object oldValue, object newValue)
2718         {
2719             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2720             if (newValue != null)
2721             {
2722                 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2723             }
2724         }
2725         internal static object GetInternalPositionUsesAnchorPointProperty(BindableObject bindable)
2726         {
2727             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2728             return instance.InternalPositionUsesAnchorPoint;
2729         }
2730
2731         /// <summary>
2732         /// AnchorPointProperty
2733         /// </summary>
2734         [EditorBrowsable(EditorBrowsableState.Never)]
2735 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2736         public static BindableProperty AnchorPointProperty = null;
2737 #else
2738         public static readonly BindableProperty AnchorPointProperty = null;
2739 #endif
2740         internal static void SetInternalAnchorPointProperty(BindableObject bindable, object oldValue, object newValue)
2741         {
2742             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2743             if (newValue != null)
2744             {
2745                 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2746             }
2747         }
2748         internal static object GetInternalAnchorPointProperty(BindableObject bindable)
2749         {
2750             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2751             return instance.InternalAnchorPoint;
2752         }
2753
2754         /// <summary>
2755         /// WidthSpecificationProperty
2756         /// </summary>
2757         [EditorBrowsable(EditorBrowsableState.Never)]
2758 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2759         public static BindableProperty WidthSpecificationProperty = null;
2760 #else
2761         public static readonly BindableProperty WidthSpecificationProperty = null;
2762 #endif
2763         internal static void SetInternalWidthSpecificationProperty(BindableObject bindable, object oldValue, object newValue)
2764         {
2765             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2766             if (newValue != null)
2767             {
2768                 instance.InternalWidthSpecification = (int)newValue;
2769             }
2770         }
2771         internal static object GetInternalWidthSpecificationProperty(BindableObject bindable)
2772         {
2773             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2774             return instance.InternalWidthSpecification;
2775         }
2776
2777         /// <summary>
2778         /// HeightSpecificationProperty
2779         /// </summary>
2780         [EditorBrowsable(EditorBrowsableState.Never)]
2781 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2782         public static BindableProperty HeightSpecificationProperty = null;
2783 #else
2784         public static readonly BindableProperty HeightSpecificationProperty = null;
2785 #endif
2786         internal static void SetInternalHeightSpecificationProperty(BindableObject bindable, object oldValue, object newValue)
2787         {
2788             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2789             if (newValue != null)
2790             {
2791                 instance.InternalHeightSpecification = (int)newValue;
2792             }
2793         }
2794         internal static object GetInternalHeightSpecificationProperty(BindableObject bindable)
2795         {
2796             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2797             return instance.InternalHeightSpecification;
2798         }
2799
2800         /// <summary>
2801         /// LayoutTransitionProperty
2802         /// </summary>
2803         [EditorBrowsable(EditorBrowsableState.Never)]
2804 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2805         public static BindableProperty LayoutTransitionProperty = null;
2806 #else
2807         public static readonly BindableProperty LayoutTransitionProperty = null;
2808 #endif
2809         internal static void SetInternalLayoutTransitionProperty(BindableObject bindable, object oldValue, object newValue)
2810         {
2811             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2812             if (newValue != null)
2813             {
2814                 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2815             }
2816         }
2817         internal static object GetInternalLayoutTransitionProperty(BindableObject bindable)
2818         {
2819             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2820             return instance.InternalLayoutTransition;
2821         }
2822
2823         /// <summary>
2824         /// PaddingEXProperty
2825         /// </summary>
2826         [EditorBrowsable(EditorBrowsableState.Never)]
2827 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2828         public static BindableProperty PaddingEXProperty = null;
2829 #else
2830         public static readonly BindableProperty PaddingEXProperty = null;
2831 #endif
2832         internal static void SetInternalPaddingEXProperty(BindableObject bindable, object oldValue, object newValue)
2833         {
2834             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2835             if (newValue != null)
2836             {
2837                 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2838             }
2839         }
2840         internal static object GetInternalPaddingEXProperty(BindableObject bindable)
2841         {
2842             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2843             return instance.InternalPaddingEX;
2844         }
2845
2846         /// <summary>
2847         /// LayoutProperty
2848         /// </summary>
2849         [EditorBrowsable(EditorBrowsableState.Never)]
2850 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2851         public static BindableProperty LayoutProperty = null;
2852 #else
2853         public static readonly BindableProperty LayoutProperty = null;
2854 #endif
2855         internal static void SetInternalLayoutProperty(BindableObject bindable, object oldValue, object newValue)
2856         {
2857             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2858             if (newValue != null)
2859             {
2860                 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2861             }
2862         }
2863         internal static object GetInternalLayoutProperty(BindableObject bindable)
2864         {
2865             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2866             return instance.InternalLayout;
2867         }
2868
2869         /// <summary>
2870         /// BackgroundImageSynchronosLoadingProperty
2871         /// </summary>
2872         [EditorBrowsable(EditorBrowsableState.Never)]
2873 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2874         public static BindableProperty BackgroundImageSynchronosLoadingProperty = null;
2875 #else
2876         public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = null;
2877 #endif
2878         internal static void SetInternalBackgroundImageSynchronosLoadingProperty(BindableObject bindable, object oldValue, object newValue)
2879         {
2880             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2881             if (newValue != null)
2882             {
2883                 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2884             }
2885         }
2886         internal static object GetInternalBackgroundImageSynchronosLoadingProperty(BindableObject bindable)
2887         {
2888             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2889             return instance.InternalBackgroundImageSynchronosLoading;
2890         }
2891
2892         /// <summary>
2893         /// BackgroundImageSynchronousLoadingProperty
2894         /// </summary>
2895         [EditorBrowsable(EditorBrowsableState.Never)]
2896 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2897         public static BindableProperty BackgroundImageSynchronousLoadingProperty = null;
2898 #else
2899         public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = null;
2900 #endif
2901         internal static void SetInternalBackgroundImageSynchronousLoadingProperty(BindableObject bindable, object oldValue, object newValue)
2902         {
2903             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2904             if (newValue != null)
2905             {
2906                 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2907             }
2908         }
2909         internal static object GetInternalBackgroundImageSynchronousLoadingProperty(BindableObject bindable)
2910         {
2911             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2912             return instance.InternalBackgroundImageSynchronousLoading;
2913         }
2914
2915         /// <summary>
2916         /// EnableControlStatePropagationProperty
2917         /// </summary>
2918         [EditorBrowsable(EditorBrowsableState.Never)]
2919 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2920         public static BindableProperty EnableControlStatePropagationProperty = null;
2921 #else
2922         public static readonly BindableProperty EnableControlStatePropagationProperty = null;
2923 #endif
2924         internal static void SetInternalEnableControlStatePropagationProperty(BindableObject bindable, object oldValue, object newValue)
2925         {
2926             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2927             if (newValue != null)
2928             {
2929                 instance.InternalEnableControlStatePropagation = (bool)newValue;
2930             }
2931         }
2932         internal static object GetInternalEnableControlStatePropagationProperty(BindableObject bindable)
2933         {
2934             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2935             return instance.InternalEnableControlStatePropagation;
2936         }
2937
2938         /// <summary>
2939         /// PropagatableControlStatesProperty
2940         /// </summary>
2941         [EditorBrowsable(EditorBrowsableState.Never)]
2942 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2943         public static BindableProperty PropagatableControlStatesProperty = null;
2944 #else
2945         public static readonly BindableProperty PropagatableControlStatesProperty = null;
2946 #endif
2947         internal static void SetInternalPropagatableControlStatesProperty(BindableObject bindable, object oldValue, object newValue)
2948         {
2949             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2950             if (newValue != null)
2951             {
2952                 instance.InternalPropagatableControlStates = (ControlState)newValue;
2953             }
2954         }
2955         internal static object GetInternalPropagatableControlStatesProperty(BindableObject bindable)
2956         {
2957             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2958             return instance.InternalPropagatableControlStates;
2959         }
2960
2961         /// <summary>
2962         /// GrabTouchAfterLeaveProperty
2963         /// </summary>
2964         [EditorBrowsable(EditorBrowsableState.Never)]
2965 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2966         public static BindableProperty GrabTouchAfterLeaveProperty = null;
2967 #else
2968         public static readonly BindableProperty GrabTouchAfterLeaveProperty = null;
2969 #endif
2970         internal static void SetInternalGrabTouchAfterLeaveProperty(BindableObject bindable, object oldValue, object newValue)
2971         {
2972             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2973             if (newValue != null)
2974             {
2975                 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2976             }
2977         }
2978         internal static object GetInternalGrabTouchAfterLeaveProperty(BindableObject bindable)
2979         {
2980             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2981             return instance.InternalGrabTouchAfterLeave;
2982         }
2983
2984         /// <summary>
2985         /// AllowOnlyOwnTouchProperty
2986         /// </summary>
2987         [EditorBrowsable(EditorBrowsableState.Never)]
2988 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
2989         public static BindableProperty AllowOnlyOwnTouchProperty = null;
2990 #else
2991         public static readonly BindableProperty AllowOnlyOwnTouchProperty = null;
2992 #endif
2993         internal static void SetInternalAllowOnlyOwnTouchProperty(BindableObject bindable, object oldValue, object newValue)
2994         {
2995             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2996             if (newValue != null)
2997             {
2998                 instance.InternalAllowOnlyOwnTouch = (bool)newValue;
2999             }
3000         }
3001         internal static object GetInternalAllowOnlyOwnTouchProperty(BindableObject bindable)
3002         {
3003             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3004             return instance.InternalAllowOnlyOwnTouch;
3005         }
3006
3007         /// <summary>
3008         /// BlendEquationProperty
3009         /// </summary>
3010         [EditorBrowsable(EditorBrowsableState.Never)]
3011 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3012         public static BindableProperty BlendEquationProperty = null;
3013 #else
3014         public static readonly BindableProperty BlendEquationProperty = null;
3015 #endif
3016         internal static void SetInternalBlendEquationProperty(BindableObject bindable, object oldValue, object newValue)
3017         {
3018             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3019             if (newValue != null)
3020             {
3021                 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
3022             }
3023         }
3024         internal static object GetInternalBlendEquationProperty(BindableObject bindable)
3025         {
3026             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3027             return instance.InternalBlendEquation;
3028         }
3029
3030         /// <summary>
3031         /// TransitionOptionsProperty
3032         /// </summary>
3033         [EditorBrowsable(EditorBrowsableState.Never)]
3034 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3035         public static BindableProperty TransitionOptionsProperty = null;
3036 #else
3037         public static readonly BindableProperty TransitionOptionsProperty = null;
3038 #endif
3039         internal static void SetInternalTransitionOptionsProperty(BindableObject bindable, object oldValue, object newValue)
3040         {
3041             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3042             if (newValue != null)
3043             {
3044                 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
3045             }
3046         }
3047         internal static object GetInternalTransitionOptionsProperty(BindableObject bindable)
3048         {
3049             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3050             return instance.InternalTransitionOptions;
3051         }
3052
3053         /// <summary>
3054         /// AutomationIdProperty
3055         /// </summary>
3056         [EditorBrowsable(EditorBrowsableState.Never)]
3057 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3058         public static BindableProperty AutomationIdProperty = null;
3059 #else
3060         public static readonly BindableProperty AutomationIdProperty = null;
3061 #endif
3062         internal static void SetInternalAutomationIdProperty(BindableObject bindable, object oldValue, object newValue)
3063         {
3064             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3065             if (newValue != null)
3066             {
3067
3068                 Object.InternalSetPropertyString(instance.SwigCPtr, View.Property.AutomationId, (string)newValue);
3069             }
3070         }
3071         internal static object GetInternalAutomationIdProperty(BindableObject bindable)
3072         {
3073             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3074
3075             return Object.InternalGetPropertyString(instance.SwigCPtr, View.Property.AutomationId);
3076         }
3077
3078         /// <summary>
3079         /// TouchAreaOffsetProperty
3080         /// </summary>
3081         [EditorBrowsable(EditorBrowsableState.Never)]
3082 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3083         public static BindableProperty TouchAreaOffsetProperty = null;
3084 #else
3085         public static readonly BindableProperty TouchAreaOffsetProperty = null;
3086 #endif
3087         internal static void SetInternalTouchAreaOffsetProperty(BindableObject bindable, object oldValue, object newValue)
3088         {
3089             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3090             if (newValue != null)
3091             {
3092                 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
3093             }
3094         }
3095         internal static object GetInternalTouchAreaOffsetProperty(BindableObject bindable)
3096         {
3097             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3098             return instance.InternalTouchAreaOffset;
3099         }
3100
3101         /// <summary>
3102         /// DispatchTouchMotionProperty
3103         /// </summary>
3104         [EditorBrowsable(EditorBrowsableState.Never)]
3105 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3106         public static BindableProperty DispatchTouchMotionProperty = null;
3107 #else
3108         public static readonly BindableProperty DispatchTouchMotionProperty = null;
3109 #endif
3110         internal static void SetInternalDispatchTouchMotionProperty(BindableObject bindable, object oldValue, object newValue)
3111         {
3112             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3113             if (newValue != null)
3114             {
3115                 instance.InternalDispatchTouchMotion = (bool)newValue;
3116             }
3117         }
3118         internal static object GetInternalDispatchTouchMotionProperty(BindableObject bindable)
3119         {
3120             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3121             return instance.InternalDispatchTouchMotion;
3122         }
3123
3124         /// <summary>
3125         /// DispatchHoverMotionProperty
3126         /// </summary>
3127         [EditorBrowsable(EditorBrowsableState.Never)]
3128 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3129         public static BindableProperty DispatchHoverMotionProperty = null;
3130 #else
3131         public static readonly BindableProperty DispatchHoverMotionProperty = null;
3132 #endif
3133         internal static void SetInternalDispatchHoverMotionProperty(BindableObject bindable, object oldValue, object newValue)
3134         {
3135             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3136             if (newValue != null)
3137             {
3138                 instance.InternalDispatchHoverMotion = (bool)newValue;
3139             }
3140         }
3141
3142         internal static object GetInternalDispatchHoverMotionProperty(BindableObject bindable)
3143         {
3144             var instance = (Tizen.NUI.BaseComponents.View)bindable;
3145             return instance.InternalDispatchHoverMotion;
3146         }
3147
3148 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
3149         internal static void CreateBindableProperties()
3150         {
3151             if (NUIApplication.IsUsingXaml)
3152             {
3153                 StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty,
3154                     propertyChanged: SetInternalStyleNameProperty, defaultValueCreator: GetInternalStyleNameProperty);
3155
3156                 KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false,
3157                     propertyChanged: SetInternalKeyInputFocusProperty, defaultValueCreator: GetInternalKeyInputFocusProperty);
3158
3159                 BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
3160                     propertyChanged: SetInternalBackgroundColorProperty, defaultValueCreator: GetInternalBackgroundColorProperty);
3161
3162                 ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
3163                     propertyChanged: SetInternalColorProperty, defaultValueCreator: GetInternalColorProperty);
3164                 
3165                 ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
3166                     propertyChanged: SetInternalColorRedProperty, defaultValueCreator: GetInternalColorRedProperty);
3167
3168                 ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
3169                     propertyChanged: SetInternalColorGreenProperty, defaultValueCreator: GetInternalColorGreenProperty);
3170
3171                 ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
3172                     propertyChanged: SetInternalColorBlueProperty, defaultValueCreator: GetInternalColorBlueProperty);
3173
3174                 BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
3175                     propertyChanged: SetInternalBackgroundImageProperty, defaultValueCreator: GetInternalBackgroundImageProperty);
3176
3177                 BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle),
3178                     propertyChanged: SetInternalBackgroundImageBorderProperty, defaultValueCreator: GetInternalBackgroundImageBorderProperty);
3179
3180                 BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
3181                     propertyChanged: SetInternalBackgroundProperty, defaultValueCreator: GetInternalBackgroundProperty);
3182
3183                 StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal,
3184                     propertyChanged: SetInternalStateProperty, defaultValueCreator: GetInternalStateProperty);
3185
3186                 SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal,
3187                     propertyChanged: SetInternalSubStateProperty, defaultValueCreator: GetInternalSubStateProperty);
3188
3189                 TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null,
3190                     propertyChanged: SetInternalTooltipProperty, defaultValueCreator: GetInternalTooltipProperty);
3191
3192                 FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float),
3193                     propertyChanged: SetInternalFlexProperty, defaultValueCreator: GetInternalFlexProperty);
3194
3195                 AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int),
3196                     propertyChanged: SetInternalAlignSelfProperty, defaultValueCreator: GetInternalAlignSelfProperty);
3197
3198                 FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null,
3199                     propertyChanged: SetInternalFlexMarginProperty, defaultValueCreator: GetInternalFlexMarginProperty);
3200
3201                 CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
3202                     propertyChanged: SetInternalCellIndexProperty, defaultValueCreator: GetInternalCellIndexProperty);
3203
3204                 RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float),
3205                     propertyChanged: SetInternalRowSpanProperty, defaultValueCreator: GetInternalRowSpanProperty);
3206
3207                 ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float),
3208                     propertyChanged: SetInternalColumnSpanProperty, defaultValueCreator: GetInternalColumnSpanProperty);
3209
3210                 CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left,
3211                     propertyChanged: SetInternalCellHorizontalAlignmentProperty, defaultValueCreator: GetInternalCellHorizontalAlignmentProperty);
3212
3213                 CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top,
3214                     propertyChanged: SetInternalCellVerticalAlignmentProperty, defaultValueCreator: GetInternalCellVerticalAlignmentProperty);
3215
3216                 WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float),
3217                     propertyChanged: SetInternalWeightProperty, defaultValueCreator: GetInternalWeightProperty);
3218
3219                 LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null,
3220                     propertyChanged: SetInternalLeftFocusableViewProperty, defaultValueCreator: GetInternalLeftFocusableViewProperty);
3221
3222                 RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null,
3223                     propertyChanged: SetInternalRightFocusableViewProperty, defaultValueCreator: GetInternalRightFocusableViewProperty);
3224
3225                 UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null,
3226                     propertyChanged: SetInternalUpFocusableViewProperty, defaultValueCreator: GetInternalUpFocusableViewProperty);
3227
3228                 DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null,
3229                     propertyChanged: SetInternalDownFocusableViewProperty, defaultValueCreator: GetInternalDownFocusableViewProperty);
3230
3231                 ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null,
3232                     propertyChanged: SetInternalClockwiseFocusableViewProperty, defaultValueCreator: GetInternalClockwiseFocusableViewProperty);
3233
3234                 CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null,
3235                     propertyChanged: SetInternalCounterClockwiseFocusableViewProperty, defaultValueCreator: GetInternalCounterClockwiseFocusableViewProperty);
3236
3237                 FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false,
3238                     propertyChanged: SetInternalFocusableProperty, defaultValueCreator: GetInternalFocusableProperty);
3239
3240                 FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true,
3241                     propertyChanged: SetInternalFocusableChildrenProperty, defaultValueCreator: GetInternalFocusableChildrenProperty);
3242
3243                 FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false,
3244                     propertyChanged: SetInternalFocusableInTouchProperty, defaultValueCreator: GetInternalFocusableInTouchProperty);
3245
3246                 Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
3247                     propertyChanged: SetInternalSize2DProperty, defaultValueCreator: GetInternalSize2DProperty);
3248
3249                 OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float),
3250                     propertyChanged: SetInternalOpacityProperty, defaultValueCreator: GetInternalOpacityProperty);
3251
3252                 Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
3253                     propertyChanged: SetInternalPosition2DProperty, defaultValueCreator: GetInternalPosition2DProperty);
3254
3255                 PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true,
3256                     propertyChanged: SetInternalPositionUsesPivotPointProperty, defaultValueCreator: GetInternalPositionUsesPivotPointProperty);
3257
3258                 SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int),
3259                     propertyChanged: SetInternalSiblingOrderProperty, defaultValueCreator: GetInternalSiblingOrderProperty);
3260
3261                 ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null,
3262                     propertyChanged: SetInternalParentOriginProperty, defaultValueCreator: GetInternalParentOriginProperty);
3263
3264                 PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
3265                     propertyChanged: SetInternalPivotPointProperty, defaultValueCreator: GetInternalPivotPointProperty);
3266
3267                 SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float),
3268                     propertyChanged: SetInternalSizeWidthProperty, defaultValueCreator: GetInternalSizeWidthProperty);
3269
3270                 SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float),
3271                     propertyChanged: SetInternalSizeHeightProperty, defaultValueCreator: GetInternalSizeHeightProperty);
3272
3273                 PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
3274                     propertyChanged: SetInternalPositionProperty, defaultValueCreator: GetInternalPositionProperty);
3275
3276                 PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float),
3277                     propertyChanged: SetInternalPositionXProperty, defaultValueCreator: GetInternalPositionXProperty);
3278
3279                 PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float),
3280                     propertyChanged: SetInternalPositionYProperty, defaultValueCreator: GetInternalPositionYProperty);
3281
3282                 PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float),
3283                     propertyChanged: SetInternalPositionZProperty, defaultValueCreator: GetInternalPositionZProperty);
3284
3285                 OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null,
3286                     propertyChanged: SetInternalOrientationProperty, defaultValueCreator: GetInternalOrientationProperty);
3287
3288                 ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
3289                     propertyChanged: SetInternalScaleProperty, defaultValueCreator: GetInternalScaleProperty);
3290
3291                 ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float),
3292                     propertyChanged: SetInternalScaleXProperty, defaultValueCreator: GetInternalScaleXProperty);
3293
3294                 ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float),
3295                     propertyChanged: SetInternalScaleYProperty, defaultValueCreator: GetInternalScaleYProperty);
3296
3297                 ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float),
3298                     propertyChanged: SetInternalScaleZProperty, defaultValueCreator: GetInternalScaleZProperty);
3299
3300                 NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
3301                     propertyChanged: SetInternalNameProperty, defaultValueCreator: GetInternalNameProperty);
3302
3303                 SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false,
3304                     propertyChanged: SetInternalSensitiveProperty, defaultValueCreator: GetInternalSensitiveProperty);
3305
3306                 IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false,
3307                     propertyChanged: SetInternalIsEnabledProperty, defaultValueCreator: GetInternalIsEnabledProperty);
3308
3309                 DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false,
3310                     propertyChanged: SetInternalDispatchKeyEventsProperty, defaultValueCreator: GetInternalDispatchKeyEventsProperty);
3311
3312                 LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false,
3313                     propertyChanged: SetInternalLeaveRequiredProperty, defaultValueCreator: GetInternalLeaveRequiredProperty);
3314
3315                 InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false,
3316                     propertyChanged: SetInternalInheritOrientationProperty, defaultValueCreator: GetInternalInheritOrientationProperty);
3317
3318                 InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false,
3319                     propertyChanged: SetInternalInheritScaleProperty, defaultValueCreator: GetInternalInheritScaleProperty);
3320
3321                 DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal,
3322                     propertyChanged: SetInternalDrawModeProperty, defaultValueCreator: GetInternalDrawModeProperty);
3323
3324                 SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
3325                     propertyChanged: SetInternalSizeModeFactorProperty, defaultValueCreator: GetInternalSizeModeFactorProperty);
3326
3327                 WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
3328                     propertyChanged: SetInternalWidthResizePolicyProperty, defaultValueCreator: GetInternalWidthResizePolicyProperty);
3329
3330                 HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
3331                     propertyChanged: SetInternalHeightResizePolicyProperty, defaultValueCreator: GetInternalHeightResizePolicyProperty);
3332
3333                 SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet,
3334                     propertyChanged: SetInternalSizeScalePolicyProperty, defaultValueCreator: GetInternalSizeScalePolicyProperty);
3335
3336                 WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false,
3337                     propertyChanged: SetInternalWidthForHeightProperty, defaultValueCreator: GetInternalWidthForHeightProperty);
3338
3339                 HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false,
3340                     propertyChanged: SetInternalHeightForWidthProperty, defaultValueCreator: GetInternalHeightForWidthProperty);
3341
3342                 PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
3343                     propertyChanged: SetInternalPaddingProperty, defaultValueCreator: GetInternalPaddingProperty);
3344
3345                 SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
3346                     propertyChanged: SetInternalSizeProperty, defaultValueCreator: GetInternalSizeProperty);
3347
3348                 MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
3349                     propertyChanged: SetInternalMinimumSizeProperty, defaultValueCreator: GetInternalMinimumSizeProperty);
3350
3351                 MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
3352                     propertyChanged: SetInternalMaximumSizeProperty, defaultValueCreator: GetInternalMaximumSizeProperty);
3353
3354                 InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false,
3355                     propertyChanged: SetInternalInheritPositionProperty, defaultValueCreator: GetInternalInheritPositionProperty);
3356
3357                 ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled,
3358                     propertyChanged: SetInternalClippingModeProperty, defaultValueCreator: GetInternalClippingModeProperty);
3359
3360                 InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false,
3361                     propertyChanged: SetInternalInheritLayoutDirectionProperty, defaultValueCreator: GetInternalInheritLayoutDirectionProperty);
3362
3363                 LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR,
3364                     propertyChanged: SetInternalLayoutDirectionProperty, defaultValueCreator: GetInternalLayoutDirectionProperty);
3365
3366                 MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
3367                     propertyChanged: SetInternalMarginProperty, defaultValueCreator: GetInternalMarginProperty);
3368
3369                 UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null,
3370                     propertyChanged: SetInternalUpdateAreaHintProperty, defaultValueCreator: GetInternalUpdateAreaHintProperty);
3371
3372                 ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null,
3373                     propertyChanged: SetInternalImageShadowProperty, defaultValueCreator: GetInternalImageShadowProperty);
3374
3375                 BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null,
3376                     propertyChanged: SetInternalBoxShadowProperty, defaultValueCreator: GetInternalBoxShadowProperty);
3377
3378                 CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null,
3379                     propertyChanged: SetInternalCornerRadiusProperty, defaultValueCreator: GetInternalCornerRadiusProperty);
3380
3381                 CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute,
3382                     propertyChanged: SetInternalCornerRadiusPolicyProperty, defaultValueCreator: GetInternalCornerRadiusPolicyProperty);
3383
3384                 BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float),
3385                     propertyChanged: SetInternalBorderlineWidthProperty, defaultValueCreator: GetInternalBorderlineWidthProperty);
3386
3387                 BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
3388                     propertyChanged: SetInternalBorderlineColorProperty, defaultValueCreator: GetInternalBorderlineColorProperty);
3389
3390                 BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
3391                     propertyChanged: SetInternalBorderlineColorSelectorProperty, defaultValueCreator: GetInternalBorderlineColorSelectorProperty);
3392
3393                 BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float),
3394                     propertyChanged: SetInternalBorderlineOffsetProperty, defaultValueCreator: GetInternalBorderlineOffsetProperty);
3395
3396                 EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false,
3397                     propertyChanged: SetInternalEnableControlStateProperty, defaultValueCreator: GetInternalEnableControlStateProperty);
3398
3399                 ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false,
3400                     propertyChanged: SetInternalThemeChangeSensitiveProperty, defaultValueCreator: GetInternalThemeChangeSensitiveProperty);
3401
3402                 AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty,
3403                     propertyChanged: SetInternalAccessibilityNameProperty, defaultValueCreator: GetInternalAccessibilityNameProperty);
3404
3405                 AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty,
3406                     propertyChanged: SetInternalAccessibilityDescriptionProperty, defaultValueCreator: GetInternalAccessibilityDescriptionProperty);
3407
3408                 AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty,
3409                     propertyChanged: SetInternalAccessibilityTranslationDomainProperty, defaultValueCreator: GetInternalAccessibilityTranslationDomainProperty);
3410
3411                 AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role),
3412                     propertyChanged: SetInternalAccessibilityRoleProperty, defaultValueCreator: GetInternalAccessibilityRoleProperty);
3413
3414                 AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false,
3415                     propertyChanged: SetInternalAccessibilityHighlightableProperty, defaultValueCreator: GetInternalAccessibilityHighlightableProperty);
3416
3417                 AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false,
3418                     propertyChanged: SetInternalAccessibilityHiddenProperty, defaultValueCreator: GetInternalAccessibilityHiddenProperty);
3419
3420                 ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false,
3421                     propertyChanged: SetInternalExcludeLayoutingProperty, defaultValueCreator: GetInternalExcludeLayoutingProperty);
3422
3423                 TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty,
3424                     propertyChanged: SetInternalTooltipTextProperty, defaultValueCreator: GetInternalTooltipTextProperty);
3425
3426                 PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false,
3427                     propertyChanged: SetInternalPositionUsesAnchorPointProperty, defaultValueCreator: GetInternalPositionUsesAnchorPointProperty);
3428
3429                 AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null,
3430                     propertyChanged: SetInternalAnchorPointProperty, defaultValueCreator: GetInternalAnchorPointProperty);
3431                 
3432                 WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0,
3433                     propertyChanged: SetInternalWidthSpecificationProperty, defaultValueCreator: GetInternalWidthSpecificationProperty);
3434
3435                 HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0,
3436                     propertyChanged: SetInternalHeightSpecificationProperty, defaultValueCreator: GetInternalHeightSpecificationProperty);
3437
3438                 LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null,
3439                     propertyChanged: SetInternalLayoutTransitionProperty, defaultValueCreator: GetInternalLayoutTransitionProperty);
3440
3441                 PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null,
3442                     propertyChanged: SetInternalPaddingEXProperty, defaultValueCreator: GetInternalPaddingEXProperty);
3443
3444                 LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null,
3445                     propertyChanged: SetInternalLayoutProperty, defaultValueCreator: GetInternalLayoutProperty);
3446
3447                 BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false,
3448                     propertyChanged: SetInternalBackgroundImageSynchronosLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronosLoadingProperty);
3449
3450                 BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false,
3451                     propertyChanged: SetInternalBackgroundImageSynchronousLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronousLoadingProperty);
3452
3453                 EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false,
3454                     propertyChanged: SetInternalEnableControlStatePropagationProperty, defaultValueCreator: GetInternalEnableControlStatePropagationProperty);
3455
3456                 PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All,
3457                     propertyChanged: SetInternalPropagatableControlStatesProperty, defaultValueCreator: GetInternalPropagatableControlStatesProperty);
3458
3459                 GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false,
3460                     propertyChanged: SetInternalGrabTouchAfterLeaveProperty, defaultValueCreator: GetInternalGrabTouchAfterLeaveProperty);
3461
3462                 AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false,
3463                     propertyChanged: SetInternalAllowOnlyOwnTouchProperty, defaultValueCreator: GetInternalAllowOnlyOwnTouchProperty);
3464
3465                 BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType),
3466                     propertyChanged: SetInternalBlendEquationProperty, defaultValueCreator: GetInternalBlendEquationProperty);
3467
3468                 TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions),
3469                     propertyChanged: SetInternalTransitionOptionsProperty, defaultValueCreator: GetInternalTransitionOptionsProperty);
3470
3471                 AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty,
3472                     propertyChanged: SetInternalAutomationIdProperty, defaultValueCreator: GetInternalAutomationIdProperty);
3473
3474                 TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset),
3475                     propertyChanged: SetInternalTouchAreaOffsetProperty, defaultValueCreator: GetInternalTouchAreaOffsetProperty);
3476
3477                 DispatchTouchMotionProperty = BindableProperty.Create(nameof(DispatchTouchMotion), typeof(bool), typeof(View), false,
3478                     propertyChanged: SetInternalDispatchTouchMotionProperty, defaultValueCreator: GetInternalDispatchTouchMotionProperty);
3479
3480                 DispatchHoverMotionProperty = BindableProperty.Create(nameof(DispatchHoverMotion), typeof(bool), typeof(View), false,
3481                     propertyChanged: SetInternalDispatchHoverMotionProperty, defaultValueCreator: GetInternalDispatchHoverMotionProperty);
3482
3483
3484                 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
3485                 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
3486                 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
3487                 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
3488
3489                 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
3490                 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
3491                 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
3492                 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
3493
3494                 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
3495                 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
3496                 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
3497                 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
3498             }
3499         }
3500 #else
3501         // keep readonly for BindableProperty
3502 #endif
3503
3504         /// <summary>
3505         /// Gets View's Size2D set by user.
3506         /// </summary>
3507         internal Size2D GetUserSize2D()
3508         {
3509             return new Size2D((int)userSizeWidth, (int)userSizeHeight);
3510         }
3511
3512         private void SetBackgroundImage(string value)
3513         {
3514             if (string.IsNullOrEmpty(value))
3515             {
3516                 backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3517
3518                 backgroundImageUrl = null;
3519
3520                 var empty = new PropertyValue();
3521                 // Clear background
3522                 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
3523                 empty.Dispose();
3524                 return;
3525             }
3526
3527             if (value.StartsWith("*Resource*"))
3528             {
3529                 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
3530                 value = value.Replace("*Resource*", resource);
3531             }
3532
3533             backgroundImageUrl = value;
3534
3535             // Fast return for usual cases.
3536             if (backgroundExtraData == null && !backgroundImageSynchronousLoading)
3537             {
3538                 Object.InternalSetPropertyString(SwigCPtr, View.Property.BACKGROUND, value);
3539                 return;
3540             }
3541
3542             using var map = new PropertyMap();
3543             using var url = new PropertyValue(value);
3544             using var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
3545
3546             map.Add(ImageVisualProperty.URL, url)
3547                .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
3548
3549             if ((backgroundExtraData?.BackgroundImageBorder) != null)
3550             {
3551                 using var npatchType = new PropertyValue((int)Visual.Type.NPatch);
3552                 using var border = new PropertyValue(backgroundExtraData.BackgroundImageBorder);
3553                 map.Add(Visual.Property.Type, npatchType)
3554                    .Add(NpatchImageVisualProperty.Border, border);
3555             }
3556             else
3557             {
3558                 using var imageType = new PropertyValue((int)Visual.Type.Image);
3559                 map.Add(Visual.Property.Type, imageType);
3560             }
3561
3562             if(backgroundExtraData != null)
3563             {
3564                 using var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
3565                 using var cornerRadius = new PropertyValue(cornerRadiusValue);
3566                 using var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
3567                 using var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
3568                 using var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
3569                 using var borderlineColor = new PropertyValue(borderlineColorValue);
3570                 using var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
3571
3572                 map.Add(Visual.Property.CornerRadius, cornerRadius)
3573                    .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
3574                    .Add(Visual.Property.BorderlineWidth, borderlineWidth)
3575                    .Add(Visual.Property.BorderlineColor, borderlineColor)
3576                    .Add(Visual.Property.BorderlineOffset, borderlineOffset);
3577             }
3578
3579             backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3580
3581             using var mapValue = new PropertyValue(map);
3582             Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
3583         }
3584
3585         private void SetBackgroundImageBorder(Rectangle value)
3586         {
3587             bool isEmptyValue = Rectangle.IsNullOrZero(value);
3588
3589             var backgroundImageBorder = isEmptyValue ? null : value;
3590
3591             (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
3592
3593             if (isEmptyValue)
3594             {
3595                 return;
3596             }
3597
3598             PropertyMap map = Background;
3599
3600             if (map.Empty())
3601             {
3602                 return;
3603             }
3604
3605             map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
3606
3607             int visualType = 0;
3608
3609             map.Find(Visual.Property.Type)?.Get(out visualType);
3610
3611             if (visualType == (int)Visual.Type.Image)
3612             {
3613                 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
3614             }
3615
3616             // Background extra data flag is not meanful anymore.
3617             backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3618
3619             Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
3620         }
3621
3622         private void SetBorderlineColor(Color value)
3623         {
3624             if (value == null)
3625             {
3626                 return;
3627             }
3628
3629             (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BorderlineColor = value;
3630
3631             UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.Borderline);
3632         }
3633
3634         private void SetBackgroundColor(Color value)
3635         {
3636             if (value == null)
3637             {
3638                 return;
3639             }
3640
3641             // Background property will be Color after now. Remove background image url information.
3642             backgroundImageUrl = null;
3643
3644             if (backgroundExtraData == null)
3645             {
3646                 Object.InternalSetPropertyVector4(SwigCPtr, View.Property.BACKGROUND, ((Color)value).SwigCPtr);
3647                 return;
3648             }
3649
3650             var map = new PropertyMap();
3651             var colorType = new PropertyValue((int)Visual.Type.Color);
3652             var mixColor = new PropertyValue(value);
3653             var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
3654             var cornerRadius = new PropertyValue(cornerRadiusValue);
3655             var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
3656             var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
3657             var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
3658             var borderlineColor = new PropertyValue(borderlineColorValue);
3659             var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
3660
3661             map.Add(Visual.Property.Type, colorType)
3662                .Add(ColorVisualProperty.MixColor, mixColor)
3663                .Add(Visual.Property.CornerRadius, cornerRadius)
3664                .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
3665                .Add(Visual.Property.BorderlineWidth, borderlineWidth)
3666                .Add(Visual.Property.BorderlineColor, borderlineColor)
3667                .Add(Visual.Property.BorderlineOffset, borderlineOffset);
3668
3669             backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Background;
3670
3671             var mapValue = new PropertyValue(map);
3672             Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
3673
3674             borderlineOffset?.Dispose();
3675             borderlineColor?.Dispose();
3676             borderlineColorValue?.Dispose();
3677             borderlineWidth?.Dispose();
3678             cornerRadiusPolicy?.Dispose();
3679             cornerRadius?.Dispose();
3680             cornerRadiusValue?.Dispose();
3681             mixColor?.Dispose();
3682             colorType?.Dispose();
3683             map?.Dispose();
3684             mapValue?.Dispose();
3685         }
3686
3687         private void SetColor(Color value)
3688         {
3689             if (value == null)
3690             {
3691                 return;
3692             }
3693
3694             Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
3695             if (NDalicPINVOKE.SWIGPendingException.Pending)
3696                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3697         }
3698
3699         private void SetColorRed(float? value)
3700         {
3701             if (value == null)
3702             {
3703                 return;
3704             }
3705
3706             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorRed, (float)value);
3707             if (NDalicPINVOKE.SWIGPendingException.Pending)
3708                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3709         }
3710
3711         private void SetColorGreen(float? value)
3712         {
3713             if (value == null)
3714             {
3715                 return;
3716             }
3717
3718             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorGreen, (float)value);
3719             if (NDalicPINVOKE.SWIGPendingException.Pending)
3720                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3721         }
3722
3723         private void SetColorBlue(float? value)
3724         {
3725             if (value == null)
3726             {
3727                 return;
3728             }
3729
3730             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorBlue, (float)value);
3731             if (NDalicPINVOKE.SWIGPendingException.Pending)
3732                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3733         }
3734
3735         private void SetOpacity(float? value)
3736         {
3737             if (value == null)
3738             {
3739                 return;
3740             }
3741
3742             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.OPACITY, (float)value);
3743         }
3744
3745         private void SetShadow(ShadowBase value)
3746         {
3747             backgroundExtraDataUpdatedFlag &= ~BackgroundExtraDataUpdatedFlag.Shadow;
3748             Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));
3749         }
3750     }
3751 }