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