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