[NUI] Xaml intellisense support (#853)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
1 /*
2  * Copyright(c) 2019 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 using System;
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using System.IO;
21 using System.Runtime.InteropServices;
22 using Tizen.NUI.Binding;
23 using Tizen.NUI.Xaml;
24
25 namespace Tizen.NUI.BaseComponents
26 {
27     /// <summary>
28     /// The View layout Direction type.
29     /// </summary>
30     /// <since_tizen> 4 </since_tizen>
31     public enum ViewLayoutDirectionType
32     {
33         /// <summary>
34         /// Left to right.
35         /// </summary>
36         /// <since_tizen> 4 </since_tizen>
37         LTR,
38         /// <summary>
39         /// Right to left.
40         /// </summary>
41         /// <since_tizen> 4 </since_tizen>
42         RTL
43     }
44
45     /// <summary>
46     /// [Draft] Available policies for layout parameters
47     /// </summary>
48     /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
49     [EditorBrowsable(EditorBrowsableState.Never)]
50     public static class LayoutParamPolicies
51     {
52         /// <summary>
53         /// Constant which indicates child size should match parent size
54         /// </summary>
55        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
56        [EditorBrowsable(EditorBrowsableState.Never)]
57         public const int MatchParent = -1;
58         /// <summary>
59         /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
60         /// </summary>
61         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
62         [EditorBrowsable(EditorBrowsableState.Never)]
63         public const int WrapContent = -2;
64     }
65
66     /// <summary>
67     /// [Draft] Replaced by LayoutParamPolicies, will be removed once occurrences replaced.
68     /// </summary>
69     internal enum ChildLayoutData
70     {
71         /// <summary>
72         /// Constant which indicates child size should match parent size
73         /// </summary>
74         MatchParent = LayoutParamPolicies.MatchParent,
75         /// <summary>
76         /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
77         /// </summary>
78         WrapContent = LayoutParamPolicies.WrapContent,
79     }
80
81     internal enum ResourceLoadingStatusType
82     {
83         Invalid = -1,
84         Preparing = 0,
85         Ready,
86         Failed,
87     }
88
89     /// <summary>
90     /// View is the base class for all views.
91     /// </summary>
92     /// <since_tizen> 3 </since_tizen>
93     [ContentProperty("Children")]
94     public class View : Container, IResourcesProvider
95     {
96         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
97         [EditorBrowsable(EditorBrowsableState.Never)]
98         public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
99         {
100             var view = (View)bindable;
101             if (newValue != null)
102             {
103                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
104             }
105         },
106         defaultValueCreator: (bindable) =>
107         {
108             var view = (View)bindable;
109             string temp;
110             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
111             return temp;
112         });
113         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
114         [EditorBrowsable(EditorBrowsableState.Never)]
115         public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
116         {
117             var view = (View)bindable;
118             if (newValue != null)
119             {
120                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
121             }
122         },
123         defaultValueCreator: (bindable) =>
124         {
125             var view = (View)bindable;
126             Color backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
127
128             Tizen.NUI.PropertyMap background = view.Background;
129             int visualType = 0;
130             background.Find(Visual.Property.Type)?.Get(out visualType);
131             if (visualType == (int)Visual.Type.Color)
132             {
133                 background.Find(ColorVisualProperty.MixColor)?.Get(backgroundColor);
134             }
135
136             return backgroundColor;
137         });
138         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
139         [EditorBrowsable(EditorBrowsableState.Never)]
140         public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
141         {
142             var view = (View)bindable;
143             if (newValue != null)
144             {
145                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
146             }
147         },
148         defaultValueCreator: (bindable) =>
149         {
150             var view = (View)bindable;
151             string backgroundImage = "";
152
153             Tizen.NUI.PropertyMap background = view.Background;
154             int visualType = 0;
155             background.Find(Visual.Property.Type)?.Get(out visualType);
156             if (visualType == (int)Visual.Type.Image)
157             {
158                 background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
159             }
160
161             return backgroundImage;
162         });
163         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
164         [EditorBrowsable(EditorBrowsableState.Never)]
165         public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
166         {
167             var view = (View)bindable;
168             if (newValue != null)
169             {
170                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
171             }
172         },
173         defaultValueCreator: (bindable) =>
174         {
175             var view = (View)bindable;
176             Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
177             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
178             return temp;
179         });
180         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
181         [EditorBrowsable(EditorBrowsableState.Never)]
182         public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
183         {
184             var view = (View)bindable;
185             if (newValue != null)
186             {
187                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
188             }
189         },
190         defaultValueCreator: (bindable) =>
191         {
192             var view = (View)bindable;
193             int temp = 0;
194             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
195             {
196                 NUILog.Error("State get error!");
197             }
198             switch (temp)
199             {
200                 case 0: return States.Normal;
201                 case 1: return States.Focused;
202                 case 2: return States.Disabled;
203                 default: return States.Normal;
204             }
205         });
206         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
207         [EditorBrowsable(EditorBrowsableState.Never)]
208         public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
209         {
210             var view = (View)bindable;
211             string valueToString = "";
212             if (newValue != null)
213             {
214                 switch ((States)newValue)
215                 {
216                     case States.Normal: { valueToString = "NORMAL"; break; }
217                     case States.Focused: { valueToString = "FOCUSED"; break; }
218                     case States.Disabled: { valueToString = "DISABLED"; break; }
219                     default: { valueToString = "NORMAL"; break; }
220                 }
221                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
222             }
223         },
224         defaultValueCreator: (bindable) =>
225         {
226             var view = (View)bindable;
227             string temp;
228             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
229             {
230                 NUILog.Error("subState get error!");
231             }
232             switch (temp)
233             {
234                 case "NORMAL": return States.Normal;
235                 case "FOCUSED": return States.Focused;
236                 case "DISABLED": return States.Disabled;
237                 default: return States.Normal;
238             }
239         });
240         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
241         [EditorBrowsable(EditorBrowsableState.Never)]
242         public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
243         {
244             var view = (View)bindable;
245             if (newValue != null)
246             {
247                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
248             }
249         },
250         defaultValueCreator: (bindable) =>
251         {
252             var view = (View)bindable;
253             Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
254             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
255             return temp;
256         });
257
258         /// Only for XAML property binding. This will be changed as Inhouse API by ACR later.
259         public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
260         {
261             var view = (View)bindable;
262             if (newValue != null)
263             {
264                 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
265             }
266         },
267         defaultValueCreator: (bindable) =>
268         {
269             var view = (View)bindable;
270             float temp = 0.0f;
271             Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
272             return temp;
273         });
274
275         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
276         [EditorBrowsable(EditorBrowsableState.Never)]
277         public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
278         {
279             var view = (View)bindable;
280             if (newValue != null)
281             {
282                 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
283             }
284         },
285         defaultValueCreator: (bindable) =>
286         {
287             var view = (View)bindable;
288             int temp = 0;
289             Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
290             return temp;
291         });
292         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
293         [EditorBrowsable(EditorBrowsableState.Never)]
294         public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
295         {
296             var view = (View)bindable;
297             if (newValue != null)
298             {
299                 Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
300             }
301         },
302         defaultValueCreator: (bindable) =>
303         {
304             var view = (View)bindable;
305             Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
306             Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
307             return temp;
308         });
309         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
310         [EditorBrowsable(EditorBrowsableState.Never)]
311         public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
312         {
313             var view = (View)bindable;
314             if (newValue != null)
315             {
316                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
317             }
318         },
319         defaultValueCreator: (bindable) =>
320         {
321             var view = (View)bindable;
322             Vector2 temp = new Vector2(0.0f, 0.0f);
323             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
324             return temp;
325         });
326         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
327         [EditorBrowsable(EditorBrowsableState.Never)]
328         public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
329         {
330             var view = (View)bindable;
331             if (newValue != null)
332             {
333                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
334             }
335         },
336         defaultValueCreator: (bindable) =>
337         {
338             var view = (View)bindable;
339             float temp = 0.0f;
340             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
341             return temp;
342         });
343         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
344         [EditorBrowsable(EditorBrowsableState.Never)]
345         public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
346         {
347             var view = (View)bindable;
348             if (newValue != null)
349             {
350                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
351             }
352         },
353         defaultValueCreator: (bindable) =>
354         {
355             var view = (View)bindable;
356             float temp = 0.0f;
357             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
358             return temp;
359         });
360         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
361         [EditorBrowsable(EditorBrowsableState.Never)]
362         public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
363         {
364             var view = (View)bindable;
365             string valueToString = "";
366
367             if (newValue != null)
368             {
369                 switch ((HorizontalAlignmentType)newValue)
370                 {
371                     case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
372                     case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
373                     case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
374                     default: { valueToString = "left"; break; }
375                 }
376                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
377             }
378         },
379         defaultValueCreator: (bindable) =>
380         {
381             var view = (View)bindable;
382             string temp;
383             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
384             {
385                 NUILog.Error("CellHorizontalAlignment get error!");
386             }
387
388             switch (temp)
389             {
390                 case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
391                 case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
392                 case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
393                 default: return Tizen.NUI.HorizontalAlignmentType.Left;
394             }
395         });
396         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
397         [EditorBrowsable(EditorBrowsableState.Never)]
398         public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
399         {
400             var view = (View)bindable;
401             string valueToString = "";
402
403             if (newValue != null)
404             {
405                 switch ((VerticalAlignmentType)newValue)
406                 {
407                     case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
408                     case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
409                     case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
410                     default: { valueToString = "top"; break; }
411                 }
412                 Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
413             }
414         },
415         defaultValueCreator: (bindable) =>
416         {
417             var view = (View)bindable;
418             string temp;
419             Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
420             {
421                 NUILog.Error("CellVerticalAlignment get error!");
422             }
423
424             switch (temp)
425             {
426                 case "top": return Tizen.NUI.VerticalAlignmentType.Top;
427                 case "center": return Tizen.NUI.VerticalAlignmentType.Center;
428                 case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
429                 default: return Tizen.NUI.VerticalAlignmentType.Top;
430             }
431         });
432
433         /// <summary>
434         /// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
435         /// This needs to be hidden as inhouse API until all applications using it have been updated.  Do not make public.
436         /// </summary>
437         [EditorBrowsable(EditorBrowsableState.Never)]
438         public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
439         {
440             var view = (View)bindable;
441             if (newValue != null)
442             {
443                 view.Weight = (float)newValue;
444             }
445         },
446
447         defaultValueCreator: (bindable) =>
448         {
449             var view = (View)bindable;
450             return view.Weight;
451         });
452
453         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
454         [EditorBrowsable(EditorBrowsableState.Never)]
455         public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
456         {
457             var view = (View)bindable;
458             if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); }
459             else { view.LeftFocusableViewId = -1; }
460         },
461         defaultValueCreator: (bindable) =>
462         {
463             var view = (View)bindable;
464             if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
465             return null;
466         });
467         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
468         [EditorBrowsable(EditorBrowsableState.Never)]
469         public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
470         {
471             var view = (View)bindable;
472             if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); }
473             else { view.RightFocusableViewId = -1; }
474         },
475         defaultValueCreator: (bindable) =>
476         {
477             var view = (View)bindable;
478             if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
479             return null;
480         });
481         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
482         [EditorBrowsable(EditorBrowsableState.Never)]
483         public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
484         {
485             var view = (View)bindable;
486             if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); }
487             else { view.UpFocusableViewId = -1; }
488         },
489         defaultValueCreator: (bindable) =>
490         {
491             var view = (View)bindable;
492             if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
493             return null;
494         });
495         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
496         [EditorBrowsable(EditorBrowsableState.Never)]
497         public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
498         {
499             var view = (View)bindable;
500             if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); }
501             else { view.DownFocusableViewId = -1; }
502         },
503         defaultValueCreator: (bindable) =>
504         {
505             var view = (View)bindable;
506             if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
507             return null;
508         });
509         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
510         [EditorBrowsable(EditorBrowsableState.Never)]
511         public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
512         {
513             var view = (View)bindable;
514             if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
515         },
516         defaultValueCreator: (bindable) =>
517         {
518             var view = (View)bindable;
519             return view.IsKeyboardFocusable();
520         });
521         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
522         [EditorBrowsable(EditorBrowsableState.Never)]
523         public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
524         {
525             var view = (View)bindable;
526             if (newValue != null)
527             {
528                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
529             }
530         },
531         defaultValueCreator: (bindable) =>
532         {
533             var view = (View)bindable;
534             Size temp = new Size(0.0f, 0.0f, 0.0f);
535             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
536             Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
537             return size;
538         });
539         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
540         [EditorBrowsable(EditorBrowsableState.Never)]
541         public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
542         {
543             var view = (View)bindable;
544             if (newValue != null)
545             {
546                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
547             }
548         },
549         defaultValueCreator: (bindable) =>
550         {
551             var view = (View)bindable;
552             float temp = 0.0f;
553             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
554             return temp;
555         });
556         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
557         [EditorBrowsable(EditorBrowsableState.Never)]
558         public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
559         {
560             var view = (View)bindable;
561             if (newValue != null)
562             {
563                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
564             }
565         },
566         defaultValueCreator: (bindable) =>
567         {
568             var view = (View)bindable;
569             Position temp = new Position(0.0f, 0.0f, 0.0f);
570             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
571             return new Position2D(temp);
572         });
573         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
574         [EditorBrowsable(EditorBrowsableState.Never)]
575         public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
576         {
577             var view = (View)bindable;
578             if (newValue != null)
579             {
580                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
581             }
582         },
583         defaultValueCreator: (bindable) =>
584         {
585             var view = (View)bindable;
586             bool temp = false;
587             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
588             return temp;
589         });
590         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
591         [EditorBrowsable(EditorBrowsableState.Never)]
592         public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
593         {
594             var view = (View)bindable;
595             int value;
596             if (newValue != null)
597             {
598                 value = (int)newValue;
599                 if (value < 0)
600                 {
601                     NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
602                     return;
603                 }
604                 var siblings = view.GetParent()?.Children;
605                 if (siblings != null)
606                 {
607                     int currentOrder = siblings.IndexOf(view);
608                     if (value != currentOrder)
609                     {
610                         if (value == 0) { view.LowerToBottom(); }
611                         else if (value < siblings.Count - 1)
612                         {
613                             if (value > currentOrder) { view.RaiseAbove(siblings[value]); }
614                             else { view.LowerBelow(siblings[value]); }
615                         }
616                         else { view.RaiseToTop(); }
617                     }
618                 }
619             }
620         },
621         defaultValueCreator: (bindable) =>
622         {
623             var view = (View)bindable;
624             var parentChildren = view.GetParent()?.Children;
625             int currentOrder = 0;
626             if (parentChildren != null)
627             {
628                 currentOrder = parentChildren.IndexOf(view);
629
630                 if (currentOrder < 0) { return 0; }
631                 else if (currentOrder < parentChildren.Count) { return currentOrder; }
632             }
633
634             return 0;
635         });
636         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
637         [EditorBrowsable(EditorBrowsableState.Never)]
638         public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
639         {
640             var view = (View)bindable;
641             if (newValue != null)
642             {
643                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
644             }
645         },
646         defaultValueCreator: (bindable) =>
647         {
648             var view = (View)bindable;
649             Position temp = new Position(0.0f, 0.0f, 0.0f);
650             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
651             return temp;
652         }
653         );
654         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
655         [EditorBrowsable(EditorBrowsableState.Never)]
656         public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
657         {
658             var view = (View)bindable;
659             if (newValue != null)
660             {
661                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
662             }
663         },
664         defaultValueCreator: (bindable) =>
665         {
666             var view = (View)bindable;
667             Position temp = new Position(0.0f, 0.0f, 0.0f);
668             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
669             return temp;
670         });
671         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
672         [EditorBrowsable(EditorBrowsableState.Never)]
673         public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
674         {
675             var view = (View)bindable;
676             if (newValue != null)
677             {
678                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
679             }
680         },
681         defaultValueCreator: (bindable) =>
682         {
683             var view = (View)bindable;
684             float temp = 0.0f;
685             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
686             return temp;
687         });
688         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
689         [EditorBrowsable(EditorBrowsableState.Never)]
690         public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
691         {
692             var view = (View)bindable;
693             if (newValue != null)
694             {
695                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
696             }
697         },
698         defaultValueCreator: (bindable) =>
699         {
700             var view = (View)bindable;
701             float temp = 0.0f;
702             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
703             return temp;
704         });
705         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
706         [EditorBrowsable(EditorBrowsableState.Never)]
707         public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
708         {
709             var view = (View)bindable;
710             if (newValue != null)
711             {
712                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
713             }
714         },
715         defaultValueCreator: (bindable) =>
716         {
717             var view = (View)bindable;
718             Position temp = new Position(0.0f, 0.0f, 0.0f);
719             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
720             return temp;
721         });
722         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
723         [EditorBrowsable(EditorBrowsableState.Never)]
724         public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
725         {
726             var view = (View)bindable;
727             if (newValue != null)
728             {
729                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
730             }
731         },
732         defaultValueCreator: (bindable) =>
733         {
734             var view = (View)bindable;
735             float temp = 0.0f;
736             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
737             return temp;
738         });
739         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
740         [EditorBrowsable(EditorBrowsableState.Never)]
741         public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
742         {
743             var view = (View)bindable;
744             if (newValue != null)
745             {
746                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
747             }
748         },
749         defaultValueCreator: (bindable) =>
750         {
751             var view = (View)bindable;
752             float temp = 0.0f;
753             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
754             return temp;
755         });
756         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
757         [EditorBrowsable(EditorBrowsableState.Never)]
758         public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
759         {
760             var view = (View)bindable;
761             if (newValue != null)
762             {
763                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
764             }
765         },
766         defaultValueCreator: (bindable) =>
767         {
768             var view = (View)bindable;
769             float temp = 0.0f;
770             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
771             return temp;
772         });
773         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
774         [EditorBrowsable(EditorBrowsableState.Never)]
775         public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
776         {
777             var view = (View)bindable;
778             if (newValue != null)
779             {
780                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
781             }
782         },
783         defaultValueCreator: (bindable) =>
784         {
785             var view = (View)bindable;
786             Rotation temp = new Rotation();
787             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
788             return temp;
789         });
790         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
791         [EditorBrowsable(EditorBrowsableState.Never)]
792         public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
793         {
794             var view = (View)bindable;
795             if (newValue != null)
796             {
797                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
798             }
799         },
800         defaultValueCreator: (bindable) =>
801         {
802             var view = (View)bindable;
803             Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
804             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
805             return temp;
806         });
807         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
808         [EditorBrowsable(EditorBrowsableState.Never)]
809         public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
810         {
811             var view = (View)bindable;
812             if (newValue != null)
813             {
814                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
815             }
816         },
817         defaultValueCreator: (bindable) =>
818         {
819             var view = (View)bindable;
820             float temp = 0.0f;
821             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
822             return temp;
823         });
824         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
825         [EditorBrowsable(EditorBrowsableState.Never)]
826         public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
827         {
828             var view = (View)bindable;
829             if (newValue != null)
830             {
831                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
832             }
833         },
834         defaultValueCreator: (bindable) =>
835         {
836             var view = (View)bindable;
837             float temp = 0.0f;
838             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
839             return temp;
840         });
841         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
842         [EditorBrowsable(EditorBrowsableState.Never)]
843         public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
844         {
845             var view = (View)bindable;
846             if (newValue != null)
847             {
848                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
849             }
850         },
851         defaultValueCreator: (bindable) =>
852         {
853             var view = (View)bindable;
854             float temp = 0.0f;
855             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
856             return temp;
857         });
858         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
859         [EditorBrowsable(EditorBrowsableState.Never)]
860         public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
861         {
862             var view = (View)bindable;
863             if (newValue != null)
864             {
865                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
866             }
867         },
868         defaultValueCreator: (bindable) =>
869         {
870             var view = (View)bindable;
871             string temp;
872             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
873             return temp;
874         });
875         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
876         [EditorBrowsable(EditorBrowsableState.Never)]
877         public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
878         {
879             var view = (View)bindable;
880             if (newValue != null)
881             {
882                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
883             }
884         },
885         defaultValueCreator: (bindable) =>
886         {
887             var view = (View)bindable;
888             bool temp = false;
889             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
890             return temp;
891         });
892         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
893         [EditorBrowsable(EditorBrowsableState.Never)]
894         public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
895         {
896             var view = (View)bindable;
897             if (newValue != null)
898             {
899                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
900             }
901         },
902         defaultValueCreator: (bindable) =>
903         {
904             var view = (View)bindable;
905             bool temp = false;
906             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
907             return temp;
908         });
909         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
910         [EditorBrowsable(EditorBrowsableState.Never)]
911         public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
912         {
913             var view = (View)bindable;
914             if (newValue != null)
915             {
916                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
917             }
918         },
919         defaultValueCreator: (bindable) =>
920         {
921             var view = (View)bindable;
922             bool temp = false;
923             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
924             return temp;
925         });
926         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
927         [EditorBrowsable(EditorBrowsableState.Never)]
928         public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
929         {
930             var view = (View)bindable;
931             if (newValue != null)
932             {
933                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
934             }
935         },
936         defaultValueCreator: (bindable) =>
937         {
938             var view = (View)bindable;
939             bool temp = false;
940             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
941             return temp;
942         });
943         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
944         [EditorBrowsable(EditorBrowsableState.Never)]
945         public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
946         {
947             var view = (View)bindable;
948             if (newValue != null)
949             {
950                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
951             }
952         },
953         defaultValueCreator: (bindable) =>
954         {
955             var view = (View)bindable;
956             string temp;
957             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
958             {
959                 NUILog.Error("DrawMode get error!");
960             }
961             switch (temp)
962             {
963                 case "NORMAL": return DrawModeType.Normal;
964                 case "OVERLAY_2D": return DrawModeType.Overlay2D;
965 #pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
966                 case "STENCIL": return DrawModeType.Stencil;
967 #pragma warning restore CS0618
968                 default: return DrawModeType.Normal;
969             }
970         });
971         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
972         [EditorBrowsable(EditorBrowsableState.Never)]
973         public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
974         {
975             var view = (View)bindable;
976             if (newValue != null)
977             {
978                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
979             }
980         },
981         defaultValueCreator: (bindable) =>
982         {
983             var view = (View)bindable;
984             Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
985             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
986             return temp;
987         });
988         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
989         [EditorBrowsable(EditorBrowsableState.Never)]
990         public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
991         {
992             var view = (View)bindable;
993             if (newValue != null)
994             {
995                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
996             }
997         },
998         defaultValueCreator: (bindable) =>
999         {
1000             var view = (View)bindable;
1001             string temp;
1002             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
1003             {
1004                 NUILog.Error("WidthResizePolicy get error!");
1005             }
1006             switch (temp)
1007             {
1008                 case "FIXED": return ResizePolicyType.Fixed;
1009                 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1010                 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1011                 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1012                 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1013                 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1014                 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1015                 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1016                 default: return ResizePolicyType.Fixed;
1017             }
1018         });
1019         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1020         [EditorBrowsable(EditorBrowsableState.Never)]
1021         public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
1022         {
1023             var view = (View)bindable;
1024             if (newValue != null)
1025             {
1026                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
1027             }
1028         },
1029         defaultValueCreator: (bindable) =>
1030         {
1031             var view = (View)bindable;
1032             string temp;
1033             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
1034             {
1035                 NUILog.Error("HeightResizePolicy get error!");
1036             }
1037             switch (temp)
1038             {
1039                 case "FIXED": return ResizePolicyType.Fixed;
1040                 case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
1041                 case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
1042                 case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
1043                 case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
1044                 case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
1045                 case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
1046                 case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
1047                 default: return ResizePolicyType.Fixed;
1048             }
1049         });
1050         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1051         [EditorBrowsable(EditorBrowsableState.Never)]
1052         public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
1053         {
1054             var view = (View)bindable;
1055             string valueToString = "";
1056             if (newValue != null)
1057             {
1058                 switch ((SizeScalePolicyType)newValue)
1059                 {
1060                     case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
1061                     case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
1062                     case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
1063                     default: { valueToString = "USE_SIZE_SET"; break; }
1064                 }
1065                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
1066             }
1067         },
1068         defaultValueCreator: (bindable) =>
1069         {
1070             var view = (View)bindable;
1071             string temp;
1072             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
1073             {
1074                 NUILog.Error("SizeScalePolicy get error!");
1075             }
1076             switch (temp)
1077             {
1078                 case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
1079                 case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
1080                 case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
1081                 default: return SizeScalePolicyType.UseSizeSet;
1082             }
1083         });
1084         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1085         [EditorBrowsable(EditorBrowsableState.Never)]
1086         public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1087         {
1088             var view = (View)bindable;
1089             if (newValue != null)
1090             {
1091                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
1092             }
1093         },
1094         defaultValueCreator: (bindable) =>
1095         {
1096             var view = (View)bindable;
1097             bool temp = false;
1098             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
1099             return temp;
1100         });
1101         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1102         [EditorBrowsable(EditorBrowsableState.Never)]
1103         public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1104         {
1105             var view = (View)bindable;
1106             if (newValue != null)
1107             {
1108                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
1109             }
1110         },
1111         defaultValueCreator: (bindable) =>
1112         {
1113             var view = (View)bindable;
1114             bool temp = false;
1115             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
1116             return temp;
1117         });
1118         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1119         [EditorBrowsable(EditorBrowsableState.Never)]
1120         public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1121         {
1122             var view = (View)bindable;
1123             if (newValue != null)
1124             {
1125                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
1126             }
1127         },
1128         defaultValueCreator: (bindable) =>
1129         {
1130             var view = (View)bindable;
1131             Extents temp = new Extents(0, 0, 0, 0);
1132             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
1133             return temp;
1134         });
1135         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1136         [EditorBrowsable(EditorBrowsableState.Never)]
1137         public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1138         {
1139             var view = (View)bindable;
1140             if (newValue != null)
1141             {
1142                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
1143             }
1144         },
1145         defaultValueCreator: (bindable) =>
1146         {
1147             var view = (View)bindable;
1148             Size temp = new Size(0, 0, 0);
1149             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
1150             return temp;
1151         });
1152         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1153         [EditorBrowsable(EditorBrowsableState.Never)]
1154         public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1155         {
1156             var view = (View)bindable;
1157             if (newValue != null)
1158             {
1159                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1160             }
1161         },
1162         defaultValueCreator: (bindable) =>
1163         {
1164             var view = (View)bindable;
1165             Size2D temp = new Size2D(0, 0);
1166             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
1167             return temp;
1168         });
1169         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1170         [EditorBrowsable(EditorBrowsableState.Never)]
1171         public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1172         {
1173             var view = (View)bindable;
1174             if (newValue != null)
1175             {
1176                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
1177             }
1178         },
1179         defaultValueCreator: (bindable) =>
1180         {
1181             var view = (View)bindable;
1182             Size2D temp = new Size2D(0, 0);
1183             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
1184             return temp;
1185         });
1186         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1187         [EditorBrowsable(EditorBrowsableState.Never)]
1188         public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1189         {
1190             var view = (View)bindable;
1191             if (newValue != null)
1192             {
1193                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
1194             }
1195         },
1196         defaultValueCreator: (bindable) =>
1197         {
1198             var view = (View)bindable;
1199             bool temp = false;
1200             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
1201             return temp;
1202         });
1203         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1204         [EditorBrowsable(EditorBrowsableState.Never)]
1205         public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
1206         {
1207             var view = (View)bindable;
1208             if (newValue != null)
1209             {
1210                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
1211             }
1212         },
1213         defaultValueCreator: (bindable) =>
1214         {
1215             var view = (View)bindable;
1216             int temp = 0;
1217             if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
1218             {
1219                 NUILog.Error("ClippingMode get error!");
1220             }
1221             return (ClippingModeType)temp;
1222         });
1223         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1224         [EditorBrowsable(EditorBrowsableState.Never)]
1225         public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
1226         {
1227             var view = (View)bindable;
1228             if (newValue != null)
1229             {
1230                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
1231             }
1232         },
1233         defaultValueCreator: (bindable) =>
1234         {
1235             var view = (View)bindable;
1236             bool temp = false;
1237             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
1238             return temp;
1239         });
1240         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1241         [EditorBrowsable(EditorBrowsableState.Never)]
1242         public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
1243         {
1244             var view = (View)bindable;
1245             if (newValue != null)
1246             {
1247                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
1248             }
1249         },
1250         defaultValueCreator: (bindable) =>
1251         {
1252             var view = (View)bindable;
1253             int temp;
1254             if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
1255             {
1256                 NUILog.Error("LAYOUT_DIRECTION get error!");
1257             }
1258             return (ViewLayoutDirectionType)temp;
1259         });
1260         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1261         [EditorBrowsable(EditorBrowsableState.Never)]
1262         public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
1263         {
1264             var view = (View)bindable;
1265             if (newValue != null)
1266             {
1267                 Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
1268             }
1269         },
1270         defaultValueCreator: (bindable) =>
1271         {
1272             var view = (View)bindable;
1273             Extents temp = new Extents(0, 0, 0, 0);
1274             Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
1275             return temp;
1276         });
1277         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1278         [EditorBrowsable(EditorBrowsableState.Never)]
1279         public static readonly BindableProperty StyleProperty = BindableProperty.Create("Style", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
1280
1281         /// <summary>
1282         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
1283         /// </summary>
1284         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1285         [EditorBrowsable(EditorBrowsableState.Never)]
1286         public bool layoutSet = false;
1287
1288         /// <summary>
1289         /// Flag to allow Layouting to be disabled for Views.
1290         /// Once a View has a Layout set then any children added to Views from then on will receive
1291         /// automatic Layouts.
1292         /// </summary>
1293         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
1294         [EditorBrowsable(EditorBrowsableState.Never)]
1295         public static bool layoutingDisabled{get; set;} = true;
1296
1297         internal readonly MergedStyle _mergedStyle;
1298         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1299         private LayoutItem _layout; // Exclusive layout assigned to this View.
1300         private int _widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
1301         private int _heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
1302         private float _weight = 0.0f; // Weighting of child View in a Layout
1303         private MeasureSpecification _measureSpecificationWidth; // Layout width and internal Mode
1304         private MeasureSpecification _measureSpecificationHeight; // Layout height and internal Mode
1305         private bool _backgroundImageSynchronosLoading = false;
1306         private EventHandler _offWindowEventHandler;
1307         private OffWindowEventCallbackType _offWindowEventCallback;
1308         private EventHandlerWithReturnType<object, WheelEventArgs, bool> _wheelEventHandler;
1309         private WheelEventCallbackType _wheelEventCallback;
1310         private EventHandlerWithReturnType<object, KeyEventArgs, bool> _keyEventHandler;
1311         private KeyCallbackType _keyCallback;
1312         private EventHandlerWithReturnType<object, TouchEventArgs, bool> _touchDataEventHandler;
1313         private TouchDataCallbackType _touchDataCallback;
1314         private EventHandlerWithReturnType<object, HoverEventArgs, bool> _hoverEventHandler;
1315         private HoverEventCallbackType _hoverEventCallback;
1316         private EventHandler<VisibilityChangedEventArgs> _visibilityChangedEventHandler;
1317         private VisibilityChangedEventCallbackType _visibilityChangedEventCallback;
1318         private EventHandler _keyInputFocusGainedEventHandler;
1319         private KeyInputFocusGainedCallbackType _keyInputFocusGainedCallback;
1320         private EventHandler _keyInputFocusLostEventHandler;
1321         private KeyInputFocusLostCallbackType _keyInputFocusLostCallback;
1322         private EventHandler _onRelayoutEventHandler;
1323         private OnRelayoutEventCallbackType _onRelayoutEventCallback;
1324         private EventHandler _onWindowEventHandler;
1325         private OnWindowEventCallbackType _onWindowEventCallback;
1326         private EventHandler<LayoutDirectionChangedEventArgs> _layoutDirectionChangedEventHandler;
1327         private LayoutDirectionChangedEventCallbackType _layoutDirectionChangedEventCallback;
1328         // Resource Ready Signal
1329         private EventHandler _resourcesLoadedEventHandler;
1330         private ResourcesLoadedCallbackType _ResourcesLoadedCallback;
1331         private EventHandler<BackgroundResourceLoadedEventArgs> _backgroundResourceLoadedEventHandler;
1332         private _backgroundResourceLoadedCallbackType _backgroundResourceLoadedCallback;
1333
1334         private OnWindowEventCallbackType _onWindowSendEventCallback;
1335
1336         private void SendViewAddedEventToWindow(IntPtr data)
1337         {
1338             Window.Instance?.SendViewAdded(this);
1339         }
1340
1341         /// <summary>
1342         /// Creates a new instance of a view.
1343         /// </summary>
1344         /// <since_tizen> 3 </since_tizen>
1345         public View() : this(Interop.View.View_New(), true)
1346         {
1347             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1348         }
1349         internal View(View uiControl) : this(Interop.View.new_View__SWIG_1(View.getCPtr(uiControl)), true)
1350         {
1351             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1352         }
1353
1354         internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.View.View_SWIGUpcast(cPtr), cMemoryOwn)
1355         {
1356             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1357             if (HasBody())
1358             {
1359                 PositionUsesPivotPoint = false;
1360             }
1361             _mergedStyle = new MergedStyle(GetType(), this);
1362
1363             _onWindowSendEventCallback = SendViewAddedEventToWindow;
1364             this.OnWindowSignal().Connect(_onWindowSendEventCallback);
1365         }
1366
1367         internal View(ViewImpl implementation) : this(Interop.View.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true)
1368         {
1369             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1370         }
1371
1372         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1373         private delegate void OffWindowEventCallbackType(IntPtr control);
1374         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1375         private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent);
1376         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1377         private delegate bool KeyCallbackType(IntPtr control, IntPtr keyEvent);
1378         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1379         private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData);
1380         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1381         private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent);
1382         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1383         private delegate void VisibilityChangedEventCallbackType(IntPtr data, bool visibility, VisibilityChangeType type);
1384         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1385         private delegate void ResourcesLoadedCallbackType(IntPtr control);
1386         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1387         private delegate void _backgroundResourceLoadedCallbackType(IntPtr view);
1388         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1389         private delegate void KeyInputFocusGainedCallbackType(IntPtr control);
1390         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1391         private delegate void KeyInputFocusLostCallbackType(IntPtr control);
1392         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1393         private delegate void OnRelayoutEventCallbackType(IntPtr control);
1394         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1395         private delegate void OnWindowEventCallbackType(IntPtr control);
1396         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
1397         private delegate void LayoutDirectionChangedEventCallbackType(IntPtr data, ViewLayoutDirectionType type);
1398
1399         /// <summary>
1400         /// Event when a child is removed.
1401         /// </summary>
1402         /// <since_tizen> 5 </since_tizen>
1403         public new event EventHandler<ChildRemovedEventArgs> ChildRemoved;
1404         /// <summary>
1405         /// Event when a child is added.
1406         /// </summary>
1407         /// <since_tizen> 5 </since_tizen>
1408         public new event EventHandler<ChildAddedEventArgs> ChildAdded;
1409
1410         /// <summary>
1411         /// An event for the KeyInputFocusGained signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1412         /// The KeyInputFocusGained signal is emitted when the control gets the key input focus.<br />
1413         /// </summary>
1414         /// <since_tizen> 3 </since_tizen>
1415         public event EventHandler FocusGained
1416         {
1417             add
1418             {
1419                 if (_keyInputFocusGainedEventHandler == null)
1420                 {
1421                     _keyInputFocusGainedCallback = OnKeyInputFocusGained;
1422                     this.KeyInputFocusGainedSignal().Connect(_keyInputFocusGainedCallback);
1423                 }
1424
1425                 _keyInputFocusGainedEventHandler += value;
1426             }
1427
1428             remove
1429             {
1430                 _keyInputFocusGainedEventHandler -= value;
1431
1432                 if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
1433                 {
1434                     this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
1435                 }
1436             }
1437         }
1438
1439         /// <summary>
1440         /// An event for the KeyInputFocusLost signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1441         /// The KeyInputFocusLost signal is emitted when the control loses the key input focus.<br />
1442         /// </summary>
1443         /// <since_tizen> 3 </since_tizen>
1444         public event EventHandler FocusLost
1445         {
1446             add
1447             {
1448                 if (_keyInputFocusLostEventHandler == null)
1449                 {
1450                     _keyInputFocusLostCallback = OnKeyInputFocusLost;
1451                     this.KeyInputFocusLostSignal().Connect(_keyInputFocusLostCallback);
1452                 }
1453
1454                 _keyInputFocusLostEventHandler += value;
1455             }
1456
1457             remove
1458             {
1459                 _keyInputFocusLostEventHandler -= value;
1460
1461                 if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
1462                 {
1463                     this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
1464                 }
1465             }
1466         }
1467
1468         /// <summary>
1469         /// An event for the KeyPressed signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1470         /// The KeyPressed signal is emitted when the key event is received.<br />
1471         /// </summary>
1472         /// <since_tizen> 3 </since_tizen>
1473         public event EventHandlerWithReturnType<object, KeyEventArgs, bool> KeyEvent
1474         {
1475             add
1476             {
1477                 if (_keyEventHandler == null)
1478                 {
1479                     _keyCallback = OnKeyEvent;
1480                     this.KeyEventSignal().Connect(_keyCallback);
1481                 }
1482
1483                 _keyEventHandler += value;
1484             }
1485
1486             remove
1487             {
1488                 _keyEventHandler -= value;
1489
1490                 if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
1491                 {
1492                     this.KeyEventSignal().Disconnect(_keyCallback);
1493                 }
1494             }
1495         }
1496
1497         /// <summary>
1498         /// An event for the OnRelayout signal which can be used to subscribe or unsubscribe the event handler.<br />
1499         /// The OnRelayout signal is emitted after the size has been set on the view during relayout.<br />
1500         /// </summary>
1501         /// <since_tizen> 3 </since_tizen>
1502         public event EventHandler Relayout
1503         {
1504             add
1505             {
1506                 if (_onRelayoutEventHandler == null)
1507                 {
1508                     _onRelayoutEventCallback = OnRelayout;
1509                     this.OnRelayoutSignal().Connect(_onRelayoutEventCallback);
1510                 }
1511
1512                 _onRelayoutEventHandler += value;
1513             }
1514
1515             remove
1516             {
1517                 _onRelayoutEventHandler -= value;
1518
1519                 if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
1520                 {
1521                     this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
1522                 }
1523
1524             }
1525         }
1526
1527         /// <summary>
1528         /// An event for the touched signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1529         /// The touched signal is emitted when the touch input is received.<br />
1530         /// </summary>
1531         /// <since_tizen> 3 </since_tizen>
1532         public event EventHandlerWithReturnType<object, TouchEventArgs, bool> TouchEvent
1533         {
1534             add
1535             {
1536                 if (_touchDataEventHandler == null)
1537                 {
1538                     _touchDataCallback = OnTouch;
1539                     this.TouchSignal().Connect(_touchDataCallback);
1540                 }
1541
1542                 _touchDataEventHandler += value;
1543             }
1544
1545             remove
1546             {
1547                 _touchDataEventHandler -= value;
1548
1549                 if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
1550                 {
1551                     this.TouchSignal().Disconnect(_touchDataCallback);
1552                 }
1553
1554             }
1555         }
1556
1557         /// <summary>
1558         /// An event for the hovered signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1559         /// The hovered signal is emitted when the hover input is received.<br />
1560         /// </summary>
1561         /// <since_tizen> 3 </since_tizen>
1562         public event EventHandlerWithReturnType<object, HoverEventArgs, bool> HoverEvent
1563         {
1564             add
1565             {
1566                 if (_hoverEventHandler == null)
1567                 {
1568                     _hoverEventCallback = OnHoverEvent;
1569                     this.HoveredSignal().Connect(_hoverEventCallback);
1570                 }
1571
1572                 _hoverEventHandler += value;
1573             }
1574
1575             remove
1576             {
1577                 _hoverEventHandler -= value;
1578
1579                 if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
1580                 {
1581                     this.HoveredSignal().Disconnect(_hoverEventCallback);
1582                 }
1583
1584             }
1585         }
1586
1587         /// <summary>
1588         /// An event for the WheelMoved signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1589         /// The WheelMoved signal is emitted when the wheel event is received.<br />
1590         /// </summary>
1591         /// <since_tizen> 3 </since_tizen>
1592         public event EventHandlerWithReturnType<object, WheelEventArgs, bool> WheelEvent
1593         {
1594             add
1595             {
1596                 if (_wheelEventHandler == null)
1597                 {
1598                     _wheelEventCallback = OnWheelEvent;
1599                     this.WheelEventSignal().Connect(_wheelEventCallback);
1600                 }
1601
1602                 _wheelEventHandler += value;
1603             }
1604
1605             remove
1606             {
1607                 _wheelEventHandler -= value;
1608
1609                 if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
1610                 {
1611                     this.WheelEventSignal().Disconnect(_wheelEventCallback);
1612                 }
1613
1614             }
1615         }
1616
1617         /// <summary>
1618         /// An event for the OnWindow signal which can be used to subscribe or unsubscribe the event handler.<br />
1619         /// The OnWindow signal is emitted after the view has been connected to the window.<br />
1620         /// </summary>
1621         /// <since_tizen> 3 </since_tizen>
1622         public event EventHandler AddedToWindow
1623         {
1624             add
1625             {
1626                 if (_onWindowEventHandler == null)
1627                 {
1628                     _onWindowEventCallback = OnWindow;
1629                     this.OnWindowSignal().Connect(_onWindowEventCallback);
1630                 }
1631
1632                 _onWindowEventHandler += value;
1633             }
1634
1635             remove
1636             {
1637                 _onWindowEventHandler -= value;
1638
1639                 if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false)
1640                 {
1641                     this.OnWindowSignal().Disconnect(_onWindowEventCallback);
1642                 }
1643             }
1644         }
1645
1646         /// <summary>
1647         /// An event for the OffWindow signal, which can be used to subscribe or unsubscribe the event handler.<br />
1648         /// OffWindow signal is emitted after the view has been disconnected from the window.<br />
1649         /// </summary>
1650         /// <since_tizen> 3 </since_tizen>
1651         public event EventHandler RemovedFromWindow
1652         {
1653             add
1654             {
1655                 if (_offWindowEventHandler == null)
1656                 {
1657                     _offWindowEventCallback = OffWindow;
1658                     this.OffWindowSignal().Connect(_offWindowEventCallback);
1659                 }
1660
1661                 _offWindowEventHandler += value;
1662             }
1663
1664             remove
1665             {
1666                 _offWindowEventHandler -= value;
1667
1668                 if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false)
1669                 {
1670                     this.OffWindowSignal().Disconnect(_offWindowEventCallback);
1671                 }
1672             }
1673         }
1674
1675         /// <summary>
1676         /// An event for visibility change which can be used to subscribe or unsubscribe the event handler.<br />
1677         /// This signal is emitted when the visible property of this or a parent view is changed.<br />
1678         /// </summary>
1679         /// <since_tizen> 3 </since_tizen>
1680         public event EventHandler<VisibilityChangedEventArgs> VisibilityChanged
1681         {
1682             add
1683             {
1684                 if (_visibilityChangedEventHandler == null)
1685                 {
1686                     _visibilityChangedEventCallback = OnVisibilityChanged;
1687                     VisibilityChangedSignal(this).Connect(_visibilityChangedEventCallback);
1688                 }
1689
1690                 _visibilityChangedEventHandler += value;
1691             }
1692
1693             remove
1694             {
1695                 _visibilityChangedEventHandler -= value;
1696
1697                 if (_visibilityChangedEventHandler == null && VisibilityChangedSignal(this).Empty() == false)
1698                 {
1699                     VisibilityChangedSignal(this).Disconnect(_visibilityChangedEventCallback);
1700                 }
1701             }
1702         }
1703
1704         /// <summary>
1705         /// Event for layout direction change which can be used to subscribe/unsubscribe the event handler.<br />
1706         /// This signal is emitted when the layout direction property of this or a parent view is changed.<br />
1707         /// </summary>
1708         /// <since_tizen> 4 </since_tizen>
1709         public event EventHandler<LayoutDirectionChangedEventArgs> LayoutDirectionChanged
1710         {
1711             add
1712             {
1713                 if (_layoutDirectionChangedEventHandler == null)
1714                 {
1715                     _layoutDirectionChangedEventCallback = OnLayoutDirectionChanged;
1716                     LayoutDirectionChangedSignal(this).Connect(_layoutDirectionChangedEventCallback);
1717                 }
1718
1719                 _layoutDirectionChangedEventHandler += value;
1720             }
1721
1722             remove
1723             {
1724                 _layoutDirectionChangedEventHandler -= value;
1725
1726                 if (_layoutDirectionChangedEventHandler == null && LayoutDirectionChangedSignal(this).Empty() == false)
1727                 {
1728                     LayoutDirectionChangedSignal(this).Disconnect(_layoutDirectionChangedEventCallback);
1729                 }
1730             }
1731         }
1732
1733         /// <summary>
1734         /// An event for the ResourcesLoadedSignal signal which can be used to subscribe or unsubscribe the event handler provided by the user.<br />
1735         /// This signal is emitted after all resources required by a view are loaded and ready.<br />
1736         /// </summary>
1737         /// <since_tizen> 3 </since_tizen>
1738         public event EventHandler ResourcesLoaded
1739         {
1740             add
1741             {
1742                 if (_resourcesLoadedEventHandler == null)
1743                 {
1744                     _ResourcesLoadedCallback = OnResourcesLoaded;
1745                     this.ResourcesLoadedSignal().Connect(_ResourcesLoadedCallback);
1746                 }
1747
1748                 _resourcesLoadedEventHandler += value;
1749             }
1750
1751             remove
1752             {
1753                 _resourcesLoadedEventHandler -= value;
1754
1755                 if (_resourcesLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1756                 {
1757                     this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
1758                 }
1759             }
1760         }
1761
1762         internal event EventHandler<BackgroundResourceLoadedEventArgs> BackgroundResourceLoaded
1763         {
1764             add
1765             {
1766                 if (_backgroundResourceLoadedEventHandler == null)
1767                 {
1768                     _backgroundResourceLoadedCallback = OnBackgroundResourceLoaded;
1769                     this.ResourcesLoadedSignal().Connect(_backgroundResourceLoadedCallback);
1770                 }
1771
1772                 _backgroundResourceLoadedEventHandler += value;
1773             }
1774             remove
1775             {
1776                 _backgroundResourceLoadedEventHandler -= value;
1777
1778                 if (_backgroundResourceLoadedEventHandler == null && ResourcesLoadedSignal().Empty() == false)
1779                 {
1780                     this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
1781                 }
1782             }
1783         }
1784
1785         /// <summary>
1786         /// Enumeration for describing the states of the view.
1787         /// </summary>
1788         /// <since_tizen> 3 </since_tizen>
1789         public enum States
1790         {
1791             /// <summary>
1792             /// The normal state.
1793             /// </summary>
1794             Normal,
1795             /// <summary>
1796             /// The focused state.
1797             /// </summary>
1798             Focused,
1799             /// <summary>
1800             /// The disabled state.
1801             /// </summary>
1802             Disabled
1803         }
1804
1805         /// <summary>
1806         /// Describes the direction to move the focus towards.
1807         /// </summary>
1808         /// <since_tizen> 3 </since_tizen>
1809         public enum FocusDirection
1810         {
1811             /// <summary>
1812             /// Move keyboard focus towards the left direction.
1813             /// </summary>
1814             /// <since_tizen> 3 </since_tizen>
1815             Left,
1816             /// <summary>
1817             /// Move keyboard focus towards the right direction.
1818             /// </summary>
1819             /// <since_tizen> 3 </since_tizen>
1820             Right,
1821             /// <summary>
1822             /// Move keyboard focus towards the up direction.
1823             /// </summary>
1824             /// <since_tizen> 3 </since_tizen>
1825             Up,
1826             /// <summary>
1827             /// Move keyboard focus towards the down direction.
1828             /// </summary>
1829             /// <since_tizen> 3 </since_tizen>
1830             Down,
1831             /// <summary>
1832             /// Move keyboard focus towards the previous page direction.
1833             /// </summary>
1834             /// <since_tizen> 3 </since_tizen>
1835             PageUp,
1836             /// <summary>
1837             /// Move keyboard focus towards the next page direction.
1838             /// </summary>
1839             /// <since_tizen> 3 </since_tizen>
1840             PageDown
1841         }
1842
1843         internal enum PropertyRange
1844         {
1845             PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1846             CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1847             CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000
1848         }
1849
1850         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1851         [EditorBrowsable(EditorBrowsableState.Never)]
1852         public bool IsResourcesCreated
1853         {
1854             get
1855             {
1856                 return Application.Current.IsResourcesCreated;
1857             }
1858         }
1859
1860         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1861         [EditorBrowsable(EditorBrowsableState.Never)]
1862         public ResourceDictionary XamlResources
1863         {
1864             get
1865             {
1866                 return Application.Current.XamlResources;
1867             }
1868             set
1869             {
1870                 Application.Current.XamlResources = value;
1871             }
1872         }
1873
1874         /// <summary>
1875         /// The StyleName, type string.
1876         /// </summary>
1877         /// <since_tizen> 3 </since_tizen>
1878         public string StyleName
1879         {
1880             get
1881             {
1882                 return (string)GetValue(StyleNameProperty);
1883             }
1884             set
1885             {
1886                 SetValue(StyleNameProperty, value);
1887                 NotifyPropertyChanged();
1888             }
1889         }
1890
1891         /// <summary>
1892         /// The mutually exclusive with BACKGROUND_IMAGE and BACKGROUND type Vector4.
1893         /// </summary>
1894         /// <since_tizen> 3 </since_tizen>
1895         public Color BackgroundColor
1896         {
1897             get
1898             {
1899                 return (Color)GetValue(BackgroundColorProperty);
1900             }
1901             set
1902             {
1903                 SetValue(BackgroundColorProperty, value);
1904                 NotifyPropertyChanged();
1905             }
1906         }
1907
1908         /// <summary>
1909         /// The mutually exclusive with BACKGROUND_COLOR and BACKGROUND type Map.
1910         /// </summary>
1911         /// <since_tizen> 3 </since_tizen>
1912         public string BackgroundImage
1913         {
1914             get
1915             {
1916                 return (string)GetValue(BackgroundImageProperty);
1917             }
1918             set
1919             {
1920                 SetValue(BackgroundImageProperty, value);
1921                 NotifyPropertyChanged();
1922             }
1923         }
1924
1925         /// <summary>
1926         /// The background of view.
1927         /// </summary>
1928         /// <since_tizen> 3 </since_tizen>
1929         public Tizen.NUI.PropertyMap Background
1930         {
1931             get
1932             {
1933                 return (PropertyMap)GetValue(BackgroundProperty);
1934             }
1935             set
1936             {
1937                 SetValue(BackgroundProperty, value);
1938                 NotifyPropertyChanged();
1939             }
1940         }
1941
1942
1943         /// <summary>
1944         /// The current state of the view.
1945         /// </summary>
1946         /// <since_tizen> 3 </since_tizen>
1947         public States State
1948         {
1949             get
1950             {
1951                 return (States)GetValue(StateProperty);
1952             }
1953             set
1954             {
1955                 SetValue(StateProperty, value);
1956                 NotifyPropertyChanged();
1957             }
1958         }
1959
1960         /// <summary>
1961         /// The current sub state of the view.
1962         /// </summary>
1963         /// <since_tizen> 3 </since_tizen>
1964         public States SubState
1965         {
1966             get
1967             {
1968                 return (States)GetValue(SubStateProperty);
1969             }
1970             set
1971             {
1972                 SetValue(SubStateProperty, value);
1973                 NotifyPropertyChanged();
1974             }
1975         }
1976
1977         /// <summary>
1978         /// Displays a tooltip
1979         /// </summary>
1980         /// <since_tizen> 3 </since_tizen>
1981         public Tizen.NUI.PropertyMap Tooltip
1982         {
1983             get
1984             {
1985                 return (PropertyMap)GetValue(TooltipProperty);
1986             }
1987             set
1988             {
1989                 SetValue(TooltipProperty, value);
1990                 NotifyPropertyChanged();
1991             }
1992         }
1993
1994         /// <summary>
1995         /// Displays a tooltip as a text.
1996         /// </summary>
1997         /// <since_tizen> 3 </since_tizen>
1998         public string TooltipText
1999         {
2000             set
2001             {
2002                 SetProperty(View.Property.TOOLTIP, new Tizen.NUI.PropertyValue(value));
2003                 NotifyPropertyChanged();
2004             }
2005         }
2006
2007         /// <summary>
2008         /// The Child property of FlexContainer.<br />
2009         /// The proportion of the free space in the container, the flex item will receive.<br />
2010         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
2011         /// </summary>
2012         /// <since_tizen> 3 </since_tizen>
2013         public float Flex
2014         {
2015             get
2016             {
2017                 return (float)GetValue(FlexProperty);
2018             }
2019             set
2020             {
2021                 SetValue(FlexProperty, value);
2022                 NotifyPropertyChanged();
2023             }
2024         }
2025
2026         /// <summary>
2027         /// The Child property of FlexContainer.<br />
2028         /// The alignment of the flex item along the cross axis, which, if set, overides the default alignment for all items in the container.<br />
2029         /// </summary>
2030         /// <since_tizen> 3 </since_tizen>
2031         public int AlignSelf
2032         {
2033             get
2034             {
2035                 return (int)GetValue(AlignSelfProperty);
2036             }
2037             set
2038             {
2039                 SetValue(AlignSelfProperty, value);
2040                 NotifyPropertyChanged();
2041             }
2042         }
2043
2044         /// <summary>
2045         /// The Child property of FlexContainer.<br />
2046         /// The space around the flex item.<br />
2047         /// </summary>
2048         /// <since_tizen> 3 </since_tizen>
2049         public Vector4 FlexMargin
2050         {
2051             get
2052             {
2053                 return (Vector4)GetValue(FlexMarginProperty);
2054             }
2055             set
2056             {
2057                 SetValue(FlexMarginProperty, value);
2058                 NotifyPropertyChanged();
2059             }
2060         }
2061
2062         /// <summary>
2063         /// The top-left cell this child occupies, if not set, the first available cell is used.
2064         /// </summary>
2065         /// <since_tizen> 3 </since_tizen>
2066         public Vector2 CellIndex
2067         {
2068             get
2069             {
2070                 return (Vector2)GetValue(CellIndexProperty);
2071             }
2072             set
2073             {
2074                 SetValue(CellIndexProperty, value);
2075                 NotifyPropertyChanged();
2076             }
2077         }
2078
2079         /// <summary>
2080         /// The number of rows this child occupies, if not set, the default value is 1.
2081         /// </summary>
2082         /// <since_tizen> 3 </since_tizen>
2083         public float RowSpan
2084         {
2085             get
2086             {
2087                 return (float)GetValue(RowSpanProperty);
2088             }
2089             set
2090             {
2091                 SetValue(RowSpanProperty, value);
2092                 NotifyPropertyChanged();
2093             }
2094         }
2095
2096         /// <summary>
2097         /// The number of columns this child occupies, if not set, the default value is 1.
2098         /// </summary>
2099         /// <since_tizen> 3 </since_tizen>
2100         public float ColumnSpan
2101         {
2102             get
2103             {
2104                 return (float)GetValue(ColumnSpanProperty);
2105             }
2106             set
2107             {
2108                 SetValue(ColumnSpanProperty, value);
2109                 NotifyPropertyChanged();
2110             }
2111         }
2112
2113         /// <summary>
2114         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
2115         /// </summary>
2116         /// <since_tizen> 3 </since_tizen>
2117         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
2118         {
2119             get
2120             {
2121                 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
2122             }
2123             set
2124             {
2125                 SetValue(CellHorizontalAlignmentProperty, value);
2126                 NotifyPropertyChanged();
2127             }
2128         }
2129
2130         /// <summary>
2131         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
2132         /// </summary>
2133         /// <since_tizen> 3 </since_tizen>
2134         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
2135         {
2136             get
2137             {
2138                 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
2139             }
2140             set
2141             {
2142                 SetValue(CellVerticalAlignmentProperty, value);
2143                 NotifyPropertyChanged();
2144             }
2145         }
2146
2147         /// <summary>
2148         /// The left focusable view.<br />
2149         /// This will return null if not set.<br />
2150         /// This will also return null if the specified left focusable view is not on a window.<br />
2151         /// </summary>
2152         /// <since_tizen> 3 </since_tizen>
2153         public View LeftFocusableView
2154         {
2155             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2156             get
2157             {
2158                 return (View)GetValue(LeftFocusableViewProperty);
2159             }
2160             set
2161             {
2162                 SetValue(LeftFocusableViewProperty, value);
2163                 NotifyPropertyChanged();
2164             }
2165         }
2166
2167         /// <summary>
2168         /// The right focusable view.<br />
2169         /// This will return null if not set.<br />
2170         /// This will also return null if the specified right focusable view is not on a window.<br />
2171         /// </summary>
2172         /// <since_tizen> 3 </since_tizen>
2173         public View RightFocusableView
2174         {
2175             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2176             get
2177             {
2178                 return (View)GetValue(RightFocusableViewProperty);
2179             }
2180             set
2181             {
2182                 SetValue(RightFocusableViewProperty, value);
2183                 NotifyPropertyChanged();
2184             }
2185         }
2186
2187         /// <summary>
2188         /// The up focusable view.<br />
2189         /// This will return null if not set.<br />
2190         /// This will also return null if the specified up focusable view is not on a window.<br />
2191         /// </summary>
2192         /// <since_tizen> 3 </since_tizen>
2193         public View UpFocusableView
2194         {
2195             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2196             get
2197             {
2198                 return (View)GetValue(UpFocusableViewProperty);
2199             }
2200             set
2201             {
2202                 SetValue(UpFocusableViewProperty, value);
2203                 NotifyPropertyChanged();
2204             }
2205         }
2206
2207         /// <summary>
2208         /// The down focusable view.<br />
2209         /// This will return null if not set.<br />
2210         /// This will also return null if the specified down focusable view is not on a window.<br />
2211         /// </summary>
2212         /// <since_tizen> 3 </since_tizen>
2213         public View DownFocusableView
2214         {
2215             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
2216             get
2217             {
2218                 return (View)GetValue(DownFocusableViewProperty);
2219             }
2220             set
2221             {
2222                 SetValue(DownFocusableViewProperty, value);
2223                 NotifyPropertyChanged();
2224             }
2225         }
2226
2227         /// <summary>
2228         /// Whether the view should be focusable by keyboard navigation.
2229         /// </summary>
2230         /// <since_tizen> 3 </since_tizen>
2231         public bool Focusable
2232         {
2233             set
2234             {
2235                 SetValue(FocusableProperty, value);
2236                 NotifyPropertyChanged();
2237             }
2238             get
2239             {
2240                 return (bool)GetValue(FocusableProperty);
2241             }
2242         }
2243
2244         /// <summary>
2245         ///  Retrieves the position of the view.<br />
2246         ///  The coordinates are relative to the view's parent.<br />
2247         /// </summary>
2248         /// <since_tizen> 3 </since_tizen>
2249         public Position CurrentPosition
2250         {
2251             get
2252             {
2253                 return GetCurrentPosition();
2254             }
2255         }
2256
2257         /// <summary>
2258         /// Sets the size of a view for the width and the height.<br />
2259         /// Geometry can be scaled to fit within this area.<br />
2260         /// This does not interfere with the view's scale factor.<br />
2261         /// The views default depth is the minimum of width and height.<br />
2262         /// </summary>
2263         /// <remarks>
2264         /// This NUI object (Size2D) typed property can be configured by multiple cascade setting. <br />
2265         /// For example, this code ( view.Size2D.Width = 100; view.Size2D.Height = 100; ) is equivalent to this ( view.Size2D = new Size2D(100, 100); ). <br />
2266         /// Please note that this multi-cascade setting is especially possible for this NUI object (Size2D). <br />
2267         /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2268         /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2269         /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2270         /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
2271         /// </remarks>
2272         /// <since_tizen> 3 </since_tizen>
2273         public Size2D Size2D
2274         {
2275             get
2276             {
2277                 Size2D temp = (Size2D)GetValue(Size2DProperty);
2278                 return new Size2D(OnSize2DChanged, temp.Width, temp.Height);
2279             }
2280             set
2281             {
2282                 SetValue(Size2DProperty, value);
2283                 // Set Specification so when layouts measure this View it matches the value set here.
2284                 // All Views are currently Layouts.
2285                 MeasureSpecificationWidth = new MeasureSpecification(new LayoutLength(value.Width), MeasureSpecification.ModeType.Exactly);
2286                 MeasureSpecificationHeight = new MeasureSpecification(new LayoutLength(value.Height), MeasureSpecification.ModeType.Exactly);
2287                 NotifyPropertyChanged();
2288             }
2289         }
2290
2291         /// <summary>
2292         ///  Retrieves the size of the view.<br />
2293         ///  The coordinates are relative to the view's parent.<br />
2294         /// </summary>
2295         /// <since_tizen> 3 </since_tizen>
2296         public Size2D CurrentSize
2297         {
2298             get
2299             {
2300                 return GetCurrentSize();
2301             }
2302         }
2303
2304         /// <summary>
2305         /// Retrieves and sets the view's opacity.<br />
2306         /// </summary>
2307         /// <since_tizen> 3 </since_tizen>
2308         public float Opacity
2309         {
2310             get
2311             {
2312                 return (float)GetValue(OpacityProperty);
2313             }
2314             set
2315             {
2316                 SetValue(OpacityProperty, value);
2317                 NotifyPropertyChanged();
2318             }
2319         }
2320
2321         /// <summary>
2322         /// Sets the position of the view for X and Y.<br />
2323         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2324         /// If the position inheritance is disabled, sets the world position.<br />
2325         /// </summary>
2326         /// <remarks>
2327         /// This NUI object (Position2D) typed property can be configured by multiple cascade setting. <br />
2328         /// For example, this code ( view.Position2D.X = 100; view.Position2D.Y = 100; ) is equivalent to this ( view.Position2D = new Position2D(100, 100); ). <br />
2329         /// Please note that this multi-cascade setting is especially possible for this NUI object (Position2D). <br />
2330         /// This means by default others are impossible so it is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
2331         /// For example, this code is working fine : view.Scale = new Vector3( 2.0f, 1.5f, 0.0f); <br />
2332         /// but this will not work! : view.Scale.X = 2.0f; view.Scale.Y = 1.5f; <br />
2333         /// </remarks>
2334         /// <since_tizen> 3 </since_tizen>
2335         public Position2D Position2D
2336         {
2337             get
2338             {
2339                 Position2D temp = (Position2D)GetValue(Position2DProperty);
2340                 return new Position2D(OnPosition2DChanged, temp.X, temp.Y);
2341             }
2342             set
2343             {
2344                 SetValue(Position2DProperty, value);
2345                 NotifyPropertyChanged();
2346             }
2347         }
2348
2349         /// <summary>
2350         /// Retrieves the screen postion of the view.<br />
2351         /// </summary>
2352         /// <since_tizen> 3 </since_tizen>
2353         public Vector2 ScreenPosition
2354         {
2355             get
2356             {
2357                 Vector2 temp = new Vector2(0.0f, 0.0f);
2358                 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
2359                 return temp;
2360             }
2361         }
2362
2363         /// <summary>
2364         /// Determines whether the pivot point should be used to determine the position of the view.
2365         /// This is true by default.
2366         /// </summary>
2367         /// <remarks>If false, then the top-left of the view is used for the position.
2368         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
2369         /// </remarks>
2370         /// <since_tizen> 3 </since_tizen>
2371         public bool PositionUsesPivotPoint
2372         {
2373             get
2374             {
2375                 return (bool)GetValue(PositionUsesPivotPointProperty);
2376             }
2377             set
2378             {
2379                 SetValue(PositionUsesPivotPointProperty, value);
2380                 NotifyPropertyChanged();
2381             }
2382         }
2383
2384         /// <summary>
2385         /// Please do not use! this will be deprecated.
2386         /// </summary>
2387         /// Please do not use! this will be deprecated!
2388         /// Instead please use PositionUsesPivotPoint.
2389         /// <since_tizen> 3 </since_tizen>
2390         [Obsolete("Please do not use! This will be deprecated! Please use PositionUsesPivotPoint instead! " +
2391             "Like: " +
2392             "View view = new View(); " +
2393             "view.PivotPoint = PivotPoint.Center; " +
2394             "view.PositionUsesPivotPoint = true;")]
2395         [EditorBrowsable(EditorBrowsableState.Never)]
2396         public bool PositionUsesAnchorPoint
2397         {
2398             get
2399             {
2400                 bool temp = false;
2401                 GetProperty(View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
2402                 return temp;
2403             }
2404             set
2405             {
2406                 SetProperty(View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
2407                 NotifyPropertyChanged();
2408             }
2409         }
2410
2411         /// <summary>
2412         /// Queries whether the view is connected to the stage.<br />
2413         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2414         /// </summary>
2415         /// <since_tizen> 3 </since_tizen>
2416         public bool IsOnWindow
2417         {
2418             get
2419             {
2420                 return OnWindow();
2421             }
2422         }
2423
2424         /// <summary>
2425         /// Gets the depth in the hierarchy for the view.
2426         /// </summary>
2427         /// <since_tizen> 3 </since_tizen>
2428         public int HierarchyDepth
2429         {
2430             get
2431             {
2432                 return GetHierarchyDepth();
2433             }
2434         }
2435
2436         /// <summary>
2437         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2438         /// </summary>
2439         /// <remarks>
2440         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2441         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2442         /// The values set by this property will likely change.
2443         /// </remarks>
2444         /// <since_tizen> 3 </since_tizen>
2445         public int SiblingOrder
2446         {
2447             get
2448             {
2449                 return (int)GetValue(SiblingOrderProperty);
2450             }
2451             set
2452             {
2453                 SetValue(SiblingOrderProperty, value);
2454                 NotifyPropertyChanged();
2455             }
2456         }
2457
2458         /// <summary>
2459         /// Returns the natural size of the view.
2460         /// </summary>
2461         /// <remarks>
2462         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2463         /// </remarks>
2464         /// <since_tizen> 5 </since_tizen>
2465         public Vector3 NaturalSize
2466         {
2467             get
2468             {
2469                 Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2470                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2471                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2472                 return ret;
2473             }
2474         }
2475
2476         /// <summary>
2477         /// Returns the natural size (Size2D) of the view.
2478         /// </summary>
2479         /// <remarks>
2480         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2481         /// </remarks>
2482         /// <since_tizen> 4 </since_tizen>
2483         public Size2D NaturalSize2D
2484         {
2485             get
2486             {
2487                 Vector3 temp = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
2488                 if (NDalicPINVOKE.SWIGPendingException.Pending)
2489                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2490
2491                 return new Size2D((int)temp.Width, (int)temp.Height);
2492             }
2493         }
2494
2495         /// <summary>
2496         /// Gets or sets the origin of a view within its parent's area.<br />
2497         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
2498         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2499         /// A view's position is the distance between this origin and the view's anchor-point.<br />
2500         /// </summary>
2501         /// <pre>The view has been initialized.</pre>
2502         /// <since_tizen> 3 </since_tizen>
2503         public Position ParentOrigin
2504         {
2505             get
2506             {
2507                 return (Position)GetValue(ParentOriginProperty);
2508             }
2509             set
2510             {
2511                 SetValue(ParentOriginProperty, value);
2512                 NotifyPropertyChanged();
2513             }
2514         }
2515
2516         /// <summary>
2517         /// Gets or sets the anchor-point of a view.<br />
2518         /// This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the view, and (1.0, 1.0, 0.5) is the bottom-right corner.<br />
2519         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2520         /// A view position is the distance between its parent-origin and this anchor-point.<br />
2521         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2522         /// <pre>The view has been initialized.</pre>
2523         /// </summary>
2524         /// <since_tizen> 3 </since_tizen>
2525         public Position PivotPoint
2526         {
2527             get
2528             {
2529                 return (Position)GetValue(PivotPointProperty);
2530             }
2531             set
2532             {
2533                 SetValue(PivotPointProperty, value);
2534                 NotifyPropertyChanged();
2535             }
2536         }
2537
2538         /// <summary>
2539         /// Gets or sets the size width of the view.
2540         /// </summary>
2541         /// <since_tizen> 3 </since_tizen>
2542         public float SizeWidth
2543         {
2544             get
2545             {
2546                 return (float)GetValue(SizeWidthProperty);
2547             }
2548             set
2549             {
2550                 SetValue(SizeWidthProperty, value);
2551                 WidthSpecification = (int)Math.Ceiling(value);
2552                 NotifyPropertyChanged();
2553             }
2554         }
2555
2556         /// <summary>
2557         /// Gets or sets the size height of the view.
2558         /// </summary>
2559         /// <since_tizen> 3 </since_tizen>
2560         public float SizeHeight
2561         {
2562             get
2563             {
2564                 return (float)GetValue(SizeHeightProperty);
2565             }
2566             set
2567             {
2568                 SetValue(SizeHeightProperty, value);
2569                 HeightSpecification = (int)Math.Ceiling(value);
2570                 NotifyPropertyChanged();
2571             }
2572         }
2573
2574         /// <summary>
2575         /// Gets or sets the position of the view.<br />
2576         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2577         /// If the position inheritance is disabled, sets the world position.<br />
2578         /// </summary>
2579         /// <since_tizen> 3 </since_tizen>
2580         public Position Position
2581         {
2582             get
2583             {
2584                 return (Position)GetValue(PositionProperty);
2585             }
2586             set
2587             {
2588                 SetValue(PositionProperty, value);
2589                 NotifyPropertyChanged();
2590             }
2591         }
2592
2593         /// <summary>
2594         /// Gets or sets the position X of the view.
2595         /// </summary>
2596         /// <since_tizen> 3 </since_tizen>
2597         public float PositionX
2598         {
2599             get
2600             {
2601                 return (float)GetValue(PositionXProperty);
2602             }
2603             set
2604             {
2605                 SetValue(PositionXProperty, value);
2606                 NotifyPropertyChanged();
2607             }
2608         }
2609
2610         /// <summary>
2611         /// Gets or sets the position Y of the view.
2612         /// </summary>
2613         /// <since_tizen> 3 </since_tizen>
2614         public float PositionY
2615         {
2616             get
2617             {
2618                 return (float)GetValue(PositionYProperty);
2619             }
2620             set
2621             {
2622                 SetValue(PositionYProperty, value);
2623                 NotifyPropertyChanged();
2624             }
2625         }
2626
2627         /// <summary>
2628         /// Gets or sets the position Z of the view.
2629         /// </summary>
2630         /// <since_tizen> 3 </since_tizen>
2631         public float PositionZ
2632         {
2633             get
2634             {
2635                 return (float)GetValue(PositionZProperty);
2636             }
2637             set
2638             {
2639                 SetValue(PositionZProperty, value);
2640                 NotifyPropertyChanged();
2641             }
2642         }
2643
2644         /// <summary>
2645         /// Gets or sets the world position of the view.
2646         /// </summary>
2647         /// <since_tizen> 3 </since_tizen>
2648         public Vector3 WorldPosition
2649         {
2650             get
2651             {
2652                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2653                 GetProperty(View.Property.WORLD_POSITION).Get(temp);
2654                 return temp;
2655             }
2656         }
2657
2658         /// <summary>
2659         /// Gets or sets the orientation of the view.<br />
2660         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2661         /// </summary>
2662         /// <remarks>This is an asynchronous method.</remarks>
2663         /// <since_tizen> 3 </since_tizen>
2664         public Rotation Orientation
2665         {
2666             get
2667             {
2668                 return (Rotation)GetValue(OrientationProperty);
2669             }
2670             set
2671             {
2672                 SetValue(OrientationProperty, value);
2673                 NotifyPropertyChanged();
2674             }
2675         }
2676
2677         /// <summary>
2678         /// Gets or sets the world orientation of the view.<br />
2679         /// </summary>
2680         /// <since_tizen> 3 </since_tizen>
2681         public Rotation WorldOrientation
2682         {
2683             get
2684             {
2685                 Rotation temp = new Rotation();
2686                 GetProperty(View.Property.WORLD_ORIENTATION).Get(temp);
2687                 return temp;
2688             }
2689         }
2690
2691         /// <summary>
2692         /// Gets or sets the scale factor applied to the view.<br />
2693         /// </summary>
2694         /// <since_tizen> 3 </since_tizen>
2695         public Vector3 Scale
2696         {
2697             get
2698             {
2699                 return (Vector3)GetValue(ScaleProperty);
2700             }
2701             set
2702             {
2703                 SetValue(ScaleProperty, value);
2704                 NotifyPropertyChanged();
2705             }
2706         }
2707
2708         /// <summary>
2709         /// Gets or sets the scale X factor applied to the view.
2710         /// </summary>
2711         /// <since_tizen> 3 </since_tizen>
2712         public float ScaleX
2713         {
2714             get
2715             {
2716                 return (float)GetValue(ScaleXProperty);
2717             }
2718             set
2719             {
2720                 SetValue(ScaleXProperty, value);
2721                 NotifyPropertyChanged();
2722             }
2723         }
2724
2725         /// <summary>
2726         /// Gets or sets the scale Y factor applied to the view.
2727         /// </summary>
2728         /// <since_tizen> 3 </since_tizen>
2729         public float ScaleY
2730         {
2731             get
2732             {
2733                 return (float)GetValue(ScaleYProperty);
2734             }
2735             set
2736             {
2737                 SetValue(ScaleYProperty, value);
2738                 NotifyPropertyChanged();
2739             }
2740         }
2741
2742         /// <summary>
2743         /// Gets or sets the scale Z factor applied to the view.
2744         /// </summary>
2745         /// <since_tizen> 3 </since_tizen>
2746         public float ScaleZ
2747         {
2748             get
2749             {
2750                 return (float)GetValue(ScaleZProperty);
2751             }
2752             set
2753             {
2754                 SetValue(ScaleZProperty, value);
2755                 NotifyPropertyChanged();
2756             }
2757         }
2758
2759         /// <summary>
2760         /// Gets the world scale of the view.
2761         /// </summary>
2762         /// <since_tizen> 3 </since_tizen>
2763         public Vector3 WorldScale
2764         {
2765             get
2766             {
2767                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
2768                 GetProperty(View.Property.WORLD_SCALE).Get(temp);
2769                 return temp;
2770             }
2771         }
2772
2773         /// <summary>
2774         /// Retrieves the visibility flag of the view.
2775         /// </summary>
2776         /// <remarks>
2777         /// If the view is not visible, then the view and its children will not be rendered.
2778         /// This is regardless of the individual visibility values of the children, i.e., the view will only be rendered if all of its parents have visibility set to true.
2779         /// </remarks>
2780         /// <since_tizen> 3 </since_tizen>
2781         public bool Visibility
2782         {
2783             get
2784             {
2785                 bool temp = false;
2786                 GetProperty(View.Property.VISIBLE).Get(out temp);
2787                 return temp;
2788             }
2789         }
2790
2791         /// <summary>
2792         /// Gets the view's world color.
2793         /// </summary>
2794         /// <since_tizen> 3 </since_tizen>
2795         public Vector4 WorldColor
2796         {
2797             get
2798             {
2799                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
2800                 GetProperty(View.Property.WORLD_COLOR).Get(temp);
2801                 return temp;
2802             }
2803         }
2804
2805         /// <summary>
2806         /// Gets or sets the view's name.
2807         /// </summary>
2808         /// <since_tizen> 3 </since_tizen>
2809         public string Name
2810         {
2811             get
2812             {
2813                 return (string)GetValue(NameProperty);
2814             }
2815             set
2816             {
2817                 SetValue(NameProperty, value);
2818                 NotifyPropertyChanged();
2819             }
2820         }
2821
2822         /// <summary>
2823         /// Get the number of children held by the view.
2824         /// </summary>
2825         /// <since_tizen> 3 </since_tizen>
2826         public new uint ChildCount
2827         {
2828             get
2829             {
2830                 return GetChildCount();
2831             }
2832         }
2833
2834         /// <summary>
2835         /// Gets the view's ID.
2836         /// Readonly
2837         /// </summary>
2838         /// <since_tizen> 3 </since_tizen>
2839         public uint ID
2840         {
2841             get
2842             {
2843                 return GetId();
2844             }
2845         }
2846
2847         /// <summary>
2848         /// Gets or sets the status of whether the view should emit touch or hover signals.
2849         /// </summary>
2850         /// <since_tizen> 3 </since_tizen>
2851         public bool Sensitive
2852         {
2853             get
2854             {
2855                 return (bool)GetValue(SensitiveProperty);
2856             }
2857             set
2858             {
2859                 SetValue(SensitiveProperty, value);
2860                 NotifyPropertyChanged();
2861             }
2862         }
2863
2864         /// <summary>
2865         /// Gets or sets the status of whether the view should receive a notification when touch or hover motion events leave the boundary of the view.
2866         /// </summary>
2867         /// <since_tizen> 3 </since_tizen>
2868         public bool LeaveRequired
2869         {
2870             get
2871             {
2872                 return (bool)GetValue(LeaveRequiredProperty);
2873             }
2874             set
2875             {
2876                 SetValue(LeaveRequiredProperty, value);
2877                 NotifyPropertyChanged();
2878             }
2879         }
2880
2881         /// <summary>
2882         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
2883         /// </summary>
2884         /// <since_tizen> 3 </since_tizen>
2885         public bool InheritOrientation
2886         {
2887             get
2888             {
2889                 return (bool)GetValue(InheritOrientationProperty);
2890             }
2891             set
2892             {
2893                 SetValue(InheritOrientationProperty, value);
2894                 NotifyPropertyChanged();
2895             }
2896         }
2897
2898         /// <summary>
2899         /// Gets or sets the status of whether a child view inherits it's parent's scale.
2900         /// </summary>
2901         /// <since_tizen> 3 </since_tizen>
2902         public bool InheritScale
2903         {
2904             get
2905             {
2906                 return (bool)GetValue(InheritScaleProperty);
2907             }
2908             set
2909             {
2910                 SetValue(InheritScaleProperty, value);
2911                 NotifyPropertyChanged();
2912             }
2913         }
2914
2915         /// <summary>
2916         /// Gets or sets the status of how the view and its children should be drawn.<br />
2917         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
2918         /// If an object is in a 3D layer, it will be depth-tested against other objects in the world, i.e., it may be obscured if other objects are in front.<br />
2919         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
2920         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
2921         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
2922         /// </summary>
2923         /// <since_tizen> 3 </since_tizen>
2924         public DrawModeType DrawMode
2925         {
2926             get
2927             {
2928                 return (DrawModeType)GetValue(DrawModeProperty);
2929             }
2930             set
2931             {
2932                 SetValue(DrawModeProperty, value);
2933                 NotifyPropertyChanged();
2934             }
2935         }
2936
2937         /// <summary>
2938         /// Gets or sets the relative to parent size factor of the view.<br />
2939         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
2940         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
2941         /// </summary>
2942         /// <since_tizen> 3 </since_tizen>
2943         public Vector3 SizeModeFactor
2944         {
2945             get
2946             {
2947                 return (Vector3)GetValue(SizeModeFactorProperty);
2948             }
2949             set
2950             {
2951                 SetValue(SizeModeFactorProperty, value);
2952                 NotifyPropertyChanged();
2953             }
2954         }
2955
2956         /// <summary>
2957         /// Gets or sets the width resize policy to be used.
2958         /// </summary>
2959         /// <since_tizen> 3 </since_tizen>
2960         public ResizePolicyType WidthResizePolicy
2961         {
2962             get
2963             {
2964                 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2965             }
2966             set
2967             {
2968                 SetValue(WidthResizePolicyProperty, value);
2969                 // Match ResizePolicy to new Layouting.
2970                 // Parent relative policies can not be mapped at this point as parent size unknown.
2971                 switch (value)
2972                 {
2973                     case ResizePolicyType.UseNaturalSize:
2974                     {
2975                         WidthSpecification = LayoutParamPolicies.WrapContent;
2976                         break;
2977                     }
2978                     case ResizePolicyType.FillToParent:
2979                     {
2980                         WidthSpecification = LayoutParamPolicies.MatchParent;
2981                         break;
2982                     }
2983                     case ResizePolicyType.FitToChildren:
2984                     {
2985                         WidthSpecification = LayoutParamPolicies.WrapContent;
2986                         break;
2987                     }
2988                     default:
2989                         break;
2990                 }
2991                 NotifyPropertyChanged();
2992             }
2993         }
2994
2995         /// <summary>
2996         /// Gets or sets the height resize policy to be used.
2997         /// </summary>
2998         /// <since_tizen> 3 </since_tizen>
2999         public ResizePolicyType HeightResizePolicy
3000         {
3001             get
3002             {
3003                 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
3004             }
3005             set
3006             {
3007                 SetValue(HeightResizePolicyProperty, value);
3008                 // Match ResizePolicy to new Layouting.
3009                 // Parent relative policies can not be mapped at this point as parent size unknown.
3010                 switch (value)
3011                 {
3012                     case ResizePolicyType.UseNaturalSize:
3013                     {
3014                         HeightSpecification = LayoutParamPolicies.WrapContent;
3015                         break;
3016                     }
3017                     case ResizePolicyType.FillToParent:
3018                     {
3019                         HeightSpecification = LayoutParamPolicies.MatchParent;
3020                         break;
3021                     }
3022                     case ResizePolicyType.FitToChildren:
3023                     {
3024                         HeightSpecification = LayoutParamPolicies.WrapContent;
3025                         break;
3026                     }
3027                     default:
3028                         break;
3029                 }
3030                 NotifyPropertyChanged();
3031             }
3032         }
3033
3034         /// <summary>
3035         /// Gets or sets the policy to use when setting size with size negotiation.<br />
3036         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3037         /// </summary>
3038         /// <since_tizen> 3 </since_tizen>
3039         public SizeScalePolicyType SizeScalePolicy
3040         {
3041             get
3042             {
3043                 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3044             }
3045             set
3046             {
3047                 SetValue(SizeScalePolicyProperty, value);
3048                 NotifyPropertyChanged();
3049             }
3050         }
3051
3052         /// <summary>
3053         ///  Gets or sets the status of whether the width size is dependent on the height size.
3054         /// </summary>
3055         /// <since_tizen> 3 </since_tizen>
3056         public bool WidthForHeight
3057         {
3058             get
3059             {
3060                 return (bool)GetValue(WidthForHeightProperty);
3061             }
3062             set
3063             {
3064                 SetValue(WidthForHeightProperty, value);
3065                 NotifyPropertyChanged();
3066             }
3067         }
3068
3069         /// <summary>
3070         /// Gets or sets the status of whether the height size is dependent on the width size.
3071         /// </summary>
3072         /// <since_tizen> 3 </since_tizen>
3073         public bool HeightForWidth
3074         {
3075             get
3076             {
3077                 return (bool)GetValue(HeightForWidthProperty);
3078             }
3079             set
3080             {
3081                 SetValue(HeightForWidthProperty, value);
3082                 NotifyPropertyChanged();
3083             }
3084         }
3085
3086         /// <summary>
3087         /// Gets or sets the padding for use in layout.
3088         /// </summary>
3089         /// <since_tizen> 5 </since_tizen>
3090         public Extents Padding
3091         {
3092             get
3093             {
3094                 // If View has a Layout then padding in stored in the base Layout class
3095                 if (Layout !=null)
3096                 {
3097                     return Layout.Padding;
3098                 }
3099                 else
3100                 {
3101                     return (Extents)GetValue(PaddingProperty);
3102                 }
3103                 // Two return points to prevent creating a zeroed Extent native object before assignment
3104             }
3105             set
3106             {
3107                 Extents padding = value;
3108                 if (Layout !=null)
3109                 {
3110                     // Layout set so store Padding in LayoutItem instead of in View.
3111                     // If View stores the Padding value then Legacy Size Negotiation will overwrite
3112                     // the position and sizes measure in the Layouting.
3113                     Layout.Padding = value;
3114                     // If Layout is a LayoutItem then it could be a View that handles it's own padding.
3115                     // Let the View keeps it's padding.  Still store Padding in Layout to reduce code paths.
3116                     if( Layout.GetType() != typeof(LayoutItem)) // If a Layout container of some kind.
3117                     {
3118                         padding =  new Extents(0,0,0,0); // Reset value stored in View.
3119                     }
3120                     _layout?.RequestLayout();
3121                 }
3122                 SetValue(PaddingProperty, padding);
3123                 NotifyPropertyChanged();
3124                 _layout?.RequestLayout();
3125             }
3126         }
3127
3128         /// <summary>
3129         /// Gets or sets the minimum size the view can be assigned in size negotiation.
3130         /// </summary>
3131         /// <since_tizen> 3 </since_tizen>
3132         public Size2D MinimumSize
3133         {
3134             get
3135             {
3136                 return (Size2D)GetValue(MinimumSizeProperty);
3137             }
3138             set
3139             {
3140                 if (_layout != null)
3141                 {
3142                     // Note: it only works if minimum size is >= than natural size.
3143                     // To force the size it should be done through the width&height spec or Size2D.
3144                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3145                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3146                     _layout.RequestLayout();
3147                 }
3148                 SetValue(MinimumSizeProperty, value);
3149                 NotifyPropertyChanged();
3150             }
3151         }
3152
3153         /// <summary>
3154         /// Gets or sets the maximum size the view can be assigned in size negotiation.
3155         /// </summary>
3156         /// <since_tizen> 3 </since_tizen>
3157         public Size2D MaximumSize
3158         {
3159             get
3160             {
3161                 return (Size2D)GetValue(MaximumSizeProperty);
3162             }
3163             set
3164             {
3165                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3166                 // MATCH_PARENT spec + parent container size can be used to limit
3167                 if (_layout != null)
3168                 {
3169                     // Note: it only works if minimum size is >= than natural size.
3170                     // To force the size it should be done through the width&height spec or Size2D.
3171                     _layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Width);
3172                     _layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Height);
3173                     _layout.RequestLayout();
3174                 }
3175                 SetValue(MaximumSizeProperty, value);
3176                 NotifyPropertyChanged();
3177             }
3178         }
3179
3180         /// <summary>
3181         /// Gets or sets whether a child view inherits it's parent's position.<br />
3182         /// Default is to inherit.<br />
3183         /// Switching this off means that using position sets the view's world position, i.e., translates from the world origin (0,0,0) to the pivot point of the view.<br />
3184         /// </summary>
3185         /// <since_tizen> 3 </since_tizen>
3186         public bool InheritPosition
3187         {
3188             get
3189             {
3190                 return (bool)GetValue(InheritPositionProperty);
3191             }
3192             set
3193             {
3194                 SetValue(InheritPositionProperty, value);
3195                 NotifyPropertyChanged();
3196             }
3197         }
3198
3199         /// <summary>
3200         /// Gets or sets the clipping behavior (mode) of it's children.
3201         /// </summary>
3202         /// <since_tizen> 3 </since_tizen>
3203         public ClippingModeType ClippingMode
3204         {
3205             get
3206             {
3207                 return (ClippingModeType)GetValue(ClippingModeProperty);
3208             }
3209             set
3210             {
3211                 SetValue(ClippingModeProperty, value);
3212                 NotifyPropertyChanged();
3213             }
3214         }
3215
3216         /// <summary>
3217         /// Gets the number of renderers held by the view.
3218         /// </summary>
3219         /// <since_tizen> 3 </since_tizen>
3220         public uint RendererCount
3221         {
3222             get
3223             {
3224                 return GetRendererCount();
3225             }
3226         }
3227
3228         /// <summary>
3229         /// [Obsolete("Please do not use! this will be deprecated")]
3230         /// </summary>
3231         /// <since_tizen> 3 </since_tizen>
3232         /// Please do not use! this will be deprecated!
3233         /// Instead please use PivotPoint.
3234         [Obsolete("Please do not use! This will be deprecated! Please use PivotPoint instead! " +
3235             "Like: " +
3236             "View view = new View(); " +
3237             "view.PivotPoint = PivotPoint.Center; " +
3238             "view.PositionUsesPivotPoint = true;")]
3239         [EditorBrowsable(EditorBrowsableState.Never)]
3240         public Position AnchorPoint
3241         {
3242             get
3243             {
3244                 Position temp = new Position(0.0f, 0.0f, 0.0f);
3245                 GetProperty(View.Property.ANCHOR_POINT).Get(temp);
3246                 return temp;
3247             }
3248             set
3249             {
3250                 SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value));
3251                 NotifyPropertyChanged();
3252             }
3253         }
3254
3255         /// <summary>
3256         /// Sets the size of a view for the width, the height and the depth.<br />
3257         /// Geometry can be scaled to fit within this area.<br />
3258         /// This does not interfere with the view's scale factor.<br />
3259         /// The views default depth is the minimum of width and height.<br />
3260         /// </summary>
3261         /// <remarks>
3262         /// Please note that multi-cascade setting is not possible for this NUI object. <br />
3263         /// It is recommended that NUI object typed properties are configured by their constructor with parameters. <br />
3264         /// For example, this code is working fine : view.Size = new Size( 1.0f, 1.0f, 0.0f); <br />
3265         /// but this will not work! : view.Size.Width = 2.0f; view.Size.Height = 2.0f; <br />
3266         /// It may not match the current value in some cases, i.e. when the animation is progressing or the maximum or minimu size is set. <br />
3267         /// </remarks>
3268         /// <since_tizen> 5 </since_tizen>
3269         public Size Size
3270         {
3271             get
3272             {
3273                 return (Size)GetValue(SizeProperty);
3274             }
3275             set
3276             {
3277                 SetValue(SizeProperty, value);
3278                 // Set Specification so when layouts measure this View it matches the value set here.
3279                 // All Views are currently Layouts.
3280                 WidthSpecification = (int)Math.Ceiling(value.Width);
3281                 HeightSpecification = (int)Math.Ceiling(value.Height);
3282                 NotifyPropertyChanged();
3283             }
3284         }
3285
3286         /// <summary>
3287         /// "Please DO NOT use! This will be deprecated! Please use 'Container GetParent() for derived class' instead!"
3288         /// </summary>
3289         /// <since_tizen> 3 </since_tizen>
3290         [Obsolete("Please do not use! This will be deprecated! Please use 'Container GetParent() for derived class' instead! " +
3291             "Like: " +
3292             "Container parent =  view.GetParent(); " +
3293             "View view = parent as View;")]
3294         [EditorBrowsable(EditorBrowsableState.Never)]
3295         public new View Parent
3296         {
3297             get
3298             {
3299                 View ret;
3300                 IntPtr cPtr = Interop.Actor.Actor_GetParent(swigCPtr);
3301                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3302                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3303
3304                 if (basehandle is Layer layer)
3305                 {
3306                     ret = new View(Layer.getCPtr(layer).Handle, false);
3307                     NUILog.Error("This Parent property is deprecated, shoud do not be used");
3308                 }
3309                 else
3310                 {
3311                     ret = basehandle as View;
3312                 }
3313
3314                 Interop.BaseHandle.delete_BaseHandle(CPtr);
3315                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3316
3317                 if (NDalicPINVOKE.SWIGPendingException.Pending)
3318                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3319                 return ret;
3320             }
3321         }
3322
3323         /// <summary>
3324         /// Gets/Sets whether inherit parent's the layout Direction.
3325         /// </summary>
3326         /// <since_tizen> 4 </since_tizen>
3327         public bool InheritLayoutDirection
3328         {
3329             get
3330             {
3331                 return (bool)GetValue(InheritLayoutDirectionProperty);
3332             }
3333             set
3334             {
3335                 SetValue(InheritLayoutDirectionProperty, value);
3336                 NotifyPropertyChanged();
3337             }
3338         }
3339
3340         /// <summary>
3341         /// Gets/Sets the layout Direction.
3342         /// </summary>
3343         /// <since_tizen> 4 </since_tizen>
3344         public ViewLayoutDirectionType LayoutDirection
3345         {
3346             get
3347             {
3348                 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
3349             }
3350             set
3351             {
3352                 SetValue(LayoutDirectionProperty, value);
3353                 NotifyPropertyChanged();
3354                 _layout?.RequestLayout();
3355             }
3356         }
3357
3358         /// <summary>
3359         /// Gets or sets the Margin for use in layout.
3360         /// </summary>
3361         /// <remarks>
3362         /// Margin property is supported by Layout algorithms and containers.
3363         /// Please Set Layout if you want to use Margin property.
3364         /// </remarks>
3365         /// <since_tizen> 4 </since_tizen>
3366         public Extents Margin
3367         {
3368             get
3369             {
3370                 // If View has a Layout then margin is stored in Layout.
3371                 if (Layout != null)
3372                 {
3373                     return Layout.Margin;
3374                 }
3375                 else
3376                 {
3377                     // If Layout not set then return margin stored in View.
3378                     return (Extents)GetValue(MarginProperty);
3379                 }
3380                 // Two return points to prevent creating a zeroed Extent native object before assignment
3381             }
3382             set
3383             {
3384                 if (Layout != null)
3385                 {
3386                     // Layout set so store Margin in LayoutItem instead of View.
3387                     // If View stores the Margin too then the Legacy Size Negotiation will
3388                     // overwrite the position and size values measured in the Layouting.
3389                     Layout.Margin = value;
3390                     SetValue(MarginProperty, new Extents(0,0,0,0));
3391                     _layout?.RequestLayout();
3392                 }
3393                 else
3394                 {
3395                     SetValue(MarginProperty, value);
3396                 }
3397                 NotifyPropertyChanged();
3398                 _layout?.RequestLayout();
3399             }
3400         }
3401
3402         ///<summary>
3403         /// The required policy for this dimension, ChildLayoutData enum or exact value.
3404         ///</summary>
3405         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3406         [EditorBrowsable(EditorBrowsableState.Never)]
3407         public int WidthSpecification
3408         {
3409             get
3410             {
3411                 return _widthPolicy;
3412             }
3413             set
3414             {
3415                 _widthPolicy = value;
3416                 if (_widthPolicy >= 0)
3417                 {
3418                     _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3419                     Size2D.Width = _widthPolicy;
3420                 }
3421                 _layout?.RequestLayout();
3422             }
3423         }
3424
3425         ///<summary>
3426         /// The required policy for this dimension, ChildLayoutData enum or exact value.
3427         ///</summary>
3428         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3429         [EditorBrowsable(EditorBrowsableState.Never)]
3430         public int HeightSpecification
3431         {
3432             get
3433             {
3434                 return _heightPolicy;
3435             }
3436             set
3437             {
3438                 _heightPolicy = value;
3439                 if (_heightPolicy >= 0)
3440                 {
3441                     _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3442                     Size2D.Height = _heightPolicy;
3443                 }
3444                _layout?.RequestLayout();
3445             }
3446         }
3447
3448
3449         /// <summary>
3450         /// [Obsolete("Please do not use! this will be deprecated")]
3451         /// </summary>
3452         /// Please do not use! this will be deprecated!
3453         /// Instead please use Padding.
3454         /// <since_tizen> 4 </since_tizen>
3455         [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3456         [EditorBrowsable(EditorBrowsableState.Never)]
3457         public Extents PaddingEX
3458         {
3459             get
3460             {
3461                 Extents temp = new Extents(0, 0, 0, 0);
3462                 GetProperty(View.Property.PADDING).Get(temp);
3463                 return temp;
3464             }
3465             set
3466             {
3467                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3468                 NotifyPropertyChanged();
3469                 _layout?.RequestLayout();
3470             }
3471         }
3472
3473         internal Style Style
3474         {
3475             get
3476             {
3477                 return (Style)GetValue(StyleProperty);
3478             }
3479             set
3480             {
3481                 SetValue(StyleProperty, value);
3482             }
3483         }
3484
3485         /// <summary>
3486         /// Child property to specify desired width
3487         /// </summary>
3488         internal int LayoutWidthSpecificationFixed
3489         {
3490             get
3491             {
3492                 return _widthPolicy;
3493             }
3494             set
3495             {
3496                 _widthPolicy = value;
3497                 _measureSpecificationWidth = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3498                 Size2D.Width = value;
3499                 _layout?.RequestLayout();
3500             }
3501         }
3502
3503         /// <summary>
3504         /// Child property to specify desired height
3505         /// </summary>
3506         internal int LayoutHeightSpecificationFixed
3507         {
3508             get
3509             {
3510                 return _heightPolicy;
3511             }
3512             set
3513             {
3514                 _heightPolicy = value;
3515                 _measureSpecificationHeight = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3516                 Size2D.Height = value;
3517                 _layout?.RequestLayout();
3518             }
3519         }
3520
3521         /// <summary>
3522         /// Child property to specify desired width, use MatchParent/WrapContent)
3523         /// </summary>
3524         internal ChildLayoutData LayoutWidthSpecification
3525         {
3526             get
3527             {
3528                 return (ChildLayoutData)_widthPolicy;
3529             }
3530             set
3531             {
3532                 _widthPolicy = (int)value;
3533             }
3534         }
3535
3536         /// <summary>
3537         /// Child property to specify desired height, use MatchParent/WrapContent)
3538         /// </summary>
3539         internal ChildLayoutData LayoutHeightSpecification
3540         {
3541             get
3542             {
3543                 return (ChildLayoutData)_heightPolicy;
3544             }
3545             set
3546             {
3547                 _heightPolicy = (int)value;
3548             }
3549         }
3550
3551         internal float Weight
3552         {
3553             get
3554             {
3555                 return _weight;
3556             }
3557             set
3558             {
3559                 _weight = value;
3560                 _layout.RequestLayout();
3561             }
3562         }
3563
3564         internal bool BackgroundImageSynchronosLoading
3565         {
3566             get
3567             {
3568                 return _backgroundImageSynchronosLoading;
3569             }
3570             set
3571             {
3572                 if (value != _backgroundImageSynchronosLoading)
3573                 {
3574                     string bgUrl = "";
3575                     PropertyMap bgMap = this.Background;
3576                     int visualType = 0;
3577                     bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3578                     if (visualType == (int)Visual.Type.Image)
3579                     {
3580                         bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3581                     }
3582                     if (bgUrl.Length != 0)
3583                     {
3584                         _backgroundImageSynchronosLoading = value;
3585                         bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3586                         this.Background = bgMap;
3587                     }
3588                 }
3589             }
3590         }
3591
3592         internal float WorldPositionX
3593         {
3594             get
3595             {
3596                 float temp = 0.0f;
3597                 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3598                 return temp;
3599             }
3600         }
3601
3602         internal float WorldPositionY
3603         {
3604             get
3605             {
3606                 float temp = 0.0f;
3607                 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3608                 return temp;
3609             }
3610         }
3611
3612         internal float WorldPositionZ
3613         {
3614             get
3615             {
3616                 float temp = 0.0f;
3617                 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3618                 return temp;
3619             }
3620         }
3621
3622         internal bool FocusState
3623         {
3624             get
3625             {
3626                 return IsKeyboardFocusable();
3627             }
3628             set
3629             {
3630                 SetKeyboardFocusable(value);
3631             }
3632         }
3633
3634         /// <summary>
3635         /// Set the layout on this View. Replaces any existing Layout.
3636         /// </summary>
3637         /// <remarks>
3638         /// </remarks>
3639         internal LayoutItem Layout
3640         {
3641             get
3642             {
3643                 return _layout;
3644             }
3645             set
3646             {
3647                 // Do nothing if layout provided is already set on this View.
3648                 if (value == _layout)
3649                 {
3650                     return;
3651                 }
3652
3653                 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
3654                 layoutingDisabled = false;
3655                 layoutSet = true;
3656
3657                 // If new layout being set already has a owner then that owner receives a replacement default layout.
3658                 // First check if the layout to be set already has a owner.
3659                 if (value?.Owner != null)
3660                 {
3661                     Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
3662                     // Previous owner of the layout gets a default layout as a replacement.
3663                     value.Owner.Layout = new LayoutGroup();
3664
3665                     // Copy Margin and Padding to replacement LayoutGroup.
3666                     value.Owner.Layout.Margin = value.Margin;
3667                     value.Owner.Layout.Padding = value.Padding;
3668                 }
3669
3670                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3671                 // View if no replacement. Previously margin and padding values would have been moved from
3672                 // the View to the layout.
3673                 if (_layout != null ) // Existing layout
3674                 {
3675                     if (value != null)
3676                     {
3677                         // Existing layout being replaced so copy over margin and padding values.
3678                         value.Margin = _layout.Margin;
3679                         value.Padding = _layout.Padding;
3680                     }
3681                     else
3682                     {
3683                       // Layout not being replaced so restore margin and padding to View.
3684                       SetValue(MarginProperty, _layout.Margin);
3685                       SetValue(PaddingProperty, _layout.Padding);
3686                       NotifyPropertyChanged();
3687                     }
3688                 }
3689                 else
3690                 {
3691                     // First Layout to be added to the View hence copy
3692
3693                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3694                     if (value !=null)
3695                     {
3696                         if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
3697                         {
3698                             // If View already has a margin set then store it in Layout instead.
3699                             value.Margin = Margin;
3700                             SetValue(MarginProperty, new Extents(0,0,0,0));
3701                             NotifyPropertyChanged();
3702                         }
3703
3704                         if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
3705                         {
3706                             // If View already has a padding set then store it in Layout instead.
3707                             value.Padding = Padding;
3708                             SetValue(PaddingProperty, new Extents(0,0,0,0));
3709                             NotifyPropertyChanged();
3710                         }
3711                     }
3712                 }
3713
3714                 // Remove existing layout from it's parent layout group.
3715                 _layout?.Unparent();
3716
3717                 // Set layout to this view
3718                 SetLayout(value);
3719             }
3720         }
3721
3722         internal void SetLayout(LayoutItem layout)
3723         {
3724             _layout = layout;
3725             _layout?.AttachToOwner(this);
3726             _layout?.RequestLayout();
3727         }
3728
3729         /// <summary>
3730         /// Stores the calculated width value and its ModeType. Width component.
3731         /// </summary>
3732         internal MeasureSpecification MeasureSpecificationWidth
3733         {
3734             set
3735             {
3736                 _measureSpecificationWidth = value;
3737                 _layout?.RequestLayout();
3738             }
3739             get
3740             {
3741                 return _measureSpecificationWidth;
3742             }
3743         }
3744
3745         /// <summary>
3746         /// Stores the calculated width value and its ModeType. Height component.
3747         /// </summary>
3748         internal MeasureSpecification MeasureSpecificationHeight
3749         {
3750             set
3751             {
3752                 _measureSpecificationHeight = value;
3753                 _layout?.RequestLayout();
3754             }
3755             get
3756             {
3757                 return _measureSpecificationHeight;
3758             }
3759         }
3760
3761         internal float ParentOriginX
3762         {
3763             get
3764             {
3765                 float temp = 0.0f;
3766                 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3767                 return temp;
3768             }
3769             set
3770             {
3771                 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3772                 NotifyPropertyChanged();
3773             }
3774         }
3775
3776         internal float ParentOriginY
3777         {
3778             get
3779             {
3780                 float temp = 0.0f;
3781                 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3782                 return temp;
3783             }
3784             set
3785             {
3786                 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3787                 NotifyPropertyChanged();
3788             }
3789         }
3790
3791         internal float ParentOriginZ
3792         {
3793             get
3794             {
3795                 float temp = 0.0f;
3796                 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3797                 return temp;
3798             }
3799             set
3800             {
3801                 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3802                 NotifyPropertyChanged();
3803             }
3804         }
3805
3806         internal float PivotPointX
3807         {
3808             get
3809             {
3810                 float temp = 0.0f;
3811                 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3812                 return temp;
3813             }
3814             set
3815             {
3816                 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3817             }
3818         }
3819
3820         internal float PivotPointY
3821         {
3822             get
3823             {
3824                 float temp = 0.0f;
3825                 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3826                 return temp;
3827             }
3828             set
3829             {
3830                 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3831             }
3832         }
3833
3834         internal float PivotPointZ
3835         {
3836             get
3837             {
3838                 float temp = 0.0f;
3839                 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3840                 return temp;
3841             }
3842             set
3843             {
3844                 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3845             }
3846         }
3847
3848         internal Matrix WorldMatrix
3849         {
3850             get
3851             {
3852                 Matrix temp = new Matrix();
3853                 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3854                 return temp;
3855             }
3856         }
3857
3858         private int LeftFocusableViewId
3859         {
3860             get
3861             {
3862                 int temp = 0;
3863                 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3864                 return temp;
3865             }
3866             set
3867             {
3868                 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3869             }
3870         }
3871
3872         private int RightFocusableViewId
3873         {
3874             get
3875             {
3876                 int temp = 0;
3877                 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3878                 return temp;
3879             }
3880             set
3881             {
3882                 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3883             }
3884         }
3885
3886         private int UpFocusableViewId
3887         {
3888             get
3889             {
3890                 int temp = 0;
3891                 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3892                 return temp;
3893             }
3894             set
3895             {
3896                 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3897             }
3898         }
3899
3900         private int DownFocusableViewId
3901         {
3902             get
3903             {
3904                 int temp = 0;
3905                 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3906                 return temp;
3907             }
3908             set
3909             {
3910                 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3911             }
3912         }
3913
3914         /// <summary>
3915         /// Perform an action on a visual registered to this view. <br />
3916         /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3917         /// </summary>
3918         /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3919         /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3920         /// <param name="attributes">Optional attributes for the action.</param>
3921         /// <since_tizen> 5 </since_tizen>
3922         public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3923         {
3924             Interop.View.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3925             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3926         }
3927
3928         /// <summary>
3929         /// Creates an animation to animate the background color visual. If there is no
3930         /// background visual, creates one with transparent black as it's mixColor.
3931         /// </summary>
3932         /// <since_tizen> 3 </since_tizen>
3933         public Animation AnimateBackgroundColor(object destinationValue,
3934                                                  int startTime,
3935                                                  int endTime,
3936                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
3937                                                  object initialValue = null)
3938         {
3939             Tizen.NUI.PropertyMap background = Background;
3940
3941             if (background.Empty())
3942             {
3943                 // If there is no background yet, ensure there is a transparent
3944                 // color visual
3945                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3946                 background = Background;
3947             }
3948             return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3949         }
3950
3951         /// <summary>
3952         /// Creates an animation to animate the mixColor of the named visual.
3953         /// </summary>
3954         /// <since_tizen> 3 </since_tizen>
3955         public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3956         {
3957             Animation animation = null;
3958             {
3959                 PropertyMap _animator = new PropertyMap();
3960                 if (alphaFunction != null)
3961                 {
3962                     _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3963                 }
3964
3965                 PropertyMap _timePeriod = new PropertyMap();
3966                 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3967                 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3968                 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3969
3970                 PropertyMap _transition = new PropertyMap();
3971                 _transition.Add("animator", new PropertyValue(_animator));
3972                 _transition.Add("target", new PropertyValue(targetVisual));
3973                 _transition.Add("property", new PropertyValue("mixColor"));
3974
3975                 if (initialColor != null)
3976                 {
3977                     PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3978                     _transition.Add("initialValue", initValue);
3979                 }
3980
3981                 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3982                 _transition.Add("targetValue", destValue);
3983                 TransitionData _transitionData = new TransitionData(_transition);
3984
3985                 animation = new Animation(Interop.View.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
3986                 if (NDalicPINVOKE.SWIGPendingException.Pending)
3987                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3988             }
3989             return animation;
3990         }
3991
3992         // From Container Base class
3993         /// <summary>
3994         /// Adds a child view to this view.
3995         /// </summary>
3996         /// <seealso cref="Container.Add" />
3997         /// <since_tizen> 4 </since_tizen>
3998         public override void Add(View child)
3999         {
4000             bool hasLayout = (_layout != null);
4001             Log.Info("NUI", "Add:" + child.Name + " to View:" + Name + "which has layout[" + hasLayout + "] + \n");
4002
4003             if (null == child)
4004             {
4005                 Tizen.Log.Fatal("NUI", "Child is null");
4006                 return;
4007             }
4008
4009             Container oldParent = child.GetParent();
4010             if (oldParent != this)
4011             {
4012                 // If child already has a parent then re-parent child
4013                 if (oldParent != null)
4014                 {
4015                     oldParent.Remove(child);
4016                 }
4017                 child.InternalParent = this;
4018
4019                 Interop.Actor.Actor_Add(swigCPtr, View.getCPtr(child));
4020
4021                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4022                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4023                 Children.Add(child);
4024
4025                 if (ChildAdded != null)
4026                 {
4027                     ChildAddedEventArgs e = new ChildAddedEventArgs
4028                     {
4029                         Added = child
4030                     };
4031                     ChildAdded(this, e);
4032                 }
4033             }
4034         }
4035
4036         /// <summary>
4037         /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
4038         /// </summary>
4039         /// <seealso cref="Container.Remove" />
4040         /// <since_tizen> 4 </since_tizen>
4041         public override void Remove(View child)
4042         {
4043             bool hasLayout = (_layout != null);
4044             Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n");
4045
4046             Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child));
4047             if (NDalicPINVOKE.SWIGPendingException.Pending)
4048                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4049
4050             Children.Remove(child);
4051             child.InternalParent = null;
4052
4053             if (ChildRemoved != null)
4054             {
4055                 ChildRemovedEventArgs e = new ChildRemovedEventArgs
4056                 {
4057                     Removed = child
4058                 };
4059                 ChildRemoved(this, e);
4060             }
4061         }
4062
4063         /// <summary>
4064         /// Retrieves a child view by index.
4065         /// </summary>
4066         /// <seealso cref="Container.GetChildAt" />
4067         /// <since_tizen> 4 </since_tizen>
4068         public override View GetChildAt(uint index)
4069         {
4070             if (index < Children.Count)
4071             {
4072                 return Children[Convert.ToInt32(index)];
4073             }
4074             else
4075             {
4076                 return null;
4077             }
4078         }
4079
4080         /// <summary>
4081         /// Retrieves the number of children held by the view.
4082         /// </summary>
4083         /// <seealso cref="Container.GetChildCount" />
4084         /// <since_tizen> 4 </since_tizen>
4085         public override uint GetChildCount()
4086         {
4087             return Convert.ToUInt32(Children.Count);
4088         }
4089
4090         /// <summary>
4091         /// Gets the views parent.
4092         /// </summary>
4093         /// <seealso cref="Container.GetParent()" />
4094         /// <since_tizen> 4 </since_tizen>
4095         public override Container GetParent()
4096         {
4097             return this.InternalParent as Container;
4098         }
4099
4100         /// <summary>
4101         /// Queries whether the view has a focus.
4102         /// </summary>
4103         /// <returns>True if this view has a focus.</returns>
4104         /// <since_tizen> 3 </since_tizen>
4105         public bool HasFocus()
4106         {
4107             bool ret = false;
4108             if (swigCPtr.Handle != global::System.IntPtr.Zero)
4109             {
4110                 ret = Interop.View.View_HasKeyInputFocus(swigCPtr);
4111                                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4112             }
4113             else
4114             {
4115                 Tizen.Log.Error("NUI", "swigCPtr of view is aleady disposed.");
4116             }
4117             return ret;
4118         }
4119
4120         /// <summary>
4121         /// Sets the name of the style to be applied to the view.
4122         /// </summary>
4123         /// <param name="styleName">A string matching a style described in a stylesheet.</param>
4124         /// <since_tizen> 3 </since_tizen>
4125         public void SetStyleName(string styleName)
4126         {
4127             Interop.View.View_SetStyleName(swigCPtr, styleName);
4128             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4129         }
4130
4131         /// <summary>
4132         /// Retrieves the name of the style to be applied to the view (if any).
4133         /// </summary>
4134         /// <returns>A string matching a style, or an empty string.</returns>
4135         /// <since_tizen> 3 </since_tizen>
4136         public string GetStyleName()
4137         {
4138             string ret = Interop.View.View_GetStyleName(swigCPtr);
4139             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4140             return ret;
4141         }
4142
4143         /// <summary>
4144         /// Clears the background.
4145         /// </summary>
4146         /// <since_tizen> 3 </since_tizen>
4147         public void ClearBackground()
4148         {
4149             Interop.View.View_ClearBackground(swigCPtr);
4150             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4151         }
4152
4153         /// <summary>
4154         /// Shows the view.
4155         /// </summary>
4156         /// <remarks>
4157         /// This is an asynchronous method.
4158         /// </remarks>
4159         /// <since_tizen> 3 </since_tizen>
4160         public void Show()
4161         {
4162             SetVisible(true);
4163         }
4164
4165         /// <summary>
4166         /// Hides the view.
4167         /// </summary>
4168         /// <remarks>
4169         /// This is an asynchronous method.
4170         /// If the view is hidden, then the view and its children will not be rendered.
4171         /// This is regardless of the individual visibility of the children, i.e., the view will only be rendered if all of its parents are shown.
4172         /// </remarks>
4173         /// <since_tizen> 3 </since_tizen>
4174         public void Hide()
4175         {
4176             SetVisible(false);
4177         }
4178
4179         /// <summary>
4180         /// Raises the view above all other views.
4181         /// </summary>
4182         /// <remarks>
4183         /// Sibling order of views within the parent will be updated automatically.
4184         /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
4185         /// </remarks>
4186         /// <since_tizen> 3 </since_tizen>
4187         public void RaiseToTop()
4188         {
4189             var parentChildren = GetParent()?.Children;
4190
4191             if (parentChildren != null)
4192             {
4193                 parentChildren.Remove(this);
4194                 parentChildren.Add(this);
4195
4196                 Interop.NDalic.RaiseToTop(swigCPtr);
4197                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4198                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4199             }
4200
4201         }
4202
4203         /// <summary>
4204         /// Lowers the view to the bottom of all views.
4205         /// </summary>
4206         /// <remarks>
4207         /// The sibling order of views within the parent will be updated automatically.
4208         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4209         /// </remarks>
4210         /// <since_tizen> 3 </since_tizen>
4211         public void LowerToBottom()
4212         {
4213             var parentChildren = GetParent()?.Children;
4214
4215             if (parentChildren != null)
4216             {
4217                 parentChildren.Remove(this);
4218                 parentChildren.Insert(0, this);
4219
4220                 Interop.NDalic.LowerToBottom(swigCPtr);
4221                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4222                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4223             }
4224         }
4225
4226         /// <summary>
4227         /// Queries if all resources required by a view are loaded and ready.
4228         /// </summary>
4229         /// <remarks>Most resources are only loaded when the control is placed on the stage.
4230         /// </remarks>
4231         /// <since_tizen> 3 </since_tizen>
4232         public bool IsResourceReady()
4233         {
4234             bool ret = Interop.View.IsResourceReady(swigCPtr);
4235             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4236             return ret;
4237         }
4238
4239         /// <summary>
4240         /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4241         /// </summary>
4242         /// <pre>The view has been initialized. </pre>
4243         /// <returns>The parent layer of view </returns>
4244         /// <since_tizen> 5 </since_tizen>
4245         public Layer GetLayer()
4246         {
4247             //to fix memory leak issue, match the handle count with native side.
4248             IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
4249             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4250             Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4251             Interop.BaseHandle.delete_BaseHandle(CPtr);
4252             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4253
4254             if (NDalicPINVOKE.SWIGPendingException.Pending)
4255                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4256             return ret;
4257         }
4258
4259         /// <summary>
4260         /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4261         /// </summary>
4262         /// <pre>The (child) view has been initialized. </pre>
4263         /// <since_tizen> 4 </since_tizen>
4264         public void Unparent()
4265         {
4266             GetParent()?.Remove(this);
4267         }
4268
4269         /// <summary>
4270         /// Search through this view's hierarchy for a view with the given name.
4271         /// The view itself is also considered in the search.
4272         /// </summary>
4273         /// <pre>The view has been initialized.</pre>
4274         /// <param name="viewName">The name of the view to find.</param>
4275         /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4276         /// <since_tizen> 3 </since_tizen>
4277         public View FindChildByName(string viewName)
4278         {
4279             //to fix memory leak issue, match the handle count with native side.
4280             IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
4281             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4282             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4283             Interop.BaseHandle.delete_BaseHandle(CPtr);
4284             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4285
4286             if (NDalicPINVOKE.SWIGPendingException.Pending)
4287                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4288             return ret;
4289         }
4290
4291         /// <summary>
4292         /// Converts screen coordinates into the view's coordinate system using the default camera.
4293         /// </summary>
4294         /// <pre>The view has been initialized.</pre>
4295         /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4296         /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4297         /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4298         /// <param name="screenX">The screen X-coordinate.</param>
4299         /// <param name="screenY">The screen Y-coordinate.</param>
4300         /// <returns>True if the conversion succeeded.</returns>
4301         /// <since_tizen> 3 </since_tizen>
4302         public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4303         {
4304             bool ret = Interop.Actor.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4305             if (NDalicPINVOKE.SWIGPendingException.Pending)
4306                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4307             return ret;
4308         }
4309
4310         /// <summary>
4311         /// Sets the relative to parent size factor of the view.<br />
4312         /// This factor is only used when ResizePolicy is set to either:
4313         /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4314         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4315         /// </summary>
4316         /// <pre>The view has been initialized.</pre>
4317         /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4318         /// <since_tizen> 3 </since_tizen>
4319         public void SetSizeModeFactor(Vector3 factor)
4320         {
4321             Interop.Actor.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4322             if (NDalicPINVOKE.SWIGPendingException.Pending)
4323                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4324         }
4325         /// <summary>
4326         /// Calculates the height of the view given a width.<br />
4327         /// The natural size is used for default calculation.<br />
4328         /// Size 0 is treated as aspect ratio 1:1.<br />
4329         /// </summary>
4330         /// <param name="width">The width to use.</param>
4331         /// <returns>The height based on the width.</returns>
4332         /// <since_tizen> 3 </since_tizen>
4333         public float GetHeightForWidth(float width)
4334         {
4335             float ret = Interop.Actor.Actor_GetHeightForWidth(swigCPtr, width);
4336             if (NDalicPINVOKE.SWIGPendingException.Pending)
4337                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4338             return ret;
4339         }
4340
4341         /// <summary>
4342         /// Calculates the width of the view given a height.<br />
4343         /// The natural size is used for default calculation.<br />
4344         /// Size 0 is treated as aspect ratio 1:1.<br />
4345         /// </summary>
4346         /// <param name="height">The height to use.</param>
4347         /// <returns>The width based on the height.</returns>
4348         /// <since_tizen> 3 </since_tizen>
4349         public float GetWidthForHeight(float height)
4350         {
4351             float ret = Interop.Actor.Actor_GetWidthForHeight(swigCPtr, height);
4352             if (NDalicPINVOKE.SWIGPendingException.Pending)
4353                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4354             return ret;
4355         }
4356
4357         /// <summary>
4358         /// Return the amount of size allocated for relayout.
4359         /// </summary>
4360         /// <param name="dimension">The dimension to retrieve.</param>
4361         /// <returns>Return the size.</returns>
4362         /// <since_tizen> 3 </since_tizen>
4363         public float GetRelayoutSize(DimensionType dimension)
4364         {
4365             float ret = Interop.Actor.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4366             if (NDalicPINVOKE.SWIGPendingException.Pending)
4367                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4368             return ret;
4369         }
4370
4371         /// <summary>
4372         /// Set the padding for the view.
4373         /// </summary>
4374         /// <param name="padding">Padding for the view.</param>
4375         /// <since_tizen> 3 </since_tizen>
4376         public void SetPadding(PaddingType padding)
4377         {
4378             Interop.Actor.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4379             if (NDalicPINVOKE.SWIGPendingException.Pending)
4380                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4381         }
4382
4383         /// <summary>
4384         /// Return the value of padding for the view.
4385         /// </summary>
4386         /// <param name="paddingOut">the value of padding for the view</param>
4387         /// <since_tizen> 3 </since_tizen>
4388         public void GetPadding(PaddingType paddingOut)
4389         {
4390             Interop.Actor.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4391             if (NDalicPINVOKE.SWIGPendingException.Pending)
4392                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4393         }
4394
4395         /// <since_tizen> 3 </since_tizen>
4396         public uint AddRenderer(Renderer renderer)
4397         {
4398             uint ret = Interop.Actor.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4399             if (NDalicPINVOKE.SWIGPendingException.Pending)
4400                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4401             return ret;
4402         }
4403
4404         /// <since_tizen> 3 </since_tizen>
4405         public Renderer GetRendererAt(uint index)
4406         {
4407             //to fix memory leak issue, match the handle count with native side.
4408             IntPtr cPtr = Interop.Actor.Actor_GetRendererAt(swigCPtr, index);
4409             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4410             Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4411             if (cPtr != null && ret == null)
4412             {
4413                 ret = new Renderer(cPtr, false);
4414                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4415                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4416                 return ret;
4417             }
4418             Interop.BaseHandle.delete_BaseHandle(CPtr);
4419             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4420
4421             if (NDalicPINVOKE.SWIGPendingException.Pending)
4422                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4423             return ret;
4424         }
4425
4426         /// <since_tizen> 3 </since_tizen>
4427         public void RemoveRenderer(Renderer renderer)
4428         {
4429             Interop.Actor.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4430             if (NDalicPINVOKE.SWIGPendingException.Pending)
4431                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4432         }
4433
4434         /// <since_tizen> 3 </since_tizen>
4435         public void RemoveRenderer(uint index)
4436         {
4437             Interop.Actor.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4438             if (NDalicPINVOKE.SWIGPendingException.Pending)
4439                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4440         }
4441
4442         internal void Raise()
4443         {
4444             var parentChildren = GetParent()?.Children;
4445
4446             if (parentChildren != null)
4447             {
4448                 int currentIndex = parentChildren.IndexOf(this);
4449
4450                 // If the view is not already the last item in the list.
4451                 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4452                 {
4453                     View temp = parentChildren[currentIndex + 1];
4454                     parentChildren[currentIndex + 1] = this;
4455                     parentChildren[currentIndex] = temp;
4456
4457                     Interop.NDalic.Raise(swigCPtr);
4458                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4459                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4460                 }
4461             }
4462         }
4463
4464         internal void Lower()
4465         {
4466             var parentChildren = GetParent()?.Children;
4467
4468             if (parentChildren != null)
4469             {
4470                 int currentIndex = parentChildren.IndexOf(this);
4471
4472                 // If the view is not already the first item in the list.
4473                 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4474                 {
4475                     View temp = parentChildren[currentIndex - 1];
4476                     parentChildren[currentIndex - 1] = this;
4477                     parentChildren[currentIndex] = temp;
4478
4479                     Interop.NDalic.Lower(swigCPtr);
4480                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4481                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4482                 }
4483             }
4484         }
4485
4486         /// <summary>
4487         /// Raises the view to above the target view.
4488         /// </summary>
4489         /// <remarks>The sibling order of views within the parent will be updated automatically.
4490         /// Views on the level above the target view will still be shown above this view.
4491         /// Raising this view above views with the same sibling order as each other will raise this view above them.
4492         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4493         /// </remarks>
4494         /// <param name="target">Will be raised above this view.</param>
4495         internal void RaiseAbove(View target)
4496         {
4497             var parentChildren = GetParent()?.Children;
4498
4499             if (parentChildren != null)
4500             {
4501                 int currentIndex = parentChildren.IndexOf(this);
4502                 int targetIndex = parentChildren.IndexOf(target);
4503
4504                 if (currentIndex < 0 || targetIndex < 0 ||
4505                     currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4506                 {
4507                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
4508                     return;
4509                 }
4510                 // If the currentIndex is less than the target index and the target has the same parent.
4511                 if (currentIndex < targetIndex)
4512                 {
4513                     parentChildren.Remove(this);
4514                     parentChildren.Insert(targetIndex, this);
4515
4516                     Interop.NDalic.RaiseAbove(swigCPtr, View.getCPtr(target));
4517                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4518                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4519                 }
4520             }
4521
4522         }
4523
4524         /// <summary>
4525         /// Lowers the view to below the target view.
4526         /// </summary>
4527         /// <remarks>The sibling order of views within the parent will be updated automatically.
4528         /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4529         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4530         /// </remarks>
4531         /// <param name="target">Will be lowered below this view.</param>
4532         internal void LowerBelow(View target)
4533         {
4534             var parentChildren = GetParent()?.Children;
4535
4536             if (parentChildren != null)
4537             {
4538                 int currentIndex = parentChildren.IndexOf(this);
4539                 int targetIndex = parentChildren.IndexOf(target);
4540                 if (currentIndex < 0 || targetIndex < 0 ||
4541                    currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4542                 {
4543                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
4544                     return;
4545                 }
4546
4547                 // If the currentIndex is not already the 0th index and the target has the same parent.
4548                 if ((currentIndex != 0) && (targetIndex != -1) &&
4549                     (currentIndex > targetIndex))
4550                 {
4551                     parentChildren.Remove(this);
4552                     parentChildren.Insert(targetIndex, this);
4553
4554                     Interop.NDalic.LowerBelow(swigCPtr, View.getCPtr(target));
4555                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4556                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4557                 }
4558             }
4559
4560         }
4561
4562         internal string GetName()
4563         {
4564             string ret = Interop.Actor.Actor_GetName(swigCPtr);
4565             if (NDalicPINVOKE.SWIGPendingException.Pending)
4566                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4567             return ret;
4568         }
4569
4570         internal void SetName(string name)
4571         {
4572             Interop.Actor.Actor_SetName(swigCPtr, name);
4573             if (NDalicPINVOKE.SWIGPendingException.Pending)
4574                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4575         }
4576
4577         internal uint GetId()
4578         {
4579             uint ret = Interop.Actor.Actor_GetId(swigCPtr);
4580             if (NDalicPINVOKE.SWIGPendingException.Pending)
4581                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4582             return ret;
4583         }
4584
4585         internal bool IsRoot()
4586         {
4587             bool ret = Interop.ActorInternal.Actor_IsRoot(swigCPtr);
4588             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4589             return ret;
4590         }
4591
4592         internal bool OnWindow()
4593         {
4594             bool ret = Interop.Actor.Actor_OnStage(swigCPtr);
4595             if (NDalicPINVOKE.SWIGPendingException.Pending)
4596                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4597             return ret;
4598         }
4599
4600         internal View FindChildById(uint id)
4601         {
4602             //to fix memory leak issue, match the handle count with native side.
4603             IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
4604             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4605             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4606             Interop.BaseHandle.delete_BaseHandle(CPtr);
4607             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4608
4609             if (NDalicPINVOKE.SWIGPendingException.Pending)
4610                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4611             return ret;
4612         }
4613
4614         internal void SetParentOrigin(Vector3 origin)
4615         {
4616             Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4617             if (NDalicPINVOKE.SWIGPendingException.Pending)
4618                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4619         }
4620
4621         internal Vector3 GetCurrentParentOrigin()
4622         {
4623             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4624             if (NDalicPINVOKE.SWIGPendingException.Pending)
4625                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4626             return ret;
4627         }
4628
4629         internal void SetAnchorPoint(Vector3 anchorPoint)
4630         {
4631             Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4632             if (NDalicPINVOKE.SWIGPendingException.Pending)
4633                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4634         }
4635
4636         internal Vector3 GetCurrentAnchorPoint()
4637         {
4638             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4639             if (NDalicPINVOKE.SWIGPendingException.Pending)
4640                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4641             return ret;
4642         }
4643
4644         internal void SetSize(float width, float height)
4645         {
4646             Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4647             if (NDalicPINVOKE.SWIGPendingException.Pending)
4648                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4649         }
4650
4651         internal void SetSize(float width, float height, float depth)
4652         {
4653             Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4654             if (NDalicPINVOKE.SWIGPendingException.Pending)
4655                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4656         }
4657
4658         internal void SetSize(Vector2 size)
4659         {
4660             Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4661             if (NDalicPINVOKE.SWIGPendingException.Pending)
4662                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4663         }
4664
4665         internal void SetSize(Vector3 size)
4666         {
4667             Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4668             if (NDalicPINVOKE.SWIGPendingException.Pending)
4669                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4670         }
4671
4672         internal Vector3 GetTargetSize()
4673         {
4674             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4675             if (NDalicPINVOKE.SWIGPendingException.Pending)
4676                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4677             return ret;
4678         }
4679
4680         internal Size2D GetCurrentSize()
4681         {
4682             Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4683             if (NDalicPINVOKE.SWIGPendingException.Pending)
4684                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4685             Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4686             return size;
4687         }
4688
4689         internal Vector3 GetNaturalSize()
4690         {
4691             Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4692             if (NDalicPINVOKE.SWIGPendingException.Pending)
4693                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4694             return ret;
4695         }
4696
4697         internal void SetPosition(float x, float y)
4698         {
4699             Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4700             if (NDalicPINVOKE.SWIGPendingException.Pending)
4701                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4702         }
4703
4704         internal void SetPosition(float x, float y, float z)
4705         {
4706             Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4707             if (NDalicPINVOKE.SWIGPendingException.Pending)
4708                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4709         }
4710
4711         internal void SetPosition(Vector3 position)
4712         {
4713             Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4714             if (NDalicPINVOKE.SWIGPendingException.Pending)
4715                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4716         }
4717
4718         internal void SetX(float x)
4719         {
4720             Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4721             if (NDalicPINVOKE.SWIGPendingException.Pending)
4722                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4723         }
4724
4725         internal void SetY(float y)
4726         {
4727             Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4728             if (NDalicPINVOKE.SWIGPendingException.Pending)
4729                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4730         }
4731
4732         internal void SetZ(float z)
4733         {
4734             Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4735             if (NDalicPINVOKE.SWIGPendingException.Pending)
4736                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4737         }
4738
4739         internal void TranslateBy(Vector3 distance)
4740         {
4741             Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4742             if (NDalicPINVOKE.SWIGPendingException.Pending)
4743                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4744         }
4745
4746         internal Position GetCurrentPosition()
4747         {
4748             Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4749             if (NDalicPINVOKE.SWIGPendingException.Pending)
4750                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4751             return ret;
4752         }
4753
4754         internal Vector3 GetCurrentWorldPosition()
4755         {
4756             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4757             if (NDalicPINVOKE.SWIGPendingException.Pending)
4758                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4759             return ret;
4760         }
4761
4762         internal void SetInheritPosition(bool inherit)
4763         {
4764             Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4765             if (NDalicPINVOKE.SWIGPendingException.Pending)
4766                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4767         }
4768
4769         internal bool IsPositionInherited()
4770         {
4771             bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4772             if (NDalicPINVOKE.SWIGPendingException.Pending)
4773                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4774             return ret;
4775         }
4776
4777         internal void SetOrientation(Degree angle, Vector3 axis)
4778         {
4779             Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4780             if (NDalicPINVOKE.SWIGPendingException.Pending)
4781                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4782         }
4783
4784         internal void SetOrientation(Radian angle, Vector3 axis)
4785         {
4786             Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4787             if (NDalicPINVOKE.SWIGPendingException.Pending)
4788                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4789         }
4790
4791         internal void SetOrientation(Rotation orientation)
4792         {
4793             Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4794             if (NDalicPINVOKE.SWIGPendingException.Pending)
4795                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4796         }
4797
4798         internal void RotateBy(Degree angle, Vector3 axis)
4799         {
4800             Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4801             if (NDalicPINVOKE.SWIGPendingException.Pending)
4802                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4803         }
4804
4805         internal void RotateBy(Radian angle, Vector3 axis)
4806         {
4807             Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4808             if (NDalicPINVOKE.SWIGPendingException.Pending)
4809                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4810         }
4811
4812         internal void RotateBy(Rotation relativeRotation)
4813         {
4814             Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4815             if (NDalicPINVOKE.SWIGPendingException.Pending)
4816                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4817         }
4818
4819         internal Rotation GetCurrentOrientation()
4820         {
4821             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4822             if (NDalicPINVOKE.SWIGPendingException.Pending)
4823                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4824             return ret;
4825         }
4826
4827         internal void SetInheritOrientation(bool inherit)
4828         {
4829             Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4830             if (NDalicPINVOKE.SWIGPendingException.Pending)
4831                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4832         }
4833
4834         internal bool IsOrientationInherited()
4835         {
4836             bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4837             if (NDalicPINVOKE.SWIGPendingException.Pending)
4838                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4839             return ret;
4840         }
4841
4842         internal Rotation GetCurrentWorldOrientation()
4843         {
4844             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4845             if (NDalicPINVOKE.SWIGPendingException.Pending)
4846                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4847             return ret;
4848         }
4849
4850         internal void SetScale(float scale)
4851         {
4852             Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4853             if (NDalicPINVOKE.SWIGPendingException.Pending)
4854                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4855         }
4856
4857         internal void SetScale(float scaleX, float scaleY, float scaleZ)
4858         {
4859             Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4860             if (NDalicPINVOKE.SWIGPendingException.Pending)
4861                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4862         }
4863
4864         internal void SetScale(Vector3 scale)
4865         {
4866             Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4867             if (NDalicPINVOKE.SWIGPendingException.Pending)
4868                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4869         }
4870
4871         internal void ScaleBy(Vector3 relativeScale)
4872         {
4873             Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4874             if (NDalicPINVOKE.SWIGPendingException.Pending)
4875                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4876         }
4877
4878         internal Vector3 GetCurrentScale()
4879         {
4880             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4881             if (NDalicPINVOKE.SWIGPendingException.Pending)
4882                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4883             return ret;
4884         }
4885
4886         internal Vector3 GetCurrentWorldScale()
4887         {
4888             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4889             if (NDalicPINVOKE.SWIGPendingException.Pending)
4890                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4891             return ret;
4892         }
4893
4894         internal void SetInheritScale(bool inherit)
4895         {
4896             Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4897             if (NDalicPINVOKE.SWIGPendingException.Pending)
4898                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4899         }
4900
4901         internal bool IsScaleInherited()
4902         {
4903             bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4904             if (NDalicPINVOKE.SWIGPendingException.Pending)
4905                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4906             return ret;
4907         }
4908
4909         internal Matrix GetCurrentWorldMatrix()
4910         {
4911             Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4912             if (NDalicPINVOKE.SWIGPendingException.Pending)
4913                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4914             return ret;
4915         }
4916
4917         internal void SetVisible(bool visible)
4918         {
4919             Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4920             if (NDalicPINVOKE.SWIGPendingException.Pending)
4921                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4922         }
4923
4924         internal bool IsVisible()
4925         {
4926             bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4927             if (NDalicPINVOKE.SWIGPendingException.Pending)
4928                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4929             return ret;
4930         }
4931
4932         internal void SetOpacity(float opacity)
4933         {
4934             Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4935             if (NDalicPINVOKE.SWIGPendingException.Pending)
4936                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4937         }
4938
4939         internal float GetCurrentOpacity()
4940         {
4941             float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4942             if (NDalicPINVOKE.SWIGPendingException.Pending)
4943                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4944             return ret;
4945         }
4946
4947         internal void SetColor(Vector4 color)
4948         {
4949             Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4950             if (NDalicPINVOKE.SWIGPendingException.Pending)
4951                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4952         }
4953
4954         internal Vector4 GetCurrentColor()
4955         {
4956             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4957             if (NDalicPINVOKE.SWIGPendingException.Pending)
4958                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4959             return ret;
4960         }
4961
4962         internal void SetColorMode(ColorMode colorMode)
4963         {
4964             Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4965             if (NDalicPINVOKE.SWIGPendingException.Pending)
4966                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4967         }
4968
4969         internal ColorMode GetColorMode()
4970         {
4971             ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4972             if (NDalicPINVOKE.SWIGPendingException.Pending)
4973                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4974             return ret;
4975         }
4976
4977         internal Vector4 GetCurrentWorldColor()
4978         {
4979             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
4980             if (NDalicPINVOKE.SWIGPendingException.Pending)
4981                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4982             return ret;
4983         }
4984
4985         internal void SetDrawMode(DrawModeType drawMode)
4986         {
4987             Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
4988             if (NDalicPINVOKE.SWIGPendingException.Pending)
4989                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4990         }
4991
4992         internal DrawModeType GetDrawMode()
4993         {
4994             DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
4995             if (NDalicPINVOKE.SWIGPendingException.Pending)
4996                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4997             return ret;
4998         }
4999
5000         internal void SetKeyboardFocusable(bool focusable)
5001         {
5002             Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
5003             if (NDalicPINVOKE.SWIGPendingException.Pending)
5004                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5005         }
5006
5007         internal bool IsKeyboardFocusable()
5008         {
5009             bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
5010             if (NDalicPINVOKE.SWIGPendingException.Pending)
5011                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5012             return ret;
5013         }
5014
5015         internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
5016         {
5017             Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
5018             if (NDalicPINVOKE.SWIGPendingException.Pending)
5019                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5020         }
5021
5022         internal ResizePolicyType GetResizePolicy(DimensionType dimension)
5023         {
5024             ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
5025             if (NDalicPINVOKE.SWIGPendingException.Pending)
5026                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5027             return ret;
5028         }
5029
5030         internal Vector3 GetSizeModeFactor()
5031         {
5032             Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
5033             if (NDalicPINVOKE.SWIGPendingException.Pending)
5034                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5035             return ret;
5036         }
5037
5038         internal void SetMinimumSize(Vector2 size)
5039         {
5040             Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
5041             if (NDalicPINVOKE.SWIGPendingException.Pending)
5042                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5043         }
5044
5045         internal Vector2 GetMinimumSize()
5046         {
5047             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
5048             if (NDalicPINVOKE.SWIGPendingException.Pending)
5049                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5050             return ret;
5051         }
5052
5053         internal void SetMaximumSize(Vector2 size)
5054         {
5055             Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
5056             if (NDalicPINVOKE.SWIGPendingException.Pending)
5057                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5058         }
5059
5060         internal Vector2 GetMaximumSize()
5061         {
5062             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
5063             if (NDalicPINVOKE.SWIGPendingException.Pending)
5064                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5065             return ret;
5066         }
5067
5068         internal int GetHierarchyDepth()
5069         {
5070             int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
5071             if (NDalicPINVOKE.SWIGPendingException.Pending)
5072                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5073             return ret;
5074         }
5075
5076         internal uint GetRendererCount()
5077         {
5078             uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
5079             if (NDalicPINVOKE.SWIGPendingException.Pending)
5080                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5081             return ret;
5082         }
5083
5084         internal TouchDataSignal TouchSignal()
5085         {
5086             TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
5087             if (NDalicPINVOKE.SWIGPendingException.Pending)
5088                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5089             return ret;
5090         }
5091
5092         internal HoverSignal HoveredSignal()
5093         {
5094             HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
5095             if (NDalicPINVOKE.SWIGPendingException.Pending)
5096                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5097             return ret;
5098         }
5099
5100         internal WheelSignal WheelEventSignal()
5101         {
5102             WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
5103             if (NDalicPINVOKE.SWIGPendingException.Pending)
5104                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5105             return ret;
5106         }
5107
5108         internal ViewSignal OnWindowSignal()
5109         {
5110             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5111             if (NDalicPINVOKE.SWIGPendingException.Pending)
5112                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5113             return ret;
5114         }
5115
5116         internal ViewSignal OffWindowSignal()
5117         {
5118             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5119             if (NDalicPINVOKE.SWIGPendingException.Pending)
5120                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5121             return ret;
5122         }
5123
5124         internal ViewSignal OnRelayoutSignal()
5125         {
5126             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5127             if (NDalicPINVOKE.SWIGPendingException.Pending)
5128                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5129             return ret;
5130         }
5131
5132         internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5133         {
5134             ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5135             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5136             return ret;
5137         }
5138
5139         internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5140         {
5141             ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5142             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5143             return ret;
5144         }
5145
5146         internal ViewSignal ResourcesLoadedSignal()
5147         {
5148             ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5149             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5150             return ret;
5151         }
5152
5153         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5154         {
5155             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5156         }
5157
5158         internal bool IsTopLevelView()
5159         {
5160             if (GetParent() is Layer)
5161             {
5162                 return true;
5163             }
5164             return false;
5165         }
5166
5167         internal void SetKeyInputFocus()
5168         {
5169             Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5170             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5171         }
5172
5173         internal void ClearKeyInputFocus()
5174         {
5175             Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5176             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5177         }
5178
5179         internal PinchGestureDetector GetPinchGestureDetector()
5180         {
5181             PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5182             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5183             return ret;
5184         }
5185
5186         internal PanGestureDetector GetPanGestureDetector()
5187         {
5188             PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5189             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5190             return ret;
5191         }
5192
5193         internal TapGestureDetector GetTapGestureDetector()
5194         {
5195             TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5197             return ret;
5198         }
5199
5200         internal LongPressGestureDetector GetLongPressGestureDetector()
5201         {
5202             LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5204             return ret;
5205         }
5206
5207         internal void SetBackgroundColor(Vector4 color)
5208         {
5209             Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5210             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5211         }
5212
5213         internal Vector4 GetBackgroundColor()
5214         {
5215             Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5217             return ret;
5218         }
5219
5220         internal void SetBackgroundImage(Image image)
5221         {
5222             Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5223             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5224         }
5225
5226         internal ControlKeySignal KeyEventSignal()
5227         {
5228             ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5229             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5230             return ret;
5231         }
5232
5233         internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5234         {
5235             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5236             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5237             return ret;
5238         }
5239
5240         internal KeyInputFocusSignal KeyInputFocusLostSignal()
5241         {
5242             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5243             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5244             return ret;
5245         }
5246
5247         internal IntPtr GetPtrfromView()
5248         {
5249             return (IntPtr)swigCPtr;
5250         }
5251
5252         /// <summary>
5253         /// Removes the layout from this View.
5254         /// </summary>
5255         internal void ResetLayout()
5256         {
5257             _layout = null;
5258         }
5259
5260         internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5261         {
5262             return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5263         }
5264
5265         /// <summary>
5266         /// you can override it to clean-up your own resources.
5267         /// </summary>
5268         /// <param name="type">DisposeTypes</param>
5269         /// <since_tizen> 3 </since_tizen>
5270         protected override void Dispose(DisposeTypes type)
5271         {
5272             if (disposed)
5273             {
5274                 return;
5275             }
5276
5277             if (type == DisposeTypes.Explicit)
5278             {
5279                 //Called by User
5280                 //Release your own managed resources here.
5281                 //You should release all of your own disposable objects here.
5282             }
5283
5284             //Release your own unmanaged resources here.
5285             //You should not access any managed member here except static instance.
5286             //because the execution order of Finalizes is non-deterministic.
5287             if (this != null)
5288             {
5289                 DisConnectFromSignals();
5290             }
5291
5292             if (swigCPtr.Handle != global::System.IntPtr.Zero)
5293             {
5294                 if (swigCMemOwn)
5295                 {
5296                     swigCMemOwn = false;
5297                     Interop.View.delete_View(swigCPtr);
5298                 }
5299                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5300             }
5301
5302             foreach (View view in Children)
5303             {
5304                 view.InternalParent = null;
5305             }
5306
5307             base.Dispose(type);
5308
5309         }
5310
5311         private void OnSize2DChanged(int width, int height)
5312         {
5313             Size2D = new Size2D(width, height);
5314         }
5315
5316         private void OnPosition2DChanged(int x, int y)
5317         {
5318             Position2D = new Position2D(x, y);
5319         }
5320
5321         private void DisConnectFromSignals()
5322         {
5323             // Save current CPtr.
5324             global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5325
5326             // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5327             swigCPtr = GetBaseHandleCPtrHandleRef;
5328
5329             if (_onRelayoutEventCallback != null)
5330             {
5331                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5332             }
5333
5334             if (_offWindowEventCallback != null)
5335             {
5336                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5337             }
5338
5339             if (_onWindowEventCallback != null)
5340             {
5341                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5342             }
5343
5344             if (_wheelEventCallback != null)
5345             {
5346                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5347             }
5348
5349             if (_hoverEventCallback != null)
5350             {
5351                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5352             }
5353
5354             if (_touchDataCallback != null)
5355             {
5356                 this.TouchSignal().Disconnect(_touchDataCallback);
5357             }
5358
5359             if (_ResourcesLoadedCallback != null)
5360             {
5361                 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5362             }
5363
5364             if (_offWindowEventCallback != null)
5365             {
5366                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5367             }
5368
5369             if (_onWindowEventCallback != null)
5370             {
5371                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5372             }
5373
5374             if (_wheelEventCallback != null)
5375             {
5376                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5377             }
5378
5379             if (_hoverEventCallback != null)
5380             {
5381                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5382             }
5383
5384             if (_touchDataCallback != null)
5385             {
5386                 this.TouchSignal().Disconnect(_touchDataCallback);
5387             }
5388
5389             if (_onRelayoutEventCallback != null)
5390             {
5391                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5392             }
5393
5394             if (_keyCallback != null)
5395             {
5396                 this.KeyEventSignal().Disconnect(_keyCallback);
5397             }
5398
5399             if (_keyInputFocusLostCallback != null)
5400             {
5401                 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5402             }
5403
5404             if (_keyInputFocusGainedCallback != null)
5405             {
5406                 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5407             }
5408
5409             if (_backgroundResourceLoadedCallback != null)
5410             {
5411                 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5412             }
5413
5414             if (_onWindowSendEventCallback != null)
5415             {
5416                 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5417             }
5418
5419             // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5420             // Restore current CPtr.
5421             swigCPtr = currentCPtr;
5422         }
5423
5424         private void OnKeyInputFocusGained(IntPtr view)
5425         {
5426             if (_keyInputFocusGainedEventHandler != null)
5427             {
5428                 _keyInputFocusGainedEventHandler(this, null);
5429             }
5430         }
5431
5432         private void OnKeyInputFocusLost(IntPtr view)
5433         {
5434             if (_keyInputFocusLostEventHandler != null)
5435             {
5436                 _keyInputFocusLostEventHandler(this, null);
5437             }
5438         }
5439
5440         private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5441         {
5442             if (keyEvent == global::System.IntPtr.Zero)
5443             {
5444                 NUILog.Error("keyEvent should not be null!");
5445                 return true;
5446             }
5447
5448             KeyEventArgs e = new KeyEventArgs();
5449
5450             bool result = false;
5451
5452             e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5453
5454             if (_keyEventHandler != null)
5455             {
5456                 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5457
5458                 // Oring the result of each callback.
5459                 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5460                 {
5461                     result |= del(this, e);
5462                 }
5463             }
5464
5465             return result;
5466         }
5467
5468         // Callback for View OnRelayout signal
5469         private void OnRelayout(IntPtr data)
5470         {
5471             if (_onRelayoutEventHandler != null)
5472             {
5473                 _onRelayoutEventHandler(this, null);
5474             }
5475         }
5476
5477         // Callback for View TouchSignal
5478         private bool OnTouch(IntPtr view, IntPtr touchData)
5479         {
5480             if (touchData == global::System.IntPtr.Zero)
5481             {
5482                 NUILog.Error("touchData should not be null!");
5483                 return true;
5484             }
5485
5486             TouchEventArgs e = new TouchEventArgs();
5487
5488             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5489
5490             if (_touchDataEventHandler != null)
5491             {
5492                 return _touchDataEventHandler(this, e);
5493             }
5494             return false;
5495         }
5496
5497         // Callback for View Hover signal
5498         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5499         {
5500             if (hoverEvent == global::System.IntPtr.Zero)
5501             {
5502                 NUILog.Error("hoverEvent should not be null!");
5503                 return true;
5504             }
5505
5506             HoverEventArgs e = new HoverEventArgs();
5507
5508             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5509
5510             if (_hoverEventHandler != null)
5511             {
5512                 return _hoverEventHandler(this, e);
5513             }
5514             return false;
5515         }
5516
5517         // Callback for View Wheel signal
5518         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5519         {
5520             if (wheelEvent == global::System.IntPtr.Zero)
5521             {
5522                 NUILog.Error("wheelEvent should not be null!");
5523                 return true;
5524             }
5525
5526             WheelEventArgs e = new WheelEventArgs();
5527
5528             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5529
5530             if (_wheelEventHandler != null)
5531             {
5532                 return _wheelEventHandler(this, e);
5533             }
5534             return false;
5535         }
5536
5537         // Callback for View OnWindow signal
5538         private void OnWindow(IntPtr data)
5539         {
5540             if (_onWindowEventHandler != null)
5541             {
5542                 _onWindowEventHandler(this, null);
5543             }
5544         }
5545
5546         // Callback for View OffWindow signal
5547         private void OffWindow(IntPtr data)
5548         {
5549             if (_offWindowEventHandler != null)
5550             {
5551                 _offWindowEventHandler(this, null);
5552             }
5553         }
5554
5555         // Callback for View visibility change signal
5556         private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5557         {
5558             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5559             if (data != null)
5560             {
5561                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5562             }
5563             e.Visibility = visibility;
5564             e.Type = type;
5565
5566             if (_visibilityChangedEventHandler != null)
5567             {
5568                 _visibilityChangedEventHandler(this, e);
5569             }
5570         }
5571
5572         // Callback for View layout direction change signal
5573         private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5574         {
5575             LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5576             if (data != null)
5577             {
5578                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5579             }
5580             e.Type = type;
5581
5582             if (_layoutDirectionChangedEventHandler != null)
5583             {
5584                 _layoutDirectionChangedEventHandler(this, e);
5585             }
5586         }
5587
5588         private void OnResourcesLoaded(IntPtr view)
5589         {
5590             if (_resourcesLoadedEventHandler != null)
5591             {
5592                 _resourcesLoadedEventHandler(this, null);
5593             }
5594         }
5595
5596         private View ConvertIdToView(uint id)
5597         {
5598             View view = null;
5599             if (GetParent() is View)
5600             {
5601                 View parentView = GetParent() as View;
5602                 view = parentView.FindChildById(id);
5603             }
5604
5605             if (!view)
5606             {
5607                 view = Window.Instance.GetRootLayer().FindChildById(id);
5608             }
5609
5610             return view;
5611         }
5612
5613         private void OnBackgroundResourceLoaded(IntPtr view)
5614         {
5615             BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5616             e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5617
5618             if (_backgroundResourceLoadedEventHandler != null)
5619             {
5620                 _backgroundResourceLoadedEventHandler(this, e);
5621             }
5622         }
5623
5624         /// <summary>
5625         /// Event argument passed through the ChildAdded event.
5626         /// </summary>
5627         /// <since_tizen> 5 </since_tizen>
5628         public class ChildAddedEventArgs : EventArgs
5629         {
5630             /// <summary>
5631             /// Added child view at moment.
5632             /// </summary>
5633             /// <since_tizen> 5 </since_tizen>
5634             public View Added { get; set; }
5635         }
5636
5637         /// <summary>
5638         /// Event argument passed through the ChildRemoved event.
5639         /// </summary>
5640         /// <since_tizen> 5 </since_tizen>
5641         public class ChildRemovedEventArgs : EventArgs
5642         {
5643             /// <summary>
5644             /// Removed child view at moment.
5645             /// </summary>
5646             /// <since_tizen> 5 </since_tizen>
5647             public View Removed { get; set; }
5648         }
5649
5650         /// <summary>
5651         /// Event arguments that passed via the KeyEvent signal.
5652         /// </summary>
5653         /// <since_tizen> 3 </since_tizen>
5654         public class KeyEventArgs : EventArgs
5655         {
5656             private Key _key;
5657
5658             /// <summary>
5659             /// Key - is the key sent to the view.
5660             /// </summary>
5661             /// <since_tizen> 3 </since_tizen>
5662             public Key Key
5663             {
5664                 get
5665                 {
5666                     return _key;
5667                 }
5668                 set
5669                 {
5670                     _key = value;
5671                 }
5672             }
5673         }
5674
5675         /// <summary>
5676         /// Event arguments that passed via the touch signal.
5677         /// </summary>
5678         /// <since_tizen> 3 </since_tizen>
5679         public class TouchEventArgs : EventArgs
5680         {
5681             private Touch _touch;
5682
5683             /// <summary>
5684             /// Touch - contains the information of touch points.
5685             /// </summary>
5686             /// <since_tizen> 3 </since_tizen>
5687             public Touch Touch
5688             {
5689                 get
5690                 {
5691                     return _touch;
5692                 }
5693                 set
5694                 {
5695                     _touch = value;
5696                 }
5697             }
5698         }
5699
5700         /// <summary>
5701         /// Event arguments that passed via the hover signal.
5702         /// </summary>
5703         /// <since_tizen> 3 </since_tizen>
5704         public class HoverEventArgs : EventArgs
5705         {
5706             private Hover _hover;
5707
5708             /// <summary>
5709             /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5710             /// </summary>
5711             /// <since_tizen> 3 </since_tizen>
5712             public Hover Hover
5713             {
5714                 get
5715                 {
5716                     return _hover;
5717                 }
5718                 set
5719                 {
5720                     _hover = value;
5721                 }
5722             }
5723         }
5724
5725         /// <summary>
5726         /// Event arguments that passed via the wheel signal.
5727         /// </summary>
5728         /// <since_tizen> 3 </since_tizen>
5729         public class WheelEventArgs : EventArgs
5730         {
5731             private Wheel _wheel;
5732
5733             /// <summary>
5734             /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5735             /// </summary>
5736             /// <since_tizen> 3 </since_tizen>
5737             public Wheel Wheel
5738             {
5739                 get
5740                 {
5741                     return _wheel;
5742                 }
5743                 set
5744                 {
5745                     _wheel = value;
5746                 }
5747             }
5748         }
5749
5750         /// <summary>
5751         /// Event arguments of visibility changed.
5752         /// </summary>
5753         /// <since_tizen> 3 </since_tizen>
5754         public class VisibilityChangedEventArgs : EventArgs
5755         {
5756             private View _view;
5757             private bool _visibility;
5758             private VisibilityChangeType _type;
5759
5760             /// <summary>
5761             /// The view, or child of view, whose visibility has changed.
5762             /// </summary>
5763             /// <since_tizen> 3 </since_tizen>
5764             public View View
5765             {
5766                 get
5767                 {
5768                     return _view;
5769                 }
5770                 set
5771                 {
5772                     _view = value;
5773                 }
5774             }
5775
5776             /// <summary>
5777             /// Whether the view is now visible or not.
5778             /// </summary>
5779             /// <since_tizen> 3 </since_tizen>
5780             public bool Visibility
5781             {
5782                 get
5783                 {
5784                     return _visibility;
5785                 }
5786                 set
5787                 {
5788                     _visibility = value;
5789                 }
5790             }
5791
5792             /// <summary>
5793             /// Whether the view's visible property has changed or a parent's.
5794             /// </summary>
5795             /// <since_tizen> 3 </since_tizen>
5796             public VisibilityChangeType Type
5797             {
5798                 get
5799                 {
5800                     return _type;
5801                 }
5802                 set
5803                 {
5804                     _type = value;
5805                 }
5806             }
5807         }
5808
5809         /// <summary>
5810         /// Event arguments of layout direction changed.
5811         /// </summary>
5812         /// <since_tizen> 4 </since_tizen>
5813         public class LayoutDirectionChangedEventArgs : EventArgs
5814         {
5815             private View _view;
5816             private ViewLayoutDirectionType _type;
5817
5818             /// <summary>
5819             /// The view, or child of view, whose layout direction has changed.
5820             /// </summary>
5821             /// <since_tizen> 4 </since_tizen>
5822             public View View
5823             {
5824                 get
5825                 {
5826                     return _view;
5827                 }
5828                 set
5829                 {
5830                     _view = value;
5831                 }
5832             }
5833
5834             /// <summary>
5835             /// Whether the view's layout direction property has changed or a parent's.
5836             /// </summary>
5837             /// <since_tizen> 4 </since_tizen>
5838             public ViewLayoutDirectionType Type
5839             {
5840                 get
5841                 {
5842                     return _type;
5843                 }
5844                 set
5845                 {
5846                     _type = value;
5847                 }
5848             }
5849         }
5850
5851
5852         private Dictionary<string, Transition> transDictionary = new Dictionary<string, Transition>();
5853
5854         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
5855         [EditorBrowsable(EditorBrowsableState.Never)]
5856         public Transition GetTransition(string transitionName)
5857         {
5858             Transition trans = null;
5859             transDictionary.TryGetValue(transitionName, out trans);
5860             return trans;
5861         }
5862
5863         private void LoadTransitions()
5864         {
5865             foreach (string str in transitionNames)
5866             {
5867                 string resourceName = str + ".xaml";
5868                 Transition trans = null;
5869
5870                 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
5871
5872                 string likelyResourcePath = resource + "animation/" + resourceName;
5873
5874                 if (File.Exists(likelyResourcePath))
5875                 {
5876                     trans = Extensions.LoadObject<Transition>(likelyResourcePath);
5877                 }
5878                 if (trans)
5879                 {
5880                     transDictionary.Add(trans.Name, trans);
5881                 }
5882             }
5883         }
5884
5885         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
5886         [EditorBrowsable(EditorBrowsableState.Never)]
5887         public string[] TransitionNames
5888         {
5889             get
5890             {
5891                 return transitionNames;
5892             }
5893             set
5894             {
5895                 transitionNames = value;
5896                 LoadTransitions();
5897             }
5898         }
5899         private string[] transitionNames;
5900
5901         internal class BackgroundResourceLoadedEventArgs : EventArgs
5902         {
5903             private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5904             public ResourceLoadingStatusType Status
5905             {
5906                 get
5907                 {
5908                     return status;
5909                 }
5910                 set
5911                 {
5912                     status = value;
5913                 }
5914             }
5915         }
5916
5917         internal class Property
5918         {
5919             internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5920             internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5921             internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5922             internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5923             internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5924             internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5925             internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5926             internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5927             internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5928             internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5929             internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5930             internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5931             internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5932             internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5933             internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5934             internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5935             internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5936             internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5937             internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5938             internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5939             internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5940             internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5941             internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5942             internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5943             internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5944             internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5945             internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5946             internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5947             internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5948             internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5949             internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5950             internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5951             internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5952             internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5953             internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5954             internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5955             internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5956             internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5957             internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5958             internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5959             internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5960             internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5961             internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5962             internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5963             internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5964             internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5965             internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5966             internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5967             internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5968             internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5969             internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5970             internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5971             internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5972             internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5973             internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5974             internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
5975             internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
5976             internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
5977             internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
5978             internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
5979             internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
5980             internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
5981             internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();
5982         }
5983     }
5984 }