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