[NUI] Fix text padding issue
[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         public static readonly BindableProperty StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
38         {
39             var view = (View)bindable;
40             if (newValue != null)
41             {
42                 string styleName = (string)newValue;
43
44                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.StyleName, styleName);
45
46                 view.styleName = styleName;
47
48                 if (string.IsNullOrEmpty(styleName)) return;
49
50                 var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
51
52                 if (style == null) return;
53
54                 view.ApplyStyle(style);
55                 view.SetThemeApplied();
56             }
57         }),
58         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
59         {
60             var view = (View)bindable;
61
62             if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
63
64             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.StyleName);
65         }));
66
67         /// <summary>
68         /// KeyInputFocusProperty
69         /// </summary>
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
72         {
73             var view = (View)bindable;
74             if (newValue != null)
75             {
76                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus, (bool)newValue);
77             }
78         }),
79         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
80         {
81             var view = (View)bindable;
82             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.KeyInputFocus);
83         }));
84
85         /// <summary>
86         /// BackgroundColorProperty
87         /// </summary>
88         [EditorBrowsable(EditorBrowsableState.Never)]
89         public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
90             propertyChanged: (bindable, oldValue, newValue) =>
91             {
92                 var view = (View)bindable;
93
94                 view.themeData?.selectorData?.ClearBackground(view);
95
96                 if (newValue is Selector<Color> selector)
97                 {
98                     if (selector.HasAll()) view.SetBackgroundColor(selector.All);
99                     else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
100                 }
101                 else
102                 {
103                     view.SetBackgroundColor((Color)newValue);
104                 }
105             },
106             defaultValueCreator: (bindable) =>
107             {
108                 var view = (View)bindable;
109
110                 if (view.internalBackgroundColor == null)
111                 {
112                     view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0);
113                 }
114
115                 int visualType = (int)Visual.Type.Invalid;
116                 Interop.View.InternalRetrievingVisualPropertyInt(view.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType);
117                 if (visualType == (int)Visual.Type.Color)
118                 {
119                     Interop.View.InternalRetrievingVisualPropertyVector4(view.SwigCPtr, Property.BACKGROUND, ColorVisualProperty.MixColor, Color.getCPtr(view.internalBackgroundColor));
120                 }
121                 return view.internalBackgroundColor;
122             }
123         );
124
125         /// <summary>
126         /// ColorProperty
127         /// </summary>
128         [EditorBrowsable(EditorBrowsableState.Never)]
129         public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
130             propertyChanged: (bindable, oldValue, newValue) =>
131             {
132                 var view = (View)bindable;
133
134                 view.themeData?.selectorData?.Color?.Reset(view);
135
136                 if (newValue is Selector<Color> selector)
137                 {
138                     if (selector.HasAll()) view.SetColor(selector.All);
139                     else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
140                 }
141                 else
142                 {
143                     view.SetColor((Color)newValue);
144                 }
145             },
146             defaultValueCreator: (bindable) =>
147             {
148                 var view = (View)bindable;
149
150                 if (view.internalColor == null)
151                 {
152                     view.internalColor = new Color(view.OnColorChanged, 0, 0, 0, 0);
153                 }
154                 Object.InternalRetrievingPropertyVector4(view.SwigCPtr, View.Property.COLOR, view.internalColor.SwigCPtr);
155                 return view.internalColor;
156             }
157         );
158
159         /// <summary>
160         /// ColorRedProperty
161         /// </summary>
162         [EditorBrowsable(EditorBrowsableState.Never)]
163         public static readonly BindableProperty ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
164             propertyChanged: (bindable, oldValue, newValue) =>
165             {
166                 var view = (View)bindable;
167                 view.SetColorRed((float?)newValue);
168             },
169             defaultValueCreator: (bindable) =>
170             {
171                 var view = (View)bindable;
172
173                 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorRed);
174             }
175         );
176
177         /// <summary>
178         /// ColorGreenProperty
179         /// </summary>
180         [EditorBrowsable(EditorBrowsableState.Never)]
181         public static readonly BindableProperty ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
182             propertyChanged: (bindable, oldValue, newValue) =>
183             {
184                 var view = (View)bindable;
185                 view.SetColorGreen((float?)newValue);
186             },
187             defaultValueCreator: (bindable) =>
188             {
189                 var view = (View)bindable;
190
191                 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorGreen);
192             }
193         );
194
195         /// <summary>
196         /// ColorBlueProperty
197         /// </summary>
198         [EditorBrowsable(EditorBrowsableState.Never)]
199         public static readonly BindableProperty ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
200             propertyChanged: (bindable, oldValue, newValue) =>
201             {
202                 var view = (View)bindable;
203                 view.SetColorBlue((float?)newValue);
204             },
205             defaultValueCreator: (bindable) =>
206             {
207                 var view = (View)bindable;
208
209                 return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ColorBlue);
210             }
211         );
212
213         /// <summary> BackgroundImageProperty </summary>
214         [EditorBrowsable(EditorBrowsableState.Never)]
215         public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
216             propertyChanged: (bindable, oldValue, newValue) =>
217             {
218                 var view = (View)bindable;
219
220                 if (view.themeData?.selectorData != null)
221                 {
222                     view.themeData.selectorData.BackgroundColor?.Reset(view);
223                     view.themeData.selectorData.BackgroundImage?.Reset(view);
224                 }
225
226                 if (newValue is Selector<string> selector)
227                 {
228                     if (selector.HasAll()) view.SetBackgroundImage(selector.All);
229                     else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
230                 }
231                 else
232                 {
233                     view.SetBackgroundImage((string)newValue);
234                 }
235             },
236             defaultValueCreator: (bindable) =>
237             {
238                 var view = (View)bindable;
239                 string backgroundImage = "";
240
241                 Interop.View.InternalRetrievingVisualPropertyString(view.SwigCPtr, Property.BACKGROUND, ImageVisualProperty.URL, out backgroundImage);
242
243                 return backgroundImage;
244             }
245         );
246
247
248         /// <summary>BackgroundImageBorderProperty</summary>
249         [EditorBrowsable(EditorBrowsableState.Never)]
250         public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
251         {
252             var view = (View)bindable;
253
254             view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
255
256             if (newValue is Selector<Rectangle> selector)
257             {
258                 if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
259                 else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
260             }
261             else
262             {
263                 view.SetBackgroundImageBorder((Rectangle)newValue);
264             }
265         }),
266         defaultValueCreator: (bindable) =>
267         {
268             var view = (View)bindable;
269
270             return view.backgroundExtraData?.BackgroundImageBorder;
271         });
272
273         /// <summary>
274         /// BackgroundProperty
275         /// </summary>
276         [EditorBrowsable(EditorBrowsableState.Never)]
277         public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
278             propertyChanged: (bindable, oldValue, newValue) =>
279             {
280                 var view = (View)bindable;
281                 if (newValue != null)
282                 {
283                     var propertyValue = new PropertyValue((PropertyMap)newValue);
284                     Object.SetProperty(view.SwigCPtr, Property.BACKGROUND, propertyValue);
285
286                     view.backgroundExtraData = null;
287
288                     propertyValue.Dispose();
289                     propertyValue = null;
290                 }
291             },
292             defaultValueCreator: (bindable) =>
293             {
294                 var view = (View)bindable;
295                 PropertyMap tmp = new PropertyMap();
296                 var propertyValue = Object.GetProperty(view.SwigCPtr, Property.BACKGROUND);
297                 propertyValue.Get(tmp);
298                 propertyValue.Dispose();
299                 propertyValue = null;
300                 return tmp;
301             }
302         );
303
304         /// <summary>
305         /// StateProperty
306         /// </summary>
307         [EditorBrowsable(EditorBrowsableState.Never)]
308         public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
309         {
310             var view = (View)bindable;
311             if (newValue != null)
312             {
313                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.STATE, (int)newValue);
314             }
315         }),
316         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
317         {
318             var view = (View)bindable;
319             int temp = 0;
320             temp = Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.STATE);
321             switch (temp)
322             {
323                 case 0: return States.Normal;
324                 case 1: return States.Focused;
325                 case 2: return States.Disabled;
326                 default: return States.Normal;
327             }
328         }));
329
330         /// <summary>
331         /// SubStateProperty
332         /// </summary>
333         [EditorBrowsable(EditorBrowsableState.Never)]
334         public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
335         {
336             var view = (View)bindable;
337             string valueToString = "";
338             if (newValue != null)
339             {
340                 valueToString = ((States)newValue).GetDescription();
341                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SubState, valueToString);
342             }
343         }),
344         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
345         {
346             var view = (View)bindable;
347             string temp;
348             temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.SubState);
349             return temp.GetValueByDescription<States>();
350         }));
351
352         /// <summary>
353         /// TooltipProperty
354         /// </summary>
355         [EditorBrowsable(EditorBrowsableState.Never)]
356         public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
357         {
358             var view = (View)bindable;
359             if (newValue != null)
360             {
361                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
362             }
363         }),
364         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
365         {
366             var view = (View)bindable;
367             Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
368             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
369             return temp;
370         }));
371
372         /// <summary>
373         /// FlexProperty
374         /// </summary>
375         [EditorBrowsable(EditorBrowsableState.Never)]
376         public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
377         {
378             var view = (View)bindable;
379             if (newValue != null)
380             {
381                 Object.InternalSetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX, (float)newValue);
382             }
383         }),
384         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
385         {
386             var view = (View)bindable;
387             return Object.InternalGetPropertyFloat(view.SwigCPtr, FlexContainer.ChildProperty.FLEX);
388         }));
389
390         /// <summary>
391         /// AlignSelfProperty
392         /// </summary>
393         [EditorBrowsable(EditorBrowsableState.Never)]
394         public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
395         {
396             var view = (View)bindable;
397             if (newValue != null)
398             {
399                 Object.InternalSetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, (int)newValue);
400             }
401         }),
402         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
403         {
404             var view = (View)bindable;
405             return Object.InternalGetPropertyInt(view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf);
406         }));
407
408         /// <summary>
409         /// FlexMarginProperty
410         /// </summary>
411         [EditorBrowsable(EditorBrowsableState.Never)]
412         public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
413         {
414             var view = (View)bindable;
415             if (newValue != null)
416             {
417                 Object.InternalSetPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, ((Vector4)newValue).SwigCPtr);
418             }
419         }),
420         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
421         {
422             var view = (View)bindable;
423             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
424             Object.InternalRetrievingPropertyVector4(view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, temp.SwigCPtr);
425             return temp;
426         }));
427
428         /// <summary>
429         /// CellIndexProperty
430         /// </summary>
431         [EditorBrowsable(EditorBrowsableState.Never)]
432         public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
433             propertyChanged: (bindable, oldValue, newValue) =>
434             {
435                 var view = (View)bindable;
436                 if (newValue != null)
437                 {
438                     Object.InternalSetPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, ((Vector2)newValue).SwigCPtr);
439                 }
440             },
441             defaultValueCreator: (bindable) =>
442             {
443                 var view = (View)bindable;
444                 if (view.internalCellIndex == null)
445                 {
446                     view.internalCellIndex = new Vector2(view.OnCellIndexChanged, 0, 0);
447                 }
448                 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, TableView.ChildProperty.CellIndex, view.internalCellIndex.SwigCPtr);
449                 return view.internalCellIndex;
450             }
451         );
452
453         /// <summary>
454         /// RowSpanProperty
455         /// </summary>
456         [EditorBrowsable(EditorBrowsableState.Never)]
457         public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
458         {
459             var view = (View)bindable;
460             if (newValue != null)
461             {
462                 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan, (float)newValue);
463             }
464         }),
465         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
466         {
467             var view = (View)bindable;
468             return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.RowSpan);
469         }));
470
471         /// <summary>
472         /// ColumnSpanProperty
473         /// </summary>
474         [EditorBrowsable(EditorBrowsableState.Never)]
475         public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
476         {
477             var view = (View)bindable;
478             if (newValue != null)
479             {
480                 Object.InternalSetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan, (float)newValue);
481             }
482         }),
483         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
484         {
485             var view = (View)bindable;
486             return Object.InternalGetPropertyFloat(view.SwigCPtr, TableView.ChildProperty.ColumnSpan);
487         }));
488
489         /// <summary>
490         /// CellHorizontalAlignmentProperty
491         /// </summary>
492         [EditorBrowsable(EditorBrowsableState.Never)]
493         public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
494         {
495             var view = (View)bindable;
496             string valueToString = "";
497
498             if (newValue != null)
499             {
500                 valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
501                 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, valueToString);
502             }
503         }),
504         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
505         {
506             var view = (View)bindable;
507             string temp;
508             temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment);
509             return temp.GetValueByDescription<HorizontalAlignmentType>();
510         }));
511
512         /// <summary>
513         /// CellVerticalAlignmentProperty
514         /// </summary>
515         [EditorBrowsable(EditorBrowsableState.Never)]
516         public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
517         {
518             var view = (View)bindable;
519             string valueToString = "";
520
521             if (newValue != null)
522             {
523                 valueToString = ((VerticalAlignmentType)newValue).GetDescription();
524                 Object.InternalSetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, valueToString);
525             }
526         }),
527         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
528         {
529             var view = (View)bindable;
530             string temp;
531             temp = Object.InternalGetPropertyString(view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment);
532             return temp.GetValueByDescription<VerticalAlignmentType>();
533         }));
534
535         /// <summary>
536         /// "DO not use this, that will be deprecated. Use 'View Weight' instead of BindableProperty"
537         /// This needs to be hidden as inhouse API until all applications using it have been updated.  Do not make public.
538         /// </summary>
539         [EditorBrowsable(EditorBrowsableState.Never)]
540         public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
541         {
542             var view = (View)bindable;
543             if (newValue != null)
544             {
545                 view.Weight = (float)newValue;
546             }
547         },
548
549         defaultValueCreator: (bindable) =>
550         {
551             var view = (View)bindable;
552             return view.Weight;
553         });
554
555         /// <summary>
556         /// LeftFocusableViewProperty
557         /// </summary>
558         [EditorBrowsable(EditorBrowsableState.Never)]
559         public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
560         {
561             var view = (View)bindable;
562             if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
563             else { view.LeftFocusableViewId = -1; }
564         },
565         defaultValueCreator: (bindable) =>
566         {
567             var view = (View)bindable;
568             if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
569             return null;
570         });
571
572         /// <summary>
573         /// RightFocusableViewProperty
574         /// </summary>
575         [EditorBrowsable(EditorBrowsableState.Never)]
576         public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
577         {
578             var view = (View)bindable;
579             if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
580             else { view.RightFocusableViewId = -1; }
581         },
582         defaultValueCreator: (bindable) =>
583         {
584             var view = (View)bindable;
585             if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
586             return null;
587         });
588
589         /// <summary>
590         /// UpFocusableViewProperty
591         /// </summary>
592         [EditorBrowsable(EditorBrowsableState.Never)]
593         public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
594         {
595             var view = (View)bindable;
596             if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
597             else { view.UpFocusableViewId = -1; }
598         },
599         defaultValueCreator: (bindable) =>
600         {
601             var view = (View)bindable;
602             if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
603             return null;
604         });
605
606         /// <summary>
607         /// DownFocusableViewProperty
608         /// </summary>
609         [EditorBrowsable(EditorBrowsableState.Never)]
610         public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
611         {
612             var view = (View)bindable;
613             if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
614             else { view.DownFocusableViewId = -1; }
615         },
616         defaultValueCreator: (bindable) =>
617         {
618             var view = (View)bindable;
619             if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
620             return null;
621         });
622
623         /// <summary>
624         /// ClockwiseFocusableViewProperty
625         /// </summary>
626         [EditorBrowsable(EditorBrowsableState.Never)]
627         public static readonly BindableProperty ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
628         {
629             var view = (View)bindable;
630             if (newValue != null && (newValue is View)) { view.ClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
631             else { view.ClockwiseFocusableViewId = -1; }
632         },
633         defaultValueCreator: (bindable) =>
634         {
635             var view = (View)bindable;
636             if (view.ClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.ClockwiseFocusableViewId); }
637             return null;
638         });
639
640         /// <summary>
641         /// CounterClockwiseFocusableViewProperty
642         /// </summary>
643         [EditorBrowsable(EditorBrowsableState.Never)]
644         public static readonly BindableProperty CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
645         {
646             var view = (View)bindable;
647             if (newValue != null && (newValue is View)) { view.CounterClockwiseFocusableViewId = (int)(newValue as View)?.GetId(); }
648             else { view.CounterClockwiseFocusableViewId = -1; }
649         },
650         defaultValueCreator: (bindable) =>
651         {
652             var view = (View)bindable;
653             if (view.CounterClockwiseFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.CounterClockwiseFocusableViewId); }
654             return null;
655         });
656
657         /// <summary>
658         /// FocusableProperty
659         /// </summary>
660         [EditorBrowsable(EditorBrowsableState.Never)]
661         public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
662         {
663             var view = (View)bindable;
664             if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
665         },
666         defaultValueCreator: (bindable) =>
667         {
668             var view = (View)bindable;
669             return view.IsKeyboardFocusable();
670         });
671
672         /// <summary>
673         /// FocusableChildrenProperty
674         /// </summary>
675         [EditorBrowsable(EditorBrowsableState.Never)]
676         public static readonly BindableProperty FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
677         {
678             var view = (View)bindable;
679             if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
680         },
681         defaultValueCreator: (bindable) =>
682         {
683             var view = (View)bindable;
684             return view.AreChildrenKeyBoardFocusable();
685         });
686
687         /// <summary>
688         /// FocusableInTouchProperty
689         /// </summary>
690         [EditorBrowsable(EditorBrowsableState.Never)]
691         public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
692         {
693             var view = (View)bindable;
694             if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
695         },
696         defaultValueCreator: (bindable) =>
697         {
698             var view = (View)bindable;
699             return view.IsFocusableInTouch();
700         });
701
702         /// <summary>
703         /// Size2DProperty
704         /// </summary>
705         [EditorBrowsable(EditorBrowsableState.Never)]
706         public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
707             propertyChanged: (bindable, oldValue, newValue) =>
708             {
709                 var view = (View)bindable;
710                 if (newValue != null)
711                 {
712                     // Size property setter is only used by user.
713                     // Framework code uses SetSize() instead of Size property setter.
714                     // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
715                     // SuggestedMinimumWidth/Height is used by Layout calculation.
716                     view.userSizeWidth = ((Size2D)newValue).Width;
717                     view.userSizeHeight = ((Size2D)newValue).Height;
718
719                     Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, ((Size2D)newValue).SwigCPtr);
720
721                     view.widthPolicy = ((Size2D)newValue).Width;
722                     view.heightPolicy = ((Size2D)newValue).Height;
723
724                     view.layout?.RequestLayout();
725                 }
726             },
727             defaultValueCreator: (bindable) =>
728             {
729                 var view = (View)bindable;
730                 if (view.internalSize2D == null)
731                 {
732                     view.internalSize2D = new Size2D(view.OnSize2DChanged, 0, 0);
733                 }
734                 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize2D.SwigCPtr);
735
736                 return view.internalSize2D;
737             }
738         );
739
740         /// <summary>
741         /// OpacityProperty
742         /// </summary>
743         [EditorBrowsable(EditorBrowsableState.Never)]
744         public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
745         {
746             var view = (View)bindable;
747
748             view.themeData?.selectorData?.Opacity?.Reset(view);
749
750             if (newValue is Selector<float?> selector)
751             {
752                 if (selector.HasAll()) view.SetOpacity(selector.All);
753                 else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
754             }
755             else
756             {
757                 view.SetOpacity((float?)newValue);
758             }
759         }),
760         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
761         {
762             var view = (View)bindable;
763             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.OPACITY);
764         }));
765
766         /// <summary>
767         /// Position2DProperty
768         /// </summary>
769         [EditorBrowsable(EditorBrowsableState.Never)]
770         public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
771             propertyChanged: (bindable, oldValue, newValue) =>
772             {
773                 var view = (View)bindable;
774                 if (newValue != null)
775                 {
776                     Object.InternalSetPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, ((Position2D)newValue).SwigCPtr);
777                 }
778             },
779             defaultValueCreator: (bindable) =>
780             {
781                 var view = (View)bindable;
782                 if (view.internalPosition2D == null)
783                 {
784                     view.internalPosition2D = new Position2D(view.OnPosition2DChanged, 0, 0);
785                 }
786                 Object.InternalRetrievingPropertyVector2ActualVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition2D.SwigCPtr);
787                 return view.internalPosition2D;
788             }
789         );
790
791         /// <summary>
792         /// PositionUsesPivotPointProperty
793         /// </summary>
794         [EditorBrowsable(EditorBrowsableState.Never)]
795         public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
796         {
797             var view = (View)bindable;
798             if (newValue != null)
799             {
800                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint, (bool)newValue);
801             }
802         }),
803         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
804         {
805             var view = (View)bindable;
806             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.PositionUsesAnchorPoint);
807         }));
808
809         /// <summary>
810         /// SiblingOrderProperty
811         /// </summary>
812         [EditorBrowsable(EditorBrowsableState.Never)]
813         public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
814         {
815             var view = (View)bindable;
816             int value;
817             if (newValue != null)
818             {
819                 value = (int)newValue;
820                 if (value < 0)
821                 {
822                     NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
823                     return;
824                 }
825                 var siblings = view.GetParent()?.Children;
826                 if (siblings != null)
827                 {
828                     int currentOrder = siblings.IndexOf(view);
829                     if (value != currentOrder)
830                     {
831                         if (value == 0) { view.LowerToBottom(); }
832                         else if (value < siblings.Count - 1)
833                         {
834                             if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
835                             else { view.LowerBelow(siblings[value]); }
836                         }
837                         else { view.RaiseToTop(); }
838                     }
839                 }
840             }
841         },
842         defaultValueCreator: (bindable) =>
843         {
844             var view = (View)bindable;
845             var parentChildren = view.GetParent()?.Children;
846             int currentOrder = 0;
847             if (parentChildren != null)
848             {
849                 currentOrder = parentChildren.IndexOf(view);
850
851                 if (currentOrder < 0) { return 0; }
852                 else if (currentOrder < parentChildren.Count) { return currentOrder; }
853             }
854
855             return 0;
856         });
857
858         /// <summary>
859         /// ParentOriginProperty
860         /// </summary>
861         [EditorBrowsable(EditorBrowsableState.Never)]
862         public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
863         {
864             var view = (View)bindable;
865             if (newValue != null)
866             {
867                 Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, ((Position)newValue).SwigCPtr);
868             }
869         }),
870         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
871         {
872             var view = (View)bindable;
873             Position temp = new Position(0.0f, 0.0f, 0.0f);
874             Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.ParentOrigin, temp.SwigCPtr);
875             return temp;
876         })
877         );
878
879         /// <summary>
880         /// PivotPointProperty
881         /// </summary>
882         [EditorBrowsable(EditorBrowsableState.Never)]
883         public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
884             propertyChanged: (bindable, oldValue, newValue) =>
885             {
886                 var view = (View)bindable;
887                 if (newValue != null)
888                 {
889                     view.SetAnchorPoint((Position)newValue);
890                 }
891             },
892             defaultValueCreator: (bindable) =>
893             {
894                 var view = (View)bindable;
895                 if (view.internalPivotPoint == null)
896                 {
897                     view.internalPivotPoint = new Position(view.OnPivotPointChanged, 0, 0, 0);
898                 }
899                 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.AnchorPoint, view.internalPivotPoint.SwigCPtr);
900                 return view.internalPivotPoint;
901             }
902         );
903
904         /// <summary>
905         /// SizeWidthProperty
906         /// </summary>
907         [EditorBrowsable(EditorBrowsableState.Never)]
908         public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
909         {
910             var view = (View)bindable;
911             if (newValue != null)
912             {
913                 // Size property setter is only used by user.
914                 // Framework code uses SetSize() instead of Size property setter.
915                 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
916                 // SuggestedMinimumWidth/Height is used by Layout calculation.
917                 view.userSizeWidth = (float)newValue;
918                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth, (float)newValue);
919                 view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
920             }
921         }),
922         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
923         {
924             var view = (View)bindable;
925             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeWidth);
926         }));
927
928         /// <summary>
929         /// SizeHeightProperty
930         /// </summary>
931         [EditorBrowsable(EditorBrowsableState.Never)]
932         public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
933         {
934             var view = (View)bindable;
935             if (newValue != null)
936             {
937                 // Size property setter is only used by user.
938                 // Framework code uses SetSize() instead of Size property setter.
939                 // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
940                 // SuggestedMinimumWidth/Height is used by Layout calculation.
941                 view.userSizeHeight = (float)newValue;
942                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight, (float)newValue);
943                 view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
944             }
945         }),
946         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
947         {
948             var view = (View)bindable;
949             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.SizeHeight);
950         }));
951
952         /// <summary>
953         /// PositionProperty
954         /// </summary>
955         [EditorBrowsable(EditorBrowsableState.Never)]
956         public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
957             propertyChanged: (bindable, oldValue, newValue) =>
958             {
959                 var view = (View)bindable;
960                 if (newValue != null)
961                 {
962                     Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.POSITION, ((Position)newValue).SwigCPtr);
963                 }
964             },
965             defaultValueCreator: (bindable) =>
966             {
967                 var view = (View)bindable;
968                 if (view.internalPosition == null)
969                 {
970                     view.internalPosition = new Position(view.OnPositionChanged, 0, 0, 0);
971                 }
972                 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.POSITION, view.internalPosition.SwigCPtr);
973                 return view.internalPosition;
974             }
975         );
976
977         /// <summary>
978         /// PositionXProperty
979         /// </summary>
980         [EditorBrowsable(EditorBrowsableState.Never)]
981         public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
982         {
983             var view = (View)bindable;
984             if (newValue != null)
985             {
986                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionX, (float)newValue);
987             }
988         }),
989         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
990         {
991             var view = (View)bindable;
992             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionX);
993         }));
994
995         /// <summary>
996         /// PositionYProperty
997         /// </summary>
998         [EditorBrowsable(EditorBrowsableState.Never)]
999         public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1000         {
1001             var view = (View)bindable;
1002             if (newValue != null)
1003             {
1004                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionY, (float)newValue);
1005             }
1006         }),
1007         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1008         {
1009             var view = (View)bindable;
1010             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionY);
1011         }));
1012
1013         /// <summary>
1014         /// PositionZProperty
1015         /// </summary>
1016         [EditorBrowsable(EditorBrowsableState.Never)]
1017         public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1018         {
1019             var view = (View)bindable;
1020             if (newValue != null)
1021             {
1022                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.PositionZ, (float)newValue);
1023             }
1024         }),
1025         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1026         {
1027             var view = (View)bindable;
1028             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.PositionZ);
1029         }));
1030
1031         /// <summary>
1032         /// OrientationProperty
1033         /// </summary>
1034         [EditorBrowsable(EditorBrowsableState.Never)]
1035         public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1036         {
1037             var view = (View)bindable;
1038             if (newValue != null)
1039             {
1040                 Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
1041             }
1042         }),
1043         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1044         {
1045             var view = (View)bindable;
1046             Rotation temp = new Rotation();
1047             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
1048             return temp;
1049         }));
1050
1051         /// <summary>
1052         /// ScaleProperty
1053         /// </summary>
1054         [EditorBrowsable(EditorBrowsableState.Never)]
1055         public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
1056             propertyChanged: (bindable, oldValue, newValue) =>
1057             {
1058                 var view = (View)bindable;
1059                 if (newValue != null)
1060                 {
1061                     view.SetScale((Vector3)newValue);
1062                 }
1063             },
1064             defaultValueCreator: (bindable) =>
1065             {
1066                 var view = (View)bindable;
1067                 if (view.internalScale == null)
1068                 {
1069                     view.internalScale = new Vector3(view.OnScaleChanged, 0, 0, 0);
1070                 }
1071                 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SCALE, view.internalScale.SwigCPtr);
1072                 return view.internalScale;
1073             }
1074         );
1075
1076         /// <summary>
1077         /// ScaleXProperty
1078         /// </summary>
1079         [EditorBrowsable(EditorBrowsableState.Never)]
1080         public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1081         {
1082             var view = (View)bindable;
1083             if (newValue != null)
1084             {
1085                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleX, (float)newValue);
1086             }
1087         }),
1088         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1089         {
1090             var view = (View)bindable;
1091             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleX);
1092         }));
1093
1094         /// <summary>
1095         /// ScaleYProperty
1096         /// </summary>
1097         [EditorBrowsable(EditorBrowsableState.Never)]
1098         public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1099         {
1100             var view = (View)bindable;
1101             if (newValue != null)
1102             {
1103                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleY, (float)newValue);
1104             }
1105         }),
1106         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1107         {
1108             var view = (View)bindable;
1109             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleY);
1110         }));
1111
1112         /// <summary>
1113         /// ScaleZProperty
1114         /// </summary>
1115         [EditorBrowsable(EditorBrowsableState.Never)]
1116         public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1117         {
1118             var view = (View)bindable;
1119             if (newValue != null)
1120             {
1121                 Object.InternalSetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ, (float)newValue);
1122             }
1123         }),
1124         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1125         {
1126             var view = (View)bindable;
1127             return Object.InternalGetPropertyFloat(view.SwigCPtr, View.Property.ScaleZ);
1128         }));
1129
1130         /// <summary>
1131         /// NameProperty
1132         /// </summary>
1133         [EditorBrowsable(EditorBrowsableState.Never)]
1134         public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
1135             propertyChanged: (bindable, oldValue, newValue) =>
1136             {
1137                 var view = (View)bindable;
1138                 if (newValue != null)
1139                 {
1140                     view.internalName = (string)newValue;
1141                     Object.InternalSetPropertyString(view.SwigCPtr, View.Property.NAME, (string)newValue);
1142                 }
1143             },
1144             defaultValueCreator: (bindable) =>
1145             {
1146                 var view = (View)bindable;
1147                 return view.internalName;
1148             }
1149         );
1150
1151         /// <summary>
1152         /// SensitiveProperty
1153         /// </summary>
1154         [EditorBrowsable(EditorBrowsableState.Never)]
1155         public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1156         {
1157             var view = (View)bindable;
1158             if (newValue != null)
1159             {
1160                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE, (bool)newValue);
1161             }
1162         }),
1163         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1164         {
1165             var view = (View)bindable;
1166             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.SENSITIVE);
1167         }));
1168
1169         /// <summary>
1170         /// IsEnabledProperty
1171         /// </summary>
1172         [EditorBrowsable(EditorBrowsableState.Never)]
1173         public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1174         {
1175             var view = (View)bindable;
1176             if (newValue != null)
1177             {
1178                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled, (bool)newValue);
1179                 view.OnEnabled((bool)newValue);
1180             }
1181         }),
1182         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1183         {
1184             var view = (View)bindable;
1185             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.UserInteractionEnabled);
1186         }));
1187
1188         /// <summary>
1189         /// DispatchKeyEventsProperty
1190         /// </summary>
1191         [EditorBrowsable(EditorBrowsableState.Never)]
1192         public static readonly BindableProperty DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1193         {
1194             var view = (View)bindable;
1195             if (newValue != null)
1196             {
1197                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents, (bool)newValue);
1198             }
1199         }),
1200         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1201         {
1202             var view = (View)bindable;
1203             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.DispatchKeyEvents);
1204         }));
1205
1206         /// <summary>
1207         /// LeaveRequiredProperty
1208         /// </summary>
1209         [EditorBrowsable(EditorBrowsableState.Never)]
1210         public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1211         {
1212             var view = (View)bindable;
1213             if (newValue != null)
1214             {
1215                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired, (bool)newValue);
1216             }
1217         }),
1218         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1219         {
1220             var view = (View)bindable;
1221             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.LeaveRequired);
1222         }));
1223
1224         /// <summary>
1225         /// InheritOrientationProperty
1226         /// </summary>
1227         [EditorBrowsable(EditorBrowsableState.Never)]
1228         public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1229         {
1230             var view = (View)bindable;
1231             if (newValue != null)
1232             {
1233                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation, (bool)newValue);
1234             }
1235         }),
1236         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1237         {
1238             var view = (View)bindable;
1239             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritOrientation);
1240         }));
1241
1242         /// <summary>
1243         /// InheritScaleProperty
1244         /// </summary>
1245         [EditorBrowsable(EditorBrowsableState.Never)]
1246         public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1247         {
1248             var view = (View)bindable;
1249             if (newValue != null)
1250             {
1251                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritScale, (bool)newValue);
1252             }
1253         }),
1254         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1255         {
1256             var view = (View)bindable;
1257             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritScale);
1258         }));
1259
1260         /// <summary>
1261         /// DrawModeProperty
1262         /// </summary>
1263         [EditorBrowsable(EditorBrowsableState.Never)]
1264         public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1265         {
1266             var view = (View)bindable;
1267             if (newValue != null)
1268             {
1269                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.DrawMode, (int)newValue);
1270             }
1271         }),
1272         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1273         {
1274             var view = (View)bindable;
1275             return (DrawModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.DrawMode);
1276         }));
1277
1278         /// <summary>
1279         /// SizeModeFactorProperty
1280         /// </summary>
1281         [EditorBrowsable(EditorBrowsableState.Never)]
1282         public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
1283             propertyChanged: (bindable, oldValue, newValue) =>
1284             {
1285                 var view = (View)bindable;
1286                 if (newValue != null)
1287                 {
1288                     Object.InternalSetPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, ((Vector3)newValue).SwigCPtr);
1289                 }
1290             },
1291             defaultValueCreator: (bindable) =>
1292             {
1293                 var view = (View)bindable;
1294                 if (view.internalSizeModeFactor == null)
1295                 {
1296                     view.internalSizeModeFactor = new Vector3(view.OnSizeModeFactorChanged, 0, 0, 0);
1297                 }
1298                 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SizeModeFactor, view.internalSizeModeFactor.SwigCPtr);
1299                 return view.internalSizeModeFactor;
1300             }
1301         );
1302
1303         /// <summary>
1304         /// WidthResizePolicyProperty
1305         /// </summary>
1306         [EditorBrowsable(EditorBrowsableState.Never)]
1307         public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1308         {
1309             var view = (View)bindable;
1310             if (newValue != null)
1311             {
1312                 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1313                 {
1314                     if (view.widthConstraint == null)
1315                     {
1316                         view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
1317                         view.widthConstraint.Apply();
1318                     }
1319                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)ResizePolicyType.FillToParent);
1320                 }
1321                 else
1322                 {
1323                     view.widthConstraint?.Remove();
1324                     view.widthConstraint?.Dispose();
1325                     view.widthConstraint = null;
1326
1327                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.WidthResizePolicy, (int)newValue);
1328                 }
1329                 // Match ResizePolicy to new Layouting.
1330                 // Parent relative policies can not be mapped at this point as parent size unknown.
1331                 switch ((ResizePolicyType)newValue)
1332                 {
1333                     case ResizePolicyType.UseNaturalSize:
1334                         {
1335                             view.WidthSpecification = LayoutParamPolicies.WrapContent;
1336                             break;
1337                         }
1338                     case ResizePolicyType.FillToParent:
1339                         {
1340                             view.WidthSpecification = LayoutParamPolicies.MatchParent;
1341                             break;
1342                         }
1343                     case ResizePolicyType.FitToChildren:
1344                         {
1345                             view.WidthSpecification = LayoutParamPolicies.WrapContent;
1346                             break;
1347                         }
1348                     default:
1349                         break;
1350                 }
1351             }
1352         }),
1353         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1354         {
1355             var view = (View)bindable;
1356             string temp;
1357
1358             temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.WidthResizePolicy);
1359             return temp.GetValueByDescription<ResizePolicyType>();
1360         }));
1361
1362         /// <summary>
1363         /// HeightResizePolicyProperty
1364         /// </summary>
1365         [EditorBrowsable(EditorBrowsableState.Never)]
1366         public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1367         {
1368             var view = (View)bindable;
1369             if (newValue != null)
1370             {
1371                 if ((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
1372                 {
1373                     if (view.heightConstraint == null)
1374                     {
1375                         view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
1376                         view.heightConstraint.Apply();
1377                     }
1378
1379                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)ResizePolicyType.FillToParent);
1380                 }
1381                 else
1382                 {
1383                     view.heightConstraint?.Remove();
1384                     view.heightConstraint?.Dispose();
1385                     view.heightConstraint = null;
1386
1387                     Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.HeightResizePolicy, (int)newValue);
1388                 }
1389                 // Match ResizePolicy to new Layouting.
1390                 // Parent relative policies can not be mapped at this point as parent size unknown.
1391                 switch ((ResizePolicyType)newValue)
1392                 {
1393                     case ResizePolicyType.UseNaturalSize:
1394                         {
1395                             view.HeightSpecification = LayoutParamPolicies.WrapContent;
1396                             break;
1397                         }
1398                     case ResizePolicyType.FillToParent:
1399                         {
1400                             view.HeightSpecification = LayoutParamPolicies.MatchParent;
1401                             break;
1402                         }
1403                     case ResizePolicyType.FitToChildren:
1404                         {
1405                             view.HeightSpecification = LayoutParamPolicies.WrapContent;
1406                             break;
1407                         }
1408                     default:
1409                         break;
1410                 }
1411             }
1412         }),
1413         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1414         {
1415             var view = (View)bindable;
1416             string temp;
1417
1418             temp = Object.InternalGetPropertyString(view.SwigCPtr, View.Property.HeightResizePolicy);
1419             return temp.GetValueByDescription<ResizePolicyType>();
1420         }));
1421
1422         /// <summary>
1423         /// SizeScalePolicyProperty
1424         /// </summary>
1425         [EditorBrowsable(EditorBrowsableState.Never)]
1426         public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1427         {
1428             var view = (View)bindable;
1429             string valueToString = "";
1430             if (newValue != null)
1431             {
1432                 valueToString = ((SizeScalePolicyType)newValue).GetDescription();
1433
1434                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.SizeScalePolicy, valueToString);
1435             }
1436         }),
1437         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1438         {
1439             var view = (View)bindable;
1440
1441             return (SizeScalePolicyType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.SizeScalePolicy);
1442         }));
1443
1444         /// <summary>
1445         /// WidthForHeightProperty
1446         /// </summary>
1447         [EditorBrowsable(EditorBrowsableState.Never)]
1448         public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1449         {
1450             var view = (View)bindable;
1451             if (newValue != null)
1452             {
1453                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight, (bool)newValue);
1454             }
1455         }),
1456         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1457         {
1458             var view = (View)bindable;
1459
1460             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.WidthForHeight);
1461         }));
1462
1463         /// <summary>
1464         /// HeightForWidthProperty
1465         /// </summary>
1466         [EditorBrowsable(EditorBrowsableState.Never)]
1467         public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1468         {
1469             var view = (View)bindable;
1470             if (newValue != null)
1471             {
1472
1473                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth, (bool)newValue);
1474             }
1475         }),
1476         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1477         {
1478             var view = (View)bindable;
1479
1480             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.HeightForWidth);
1481         }));
1482
1483         /// <summary>
1484         /// PaddingProperty
1485         /// </summary>
1486         [EditorBrowsable(EditorBrowsableState.Never)]
1487         public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
1488             propertyChanged: (bindable, oldValue, newValue) =>
1489             {
1490                 var view = (View)bindable;
1491                 if (newValue != null)
1492                 {
1493                     if (view.Layout != null)
1494                     {
1495                         view.Layout.Padding = new Extents((Extents)newValue);
1496                         if ((view.Padding.Start != 0) || (view.Padding.End != 0) || (view.Padding.Top != 0) || (view.Padding.Bottom != 0))
1497                         {
1498                             var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1499                             Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1500                             tmp?.Dispose();
1501                         }
1502                         view.Layout.RequestLayout();
1503                     }
1504                     else
1505                     {
1506                         var tmp = new PropertyValue((Extents)newValue);
1507                         Object.SetProperty(view.SwigCPtr, Property.PADDING, tmp);
1508                         tmp?.Dispose();
1509                     }
1510                 }
1511             },
1512             defaultValueCreator: (bindable) =>
1513             {
1514                 var view = (View)bindable;
1515                 if ((view.internalPadding == null) || (view.Layout != null))
1516                 {
1517                     ushort start = 0, end = 0, top = 0, bottom = 0;
1518                     if (view.Layout != null)
1519                     {
1520                         if (view.Layout.Padding != null)
1521                         {
1522                             start = view.Layout.Padding.Start;
1523                             end = view.Layout.Padding.End;
1524                             top = view.Layout.Padding.Top;
1525                             bottom = view.Layout.Padding.Bottom;
1526                         }
1527                     }
1528                     view.internalPadding = new Extents(view.OnPaddingChanged, start, end, top, bottom);
1529                 }
1530
1531                 if (view.Layout == null)
1532                 {
1533                     var tmp = Object.GetProperty(view.SwigCPtr, Property.PADDING);
1534                     tmp?.Get(view.internalPadding);
1535                     tmp?.Dispose();
1536                 }
1537
1538                 return view.internalPadding;
1539             }
1540         );
1541
1542         /// <summary>
1543         /// SizeProperty
1544         /// </summary>
1545         [EditorBrowsable(EditorBrowsableState.Never)]
1546         public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
1547             propertyChanged: (bindable, oldValue, newValue) =>
1548             {
1549                 var view = (View)bindable;
1550                 if (newValue != null)
1551                 {
1552                     // Size property setter is only used by user.
1553                     // Framework code uses SetSize() instead of Size property setter.
1554                     // Size set by user is returned by GetUserSize2D() for SuggestedMinimumWidth/Height.
1555                     // SuggestedMinimumWidth/Height is used by Layout calculation.
1556                     view.userSizeWidth = ((Size)newValue).Width;
1557                     view.userSizeHeight = ((Size)newValue).Height;
1558
1559                     // Set Specification so when layouts measure this View it matches the value set here.
1560                     // All Views are currently Layouts.
1561                     view.WidthSpecification = (int)System.Math.Ceiling(((Size)newValue).Width);
1562                     view.HeightSpecification = (int)System.Math.Ceiling(((Size)newValue).Height);
1563
1564                     view.SetSize(((Size)newValue).Width, ((Size)newValue).Height, ((Size)newValue).Depth);
1565                 }
1566             },
1567             defaultValueCreator: (bindable) =>
1568             {
1569                 var view = (View)bindable;
1570
1571                 if (view.internalSize == null)
1572                 {
1573                     view.internalSize = new Size(view.OnSizeChanged, 0, 0, 0);
1574                 }
1575                 Object.InternalRetrievingPropertyVector3(view.SwigCPtr, View.Property.SIZE, view.internalSize.SwigCPtr);
1576
1577                 return view.internalSize;
1578             }
1579         );
1580
1581         /// <summary>
1582         /// MinimumSizeProperty
1583         /// </summary>
1584         [EditorBrowsable(EditorBrowsableState.Never)]
1585         public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
1586             propertyChanged: (bindable, oldValue, newValue) =>
1587             {
1588                 var view = (View)bindable;
1589                 if (newValue != null)
1590                 {
1591
1592                     Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, ((Size2D)newValue).SwigCPtr);
1593                 }
1594             },
1595             defaultValueCreator: (bindable) =>
1596             {
1597
1598                 var view = (View)bindable;
1599                 if (view.internalMinimumSize == null)
1600                 {
1601                     view.internalMinimumSize = new Size2D(view.OnMinimumSizeChanged, 0, 0);
1602                 }
1603                 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MinimumSize, view.internalMinimumSize.SwigCPtr);
1604                 return view.internalMinimumSize;
1605             }
1606         );
1607
1608         /// <summary>
1609         /// MaximumSizeProperty
1610         /// </summary>
1611         [EditorBrowsable(EditorBrowsableState.Never)]
1612         public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
1613             propertyChanged: (bindable, oldValue, newValue) =>
1614             {
1615                 var view = (View)bindable;
1616                 if (newValue != null)
1617                 {
1618
1619                     Object.InternalSetPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, ((Size2D)newValue).SwigCPtr);
1620                 }
1621             },
1622             defaultValueCreator: (bindable) =>
1623             {
1624                 var view = (View)bindable;
1625
1626                 if (view.internalMaximumSize == null)
1627                 {
1628                     view.internalMaximumSize = new Size2D(view.OnMaximumSizeChanged, 0, 0);
1629                 }
1630                 Object.InternalRetrievingPropertyVector2(view.SwigCPtr, View.Property.MaximumSize, view.internalMaximumSize.SwigCPtr);
1631                 return view.internalMaximumSize;
1632             }
1633         );
1634
1635         /// <summary>
1636         /// InheritPositionProperty
1637         /// </summary>
1638         [EditorBrowsable(EditorBrowsableState.Never)]
1639         public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1640         {
1641             var view = (View)bindable;
1642             if (newValue != null)
1643             {
1644                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritPosition, (bool)newValue);
1645             }
1646         }),
1647         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1648         {
1649             var view = (View)bindable;
1650
1651             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritPosition);
1652         }));
1653
1654         /// <summary>
1655         /// ClippingModeProperty
1656         /// </summary>
1657         [EditorBrowsable(EditorBrowsableState.Never)]
1658         public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1659         {
1660             var view = (View)bindable;
1661             if (newValue != null)
1662             {
1663
1664                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.ClippingMode, (int)newValue);
1665             }
1666         }),
1667         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1668         {
1669             var view = (View)bindable;
1670
1671             return (ClippingModeType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.ClippingMode);
1672         }));
1673
1674         /// <summary>
1675         /// InheritLayoutDirectionProperty
1676         /// </summary>
1677         [EditorBrowsable(EditorBrowsableState.Never)]
1678         public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1679         {
1680             var view = (View)bindable;
1681             if (newValue != null)
1682             {
1683
1684                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection, (bool)newValue);
1685             }
1686         }),
1687         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1688         {
1689             var view = (View)bindable;
1690
1691             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.InheritLayoutDirection);
1692         }));
1693
1694         /// <summary>
1695         /// LayoutDirectionProperty
1696         /// </summary>
1697         [EditorBrowsable(EditorBrowsableState.Never)]
1698         public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1699         {
1700             var view = (View)bindable;
1701             if (newValue != null)
1702             {
1703
1704                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection, (int)newValue);
1705             }
1706         }),
1707         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1708         {
1709             var view = (View)bindable;
1710
1711             return (ViewLayoutDirectionType)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.LayoutDirection);
1712         }));
1713
1714         /// <summary>
1715         /// MarginProperty
1716         /// </summary>
1717         [EditorBrowsable(EditorBrowsableState.Never)]
1718         public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
1719             propertyChanged: (bindable, oldValue, newValue) =>
1720             {
1721                 var view = (View)bindable;
1722                 if (newValue != null)
1723                 {
1724                     if (view.Layout != null)
1725                     {
1726                         view.Layout.Margin = new Extents((Extents)newValue);
1727                         if ((view.Margin.Start != 0) || (view.Margin.End != 0) || (view.Margin.Top != 0) || (view.Margin.Bottom != 0))
1728                         {
1729                             var tmp = new PropertyValue(new Extents(0, 0, 0, 0));
1730                             Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1731                             tmp?.Dispose();
1732                         }
1733                         view.Layout.RequestLayout();
1734                     }
1735                     else
1736                     {
1737                         var tmp = new PropertyValue((Extents)newValue);
1738                         Object.SetProperty(view.SwigCPtr, Property.MARGIN, tmp);
1739                         tmp?.Dispose();
1740                     }
1741                 }
1742             },
1743             defaultValueCreator: (bindable) =>
1744             {
1745                 var view = (View)bindable;
1746                 if ((view.internalMargin == null) || (view.Layout != null))
1747                 {
1748                     ushort start = 0, end = 0, top = 0, bottom = 0;
1749                     if (view.Layout != null)
1750                     {
1751                         if (view.Layout.Margin != null)
1752                         {
1753                             start = view.Layout.Margin.Start;
1754                             end = view.Layout.Margin.End;
1755                             top = view.Layout.Margin.Top;
1756                             bottom = view.Layout.Margin.Bottom;
1757                         }
1758                     }
1759                     view.internalMargin = new Extents(view.OnMarginChanged, start, end, top, bottom);
1760                 }
1761
1762                 if (view.Layout == null)
1763                 {
1764
1765                     var tmp = Object.GetProperty(view.SwigCPtr, Property.MARGIN);
1766                     tmp?.Get(view.internalMargin);
1767                     tmp?.Dispose();
1768                 }
1769
1770                 return view.internalMargin;
1771             }
1772         );
1773
1774         /// <summary>
1775         /// UpdateAreaHintProperty
1776         /// </summary>
1777         [EditorBrowsable(EditorBrowsableState.Never)]
1778         public static readonly BindableProperty UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1779         {
1780             var view = (View)bindable;
1781             if (newValue != null)
1782             {
1783
1784                 Object.InternalSetPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), ((Vector4)newValue).SwigCPtr);
1785             }
1786         }),
1787         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1788         {
1789             var view = (View)bindable;
1790             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1791
1792             Object.InternalRetrievingPropertyVector4(view.SwigCPtr, Interop.ActorProperty.UpdateAreaHintGet(), temp.SwigCPtr);
1793             return temp;
1794         }));
1795
1796         /// <summary>
1797         /// ImageShadow Property
1798         /// </summary>
1799         [EditorBrowsable(EditorBrowsableState.Never)]
1800         public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1801         {
1802             var view = (View)bindable;
1803
1804             view.themeData?.selectorData?.ClearShadow(view);
1805
1806             if (newValue is Selector<ImageShadow> selector)
1807             {
1808                 if (selector.HasAll()) view.SetShadow(selector.All);
1809                 else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
1810             }
1811             else
1812             {
1813                 view.SetShadow((ImageShadow)newValue);
1814             }
1815         }),
1816         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1817         {
1818             var view = (View)bindable;
1819
1820             PropertyMap map = new PropertyMap();
1821             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1822
1823             var shadow = new ImageShadow(map);
1824             return shadow.IsEmpty() ? null : shadow;
1825         }));
1826
1827         /// <summary>
1828         /// Shadow Property
1829         /// </summary>
1830         [EditorBrowsable(EditorBrowsableState.Never)]
1831         public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
1832         {
1833             var view = (View)bindable;
1834
1835             view.themeData?.selectorData?.ClearShadow(view);
1836
1837             if (newValue is Selector<Shadow> selector)
1838             {
1839                 if (selector.HasAll()) view.SetShadow(selector.All);
1840                 else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
1841             }
1842             else
1843             {
1844                 view.SetShadow((Shadow)newValue);
1845             }
1846         }),
1847         defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
1848         {
1849             var view = (View)bindable;
1850
1851             PropertyMap map = new PropertyMap();
1852             Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
1853
1854             var shadow = new Shadow(map);
1855             return shadow.IsEmpty() ? null : shadow;
1856         }));
1857
1858         /// <summary>
1859         /// CornerRadius Property
1860         /// </summary>
1861         [EditorBrowsable(EditorBrowsableState.Never)]
1862         public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1863         {
1864             var view = (View)bindable;
1865             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
1866             view.ApplyCornerRadius();
1867         },
1868         defaultValueCreator: (bindable) =>
1869         {
1870             var view = (View)bindable;
1871             return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
1872         });
1873
1874         /// <summary>
1875         /// CornerRadiusPolicy Property
1876         /// </summary>
1877         [EditorBrowsable(EditorBrowsableState.Never)]
1878         public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
1879         {
1880             var view = (View)bindable;
1881             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
1882
1883             if (view.backgroundExtraData.CornerRadius != null)
1884             {
1885                 view.ApplyCornerRadius();
1886             }
1887         },
1888         defaultValueCreator: (bindable) =>
1889         {
1890             var view = (View)bindable;
1891             return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
1892         });
1893
1894         /// <summary>
1895         /// BorderlineWidth Property
1896         /// </summary>
1897         [EditorBrowsable(EditorBrowsableState.Never)]
1898         public static readonly BindableProperty BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1899         {
1900             var view = (View)bindable;
1901             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
1902             view.ApplyBorderline();
1903         },
1904         defaultValueCreator: (bindable) =>
1905         {
1906             var view = (View)bindable;
1907             return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
1908         });
1909
1910         /// <summary>
1911         /// BorderlineColor Property
1912         /// </summary>
1913         [EditorBrowsable(EditorBrowsableState.Never)]
1914         public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
1915             propertyChanged: (bindable, oldValue, newValue) =>
1916             {
1917                 var view = (View)bindable;
1918
1919                 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
1920
1921                 if (newValue is Selector<Color> selector)
1922                 {
1923                     if (selector.HasAll()) view.SetBorderlineColor(selector.All);
1924                     else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
1925                 }
1926                 else
1927                 {
1928                     view.SetBorderlineColor((Color)newValue);
1929                 }
1930             },
1931             defaultValueCreator: (bindable) =>
1932             {
1933                 var view = (View)bindable;
1934                 return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
1935             }
1936         );
1937
1938         /// <summary>
1939         /// BorderlineColorSelector Property
1940         /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
1941         /// So this API is internally used only.
1942         /// </summary>
1943         internal static readonly BindableProperty BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
1944             propertyChanged: (bindable, oldValue, newValue) =>
1945             {
1946                 var view = (View)bindable;
1947
1948                 view.themeData?.selectorData?.BorderlineColor?.Reset(view);
1949
1950                 if (newValue is Selector<Color> selector)
1951                 {
1952                     if (selector.HasAll()) view.SetBorderlineColor(selector.All);
1953                     else view.EnsureSelectorData().BorderlineColor = new TriggerableSelector<Color>(view, selector, view.SetBorderlineColor, true);
1954                 }
1955                 else
1956                 {
1957                     view.SetBorderlineColor((Color)newValue);
1958                 }
1959             },
1960             defaultValueCreator: (bindable) =>
1961             {
1962                 var view = (View)bindable;
1963                 var selector = view.themeData?.selectorData?.BorderlineColor?.Get();
1964                 return (null != selector) ? selector : new Selector<Color>();
1965             }
1966         );
1967
1968         /// <summary>
1969         /// BorderlineOffset Property
1970         /// </summary>
1971         [EditorBrowsable(EditorBrowsableState.Never)]
1972         public static readonly BindableProperty BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
1973         {
1974             var view = (View)bindable;
1975             (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
1976             view.ApplyBorderline();
1977         },
1978         defaultValueCreator: (bindable) =>
1979         {
1980             var view = (View)bindable;
1981             return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
1982         });
1983
1984         /// <summary>
1985         /// EnableControlState property
1986         /// </summary>
1987         [EditorBrowsable(EditorBrowsableState.Never)]
1988         public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1989         {
1990             var view = (View)bindable;
1991             bool prev = view.enableControlState;
1992             view.enableControlState = (bool)newValue;
1993
1994             if (prev != view.enableControlState)
1995             {
1996                 if (prev)
1997                 {
1998                     view.TouchEvent -= view.EmptyOnTouch;
1999                 }
2000                 else
2001                 {
2002                     view.TouchEvent += view.EmptyOnTouch;
2003                 }
2004             }
2005         },
2006         defaultValueCreator: (bindable) =>
2007         {
2008             return ((View)bindable).enableControlState;
2009         });
2010
2011         /// <summary>
2012         /// ThemeChangeSensitive property
2013         /// </summary>
2014         [EditorBrowsable(EditorBrowsableState.Never)]
2015         public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2016         {
2017             var view = (View)bindable;
2018
2019             if (view.ThemeChangeSensitive == (bool)newValue) return;
2020
2021             if (view.themeData == null) view.themeData = new ThemeData();
2022
2023             view.themeData.ThemeChangeSensitive = (bool)newValue;
2024
2025             if (!view.themeData.ThemeApplied) return;
2026
2027             if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
2028             {
2029                 view.themeData.ListeningThemeChangeEvent = true;
2030                 ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
2031             }
2032             else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
2033             {
2034                 view.themeData.ListeningThemeChangeEvent = false;
2035                 ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
2036             }
2037         },
2038         defaultValueCreator: (bindable) =>
2039         {
2040             return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
2041         });
2042
2043         /// <summary>
2044         /// AccessibilityNameProperty
2045         /// </summary>
2046         [EditorBrowsable(EditorBrowsableState.Never)]
2047         public static readonly BindableProperty AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2048         {
2049             var view = (View)bindable;
2050             if (newValue != null)
2051             {
2052
2053                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityName, (string)newValue);
2054             }
2055         },
2056         defaultValueCreator: (bindable) =>
2057         {
2058             var view = (View)bindable;
2059
2060             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityName);
2061         });
2062
2063         /// <summary>
2064         /// AccessibilityDescriptionProperty
2065         /// </summary>
2066         [EditorBrowsable(EditorBrowsableState.Never)]
2067         public static readonly BindableProperty AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2068         {
2069             var view = (View)bindable;
2070             if (newValue != null)
2071             {
2072
2073                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription, (string)newValue);
2074             }
2075         },
2076         defaultValueCreator: (bindable) =>
2077         {
2078             var view = (View)bindable;
2079
2080             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityDescription);
2081         });
2082
2083         /// <summary>
2084         /// AccessibilityTranslationDomainProperty
2085         /// </summary>
2086         [EditorBrowsable(EditorBrowsableState.Never)]
2087         public static readonly BindableProperty AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2088         {
2089             var view = (View)bindable;
2090             if (newValue != null)
2091             {
2092
2093                 Object.InternalSetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain, (string)newValue);
2094             }
2095         },
2096         defaultValueCreator: (bindable) =>
2097         {
2098             var view = (View)bindable;
2099
2100             return Object.InternalGetPropertyString(view.SwigCPtr, View.Property.AccessibilityTranslationDomain);
2101         });
2102
2103         /// <summary>
2104         /// AccessibilityRoleProperty
2105         /// </summary>
2106         [EditorBrowsable(EditorBrowsableState.Never)]
2107         public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role), propertyChanged: (bindable, oldValue, newValue) =>
2108         {
2109             var view = (View)bindable;
2110             if (newValue != null)
2111             {
2112
2113                 Object.InternalSetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole, (int)newValue);
2114             }
2115         },
2116         defaultValueCreator: (bindable) =>
2117         {
2118             var view = (View)bindable;
2119
2120             return (Role)Object.InternalGetPropertyInt(view.SwigCPtr, View.Property.AccessibilityRole);
2121         });
2122
2123         /// <summary>
2124         /// AccessibilityHighlightableProperty
2125         /// </summary>
2126         [EditorBrowsable(EditorBrowsableState.Never)]
2127         public static readonly BindableProperty AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2128         {
2129             var view = (View)bindable;
2130             if (newValue != null)
2131             {
2132
2133                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable, (bool)newValue);
2134             }
2135         },
2136         defaultValueCreator: (bindable) =>
2137         {
2138             var view = (View)bindable;
2139
2140             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHighlightable);
2141         });
2142
2143         /// <summary>
2144         /// AccessibilityHiddenProperty
2145         /// </summary>
2146         [EditorBrowsable(EditorBrowsableState.Never)]
2147         public static readonly BindableProperty AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2148         {
2149             var view = (View)bindable;
2150             if (newValue != null)
2151             {
2152
2153                 Object.InternalSetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden, (bool)newValue);
2154             }
2155         },
2156         defaultValueCreator: (bindable) =>
2157         {
2158             var view = (View)bindable;
2159
2160             return Object.InternalGetPropertyBool(view.SwigCPtr, View.Property.AccessibilityHidden);
2161         });
2162
2163         /// <summary>
2164         /// ExcludeLayoutingProperty
2165         /// </summary>
2166         [EditorBrowsable(EditorBrowsableState.Never)]
2167         public static readonly BindableProperty ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2168         {
2169             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2170             if (newValue != null)
2171             {
2172                 instance.InternalExcludeLayouting = (bool)newValue;
2173             }
2174         },
2175         defaultValueCreator: (bindable) =>
2176         {
2177             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2178             return instance.InternalExcludeLayouting;
2179         });
2180
2181         /// <summary>
2182         /// TooltipTextProperty
2183         /// </summary>
2184         [EditorBrowsable(EditorBrowsableState.Never)]
2185         public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2186         {
2187             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2188             if (newValue != null)
2189             {
2190                 instance.InternalTooltipText = (string)newValue;
2191             }
2192         },
2193         defaultValueCreator: (bindable) =>
2194         {
2195             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2196             return instance.InternalTooltipText;
2197         });
2198
2199         /// <summary>
2200         /// PositionUsesAnchorPointProperty
2201         /// </summary>
2202         [EditorBrowsable(EditorBrowsableState.Never)]
2203         public static readonly BindableProperty PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2204         {
2205             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2206             if (newValue != null)
2207             {
2208                 instance.InternalPositionUsesAnchorPoint = (bool)newValue;
2209             }
2210         },
2211         defaultValueCreator: (bindable) =>
2212         {
2213             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2214             return instance.InternalPositionUsesAnchorPoint;
2215         });
2216
2217         /// <summary>
2218         /// AnchorPointProperty
2219         /// </summary>
2220         [EditorBrowsable(EditorBrowsableState.Never)]
2221         public static readonly BindableProperty AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2222         {
2223             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2224             if (newValue != null)
2225             {
2226                 instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
2227             }
2228         },
2229         defaultValueCreator: (bindable) =>
2230         {
2231             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2232             return instance.InternalAnchorPoint;
2233         });
2234
2235         /// <summary>
2236         /// WidthSpecificationProperty
2237         /// </summary>
2238         [EditorBrowsable(EditorBrowsableState.Never)]
2239         public static readonly BindableProperty WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2240         {
2241             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2242             if (newValue != null)
2243             {
2244                 instance.InternalWidthSpecification = (int)newValue;
2245             }
2246         },
2247         defaultValueCreator: (bindable) =>
2248         {
2249             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2250             return instance.InternalWidthSpecification;
2251         });
2252
2253         /// <summary>
2254         /// HeightSpecificationProperty
2255         /// </summary>
2256         [EditorBrowsable(EditorBrowsableState.Never)]
2257         public static readonly BindableProperty HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0, propertyChanged: (bindable, oldValue, newValue) =>
2258         {
2259             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2260             if (newValue != null)
2261             {
2262                 instance.InternalHeightSpecification = (int)newValue;
2263             }
2264         },
2265         defaultValueCreator: (bindable) =>
2266         {
2267             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2268             return instance.InternalHeightSpecification;
2269         });
2270
2271         /// <summary>
2272         /// LayoutTransitionProperty
2273         /// </summary>
2274         [EditorBrowsable(EditorBrowsableState.Never)]
2275         public static readonly BindableProperty LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2276         {
2277             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2278             if (newValue != null)
2279             {
2280                 instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
2281             }
2282         },
2283         defaultValueCreator: (bindable) =>
2284         {
2285             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2286             return instance.InternalLayoutTransition;
2287         });
2288
2289         /// <summary>
2290         /// PaddingEXProperty
2291         /// </summary>
2292         [EditorBrowsable(EditorBrowsableState.Never)]
2293         public static readonly BindableProperty PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2294         {
2295             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2296             if (newValue != null)
2297             {
2298                 instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
2299             }
2300         },
2301         defaultValueCreator: (bindable) =>
2302         {
2303             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2304             return instance.InternalPaddingEX;
2305         });
2306
2307         /// <summary>
2308         /// LayoutProperty
2309         /// </summary>
2310         [EditorBrowsable(EditorBrowsableState.Never)]
2311         public static readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
2312         {
2313             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2314             if (newValue != null)
2315             {
2316                 instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
2317             }
2318         },
2319         defaultValueCreator: (bindable) =>
2320         {
2321             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2322             return instance.InternalLayout;
2323         });
2324
2325         /// <summary>
2326         /// BackgroundImageSynchronosLoadingProperty
2327         /// </summary>
2328         [EditorBrowsable(EditorBrowsableState.Never)]
2329         public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2330         {
2331             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2332             if (newValue != null)
2333             {
2334                 instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
2335             }
2336         },
2337         defaultValueCreator: (bindable) =>
2338         {
2339             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2340             return instance.InternalBackgroundImageSynchronosLoading;
2341         });
2342
2343         /// <summary>
2344         /// BackgroundImageSynchronousLoadingProperty
2345         /// </summary>
2346         [EditorBrowsable(EditorBrowsableState.Never)]
2347         public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2348         {
2349             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2350             if (newValue != null)
2351             {
2352                 instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
2353             }
2354         },
2355         defaultValueCreator: (bindable) =>
2356         {
2357             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2358             return instance.InternalBackgroundImageSynchronousLoading;
2359         });
2360
2361         /// <summary>
2362         /// EnableControlStatePropagationProperty
2363         /// </summary>
2364         [EditorBrowsable(EditorBrowsableState.Never)]
2365         public static readonly BindableProperty EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2366         {
2367             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2368             if (newValue != null)
2369             {
2370                 instance.InternalEnableControlStatePropagation = (bool)newValue;
2371             }
2372         },
2373         defaultValueCreator: (bindable) =>
2374         {
2375             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2376             return instance.InternalEnableControlStatePropagation;
2377         });
2378
2379         /// <summary>
2380         /// PropagatableControlStatesProperty
2381         /// </summary>
2382         [EditorBrowsable(EditorBrowsableState.Never)]
2383         public static readonly BindableProperty PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All, propertyChanged: (bindable, oldValue, newValue) =>
2384         {
2385             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2386             if (newValue != null)
2387             {
2388                 instance.InternalPropagatableControlStates = (ControlState)newValue;
2389             }
2390         },
2391         defaultValueCreator: (bindable) =>
2392         {
2393             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2394             return instance.InternalPropagatableControlStates;
2395         });
2396
2397         /// <summary>
2398         /// GrabTouchAfterLeaveProperty
2399         /// </summary>
2400         [EditorBrowsable(EditorBrowsableState.Never)]
2401         public static readonly BindableProperty GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2402         {
2403             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2404             if (newValue != null)
2405             {
2406                 instance.InternalGrabTouchAfterLeave = (bool)newValue;
2407             }
2408         },
2409         defaultValueCreator: (bindable) =>
2410         {
2411             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2412             return instance.InternalGrabTouchAfterLeave;
2413         });
2414
2415         /// <summary>
2416         /// AllowOnlyOwnTouchProperty
2417         /// </summary>
2418         [EditorBrowsable(EditorBrowsableState.Never)]
2419         public static readonly BindableProperty AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
2420         {
2421             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2422             if (newValue != null)
2423             {
2424                 instance.InternalAllowOnlyOwnTouch = (bool)newValue;
2425             }
2426         },
2427         defaultValueCreator: (bindable) =>
2428         {
2429             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2430             return instance.InternalAllowOnlyOwnTouch;
2431         });
2432
2433
2434         /// <summary>
2435         /// BlendEquationProperty
2436         /// </summary>
2437         [EditorBrowsable(EditorBrowsableState.Never)]
2438         public static readonly BindableProperty BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType), propertyChanged: (bindable, oldValue, newValue) =>
2439         {
2440             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2441             if (newValue != null)
2442             {
2443                 instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
2444             }
2445         },
2446         defaultValueCreator: (bindable) =>
2447         {
2448             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2449             return instance.InternalBlendEquation;
2450         });
2451
2452         /// <summary>
2453         /// TransitionOptionsProperty
2454         /// </summary>
2455         [EditorBrowsable(EditorBrowsableState.Never)]
2456         public static readonly BindableProperty TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions), propertyChanged: (bindable, oldValue, newValue) =>
2457         {
2458             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2459             if (newValue != null)
2460             {
2461                 instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
2462             }
2463         },
2464         defaultValueCreator: (bindable) =>
2465         {
2466             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2467             return instance.InternalTransitionOptions;
2468         });
2469
2470         /// <summary>
2471         /// AutomationIdProperty
2472         /// </summary>
2473         [EditorBrowsable(EditorBrowsableState.Never)]
2474         public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
2475         {
2476             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2477             if (newValue != null)
2478             {
2479
2480                 Object.InternalSetPropertyString(instance.SwigCPtr, View.Property.AutomationId, (string)newValue);
2481             }
2482         },
2483         defaultValueCreator: (bindable) =>
2484         {
2485             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2486
2487             return Object.InternalGetPropertyString(instance.SwigCPtr, View.Property.AutomationId);
2488         });
2489
2490         /// <summary>
2491         /// TouchAreaOffsetProperty
2492         /// </summary>
2493         [EditorBrowsable(EditorBrowsableState.Never)]
2494         public static readonly BindableProperty TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset), propertyChanged: (bindable, oldValue, newValue) =>
2495         {
2496             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2497             if (newValue != null)
2498             {
2499                 instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
2500             }
2501         },
2502         defaultValueCreator: (bindable) =>
2503         {
2504             var instance = (Tizen.NUI.BaseComponents.View)bindable;
2505             return instance.InternalTouchAreaOffset;
2506         });
2507
2508         /// <summary>
2509         /// Gets View's Size2D set by user.
2510         /// </summary>
2511         internal Size2D GetUserSize2D()
2512         {
2513             return new Size2D((int)userSizeWidth, (int)userSizeHeight);
2514         }
2515
2516         private void SetBackgroundImage(string value)
2517         {
2518             if (string.IsNullOrEmpty(value))
2519             {
2520                 var empty = new PropertyValue();
2521                 // Clear background
2522                 Object.SetProperty(SwigCPtr, Property.BACKGROUND, empty);
2523                 empty.Dispose();
2524                 return;
2525             }
2526
2527             if (value.StartsWith("*Resource*"))
2528             {
2529                 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
2530                 value = value.Replace("*Resource*", resource);
2531             }
2532
2533             if (backgroundExtraData == null)
2534             {
2535
2536                 Object.InternalSetPropertyString(SwigCPtr, View.Property.BACKGROUND, value);
2537                 BackgroundImageSynchronousLoading = backgroundImageSynchronousLoading;
2538                 return;
2539             }
2540
2541             var map = new PropertyMap();
2542             var url = new PropertyValue(value);
2543             var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2544             var cornerRadius = new PropertyValue(cornerRadiusValue);
2545             var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2546             var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2547             var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2548             var borderlineColor = new PropertyValue(borderlineColorValue);
2549             var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2550             var synchronousLoading = new PropertyValue(backgroundImageSynchronousLoading);
2551             var npatchType = new PropertyValue((int)Visual.Type.NPatch);
2552             var border = (backgroundExtraData.BackgroundImageBorder != null) ? new PropertyValue(backgroundExtraData.BackgroundImageBorder) : null;
2553             var imageType = new PropertyValue((int)Visual.Type.Image);
2554
2555             map.Add(ImageVisualProperty.URL, url)
2556                .Add(Visual.Property.CornerRadius, cornerRadius)
2557                .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2558                .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2559                .Add(Visual.Property.BorderlineColor, borderlineColor)
2560                .Add(Visual.Property.BorderlineOffset, borderlineOffset)
2561                .Add(ImageVisualProperty.SynchronousLoading, synchronousLoading);
2562
2563             if (backgroundExtraData.BackgroundImageBorder != null)
2564             {
2565                 map.Add(Visual.Property.Type, npatchType)
2566                    .Add(NpatchImageVisualProperty.Border, border);
2567             }
2568             else
2569             {
2570                 map.Add(Visual.Property.Type, imageType);
2571             }
2572
2573             var mapValue = new PropertyValue(map);
2574             Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2575
2576             imageType?.Dispose();
2577             border?.Dispose();
2578             npatchType?.Dispose();
2579             synchronousLoading?.Dispose();
2580             borderlineOffset?.Dispose();
2581             borderlineColor?.Dispose();
2582             borderlineColorValue?.Dispose();
2583             borderlineWidth?.Dispose();
2584             cornerRadiusPolicy?.Dispose();
2585             cornerRadius?.Dispose();
2586             cornerRadiusValue?.Dispose();
2587             url?.Dispose();
2588             map?.Dispose();
2589             mapValue?.Dispose();
2590         }
2591
2592         private void SetBackgroundImageBorder(Rectangle value)
2593         {
2594             bool isEmptyValue = Rectangle.IsNullOrZero(value);
2595
2596             var backgroundImageBorder = isEmptyValue ? null : value;
2597
2598             (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
2599
2600             if (isEmptyValue)
2601             {
2602                 return;
2603             }
2604
2605             PropertyMap map = Background;
2606
2607             if (map.Empty())
2608             {
2609                 return;
2610             }
2611
2612             map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
2613
2614             int visualType = 0;
2615
2616             map.Find(Visual.Property.Type)?.Get(out visualType);
2617
2618             if (visualType == (int)Visual.Type.Image)
2619             {
2620                 map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
2621             }
2622
2623             Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
2624         }
2625
2626         private void SetBorderlineColor(Color value)
2627         {
2628             if (value == null)
2629             {
2630                 return;
2631             }
2632
2633             (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BorderlineColor = value;
2634
2635             ApplyBorderline();
2636         }
2637
2638         private void SetBackgroundColor(Color value)
2639         {
2640             if (value == null)
2641             {
2642                 return;
2643             }
2644
2645             if (backgroundExtraData == null)
2646             {
2647
2648                 Object.InternalSetPropertyVector4(SwigCPtr, View.Property.BACKGROUND, ((Color)value).SwigCPtr);
2649                 return;
2650             }
2651
2652             var map = new PropertyMap();
2653             var colorType = new PropertyValue((int)Visual.Type.Color);
2654             var mixColor = new PropertyValue(value);
2655             var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius);
2656             var cornerRadius = new PropertyValue(cornerRadiusValue);
2657             var cornerRadiusPolicy = new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy));
2658             var borderlineWidth = new PropertyValue(backgroundExtraData.BorderlineWidth);
2659             var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor);
2660             var borderlineColor = new PropertyValue(borderlineColorValue);
2661             var borderlineOffset = new PropertyValue(backgroundExtraData.BorderlineOffset);
2662
2663             map.Add(Visual.Property.Type, colorType)
2664                .Add(ColorVisualProperty.MixColor, mixColor)
2665                .Add(Visual.Property.CornerRadius, cornerRadius)
2666                .Add(Visual.Property.CornerRadiusPolicy, cornerRadiusPolicy)
2667                .Add(Visual.Property.BorderlineWidth, borderlineWidth)
2668                .Add(Visual.Property.BorderlineColor, borderlineColor)
2669                .Add(Visual.Property.BorderlineOffset, borderlineOffset);
2670
2671             var mapValue = new PropertyValue(map);
2672             Object.SetProperty(SwigCPtr, Property.BACKGROUND, mapValue);
2673
2674             borderlineOffset?.Dispose();
2675             borderlineColor?.Dispose();
2676             borderlineColorValue?.Dispose();
2677             borderlineWidth?.Dispose();
2678             cornerRadiusPolicy?.Dispose();
2679             cornerRadius?.Dispose();
2680             cornerRadiusValue?.Dispose();
2681             mixColor?.Dispose();
2682             colorType?.Dispose();
2683             map?.Dispose();
2684             mapValue?.Dispose();
2685         }
2686
2687         private void SetColor(Color value)
2688         {
2689             if (value == null)
2690             {
2691                 return;
2692             }
2693
2694             Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
2695             if (NDalicPINVOKE.SWIGPendingException.Pending)
2696                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2697         }
2698
2699         private void SetColorRed(float? value)
2700         {
2701             if (value == null)
2702             {
2703                 return;
2704             }
2705
2706             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorRed, (float)value);
2707             if (NDalicPINVOKE.SWIGPendingException.Pending)
2708                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2709         }
2710
2711         private void SetColorGreen(float? value)
2712         {
2713             if (value == null)
2714             {
2715                 return;
2716             }
2717
2718             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorGreen, (float)value);
2719             if (NDalicPINVOKE.SWIGPendingException.Pending)
2720                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2721         }
2722
2723         private void SetColorBlue(float? value)
2724         {
2725             if (value == null)
2726             {
2727                 return;
2728             }
2729
2730             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.ColorBlue, (float)value);
2731             if (NDalicPINVOKE.SWIGPendingException.Pending)
2732                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2733         }
2734
2735         private void SetOpacity(float? value)
2736         {
2737             if (value == null)
2738             {
2739                 return;
2740             }
2741
2742             Object.InternalSetPropertyFloat(SwigCPtr, View.Property.OPACITY, (float)value);
2743         }
2744
2745         private void SetShadow(ShadowBase value)
2746         {
2747             Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));
2748         }
2749     }
2750 }