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