8e2b5228c2298d4e4c1ae3c9ab8e7a269c21b152
[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 StyleProperty = BindableProperty.Create("Style", 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         [EditorBrowsable(EditorBrowsableState.Never)]
3418         public int WidthSpecification
3419         {
3420             get
3421             {
3422                 return _widthPolicy;
3423             }
3424             set
3425             {
3426                 _widthPolicy = value;
3427                 if (_widthPolicy >= 0)
3428                 {
3429                     _measureSpecificationWidth = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3430                     Size2D.Width = _widthPolicy;
3431                 }
3432                 _layout?.RequestLayout();
3433             }
3434         }
3435
3436         ///<summary>
3437         /// The required policy for this dimension, ChildLayoutData enum or exact value.
3438         ///</summary>
3439         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
3440         [EditorBrowsable(EditorBrowsableState.Never)]
3441         public int HeightSpecification
3442         {
3443             get
3444             {
3445                 return _heightPolicy;
3446             }
3447             set
3448             {
3449                 _heightPolicy = value;
3450                 if (_heightPolicy >= 0)
3451                 {
3452                     _measureSpecificationHeight = new MeasureSpecification( new LayoutLength(value), MeasureSpecification.ModeType.Exactly );
3453                     Size2D.Height = _heightPolicy;
3454                 }
3455                _layout?.RequestLayout();
3456             }
3457         }
3458
3459
3460         /// <summary>
3461         /// [Obsolete("Please do not use! this will be deprecated")]
3462         /// </summary>
3463         /// Please do not use! this will be deprecated!
3464         /// Instead please use Padding.
3465         /// <since_tizen> 4 </since_tizen>
3466         [Obsolete("Please do not use! this will be deprecated, instead please use Padding.")]
3467         [EditorBrowsable(EditorBrowsableState.Never)]
3468         public Extents PaddingEX
3469         {
3470             get
3471             {
3472                 Extents temp = new Extents(0, 0, 0, 0);
3473                 GetProperty(View.Property.PADDING).Get(temp);
3474                 return temp;
3475             }
3476             set
3477             {
3478                 SetProperty(View.Property.PADDING, new Tizen.NUI.PropertyValue(value));
3479                 NotifyPropertyChanged();
3480                 _layout?.RequestLayout();
3481             }
3482         }
3483
3484         /// <since_tizen> 6 </since_tizen>
3485         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
3486         [EditorBrowsable(EditorBrowsableState.Never)]
3487         public Style Style
3488         {
3489             get
3490             {
3491                 return (Style)GetValue(StyleProperty);
3492             }
3493             set
3494             {
3495                 SetValue(StyleProperty, value);
3496             }
3497         }
3498
3499         /// <summary>
3500         /// Child property to specify desired width
3501         /// </summary>
3502         internal int LayoutWidthSpecificationFixed
3503         {
3504             get
3505             {
3506                 return _widthPolicy;
3507             }
3508             set
3509             {
3510                 _widthPolicy = value;
3511                 _measureSpecificationWidth = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3512                 Size2D.Width = value;
3513                 _layout?.RequestLayout();
3514             }
3515         }
3516
3517         /// <summary>
3518         /// Child property to specify desired height
3519         /// </summary>
3520         internal int LayoutHeightSpecificationFixed
3521         {
3522             get
3523             {
3524                 return _heightPolicy;
3525             }
3526             set
3527             {
3528                 _heightPolicy = value;
3529                 _measureSpecificationHeight = new MeasureSpecification(new LayoutLength(value), MeasureSpecification.ModeType.Exactly);
3530                 Size2D.Height = value;
3531                 _layout?.RequestLayout();
3532             }
3533         }
3534
3535         /// <summary>
3536         /// Child property to specify desired width, use MatchParent/WrapContent)
3537         /// </summary>
3538         internal ChildLayoutData LayoutWidthSpecification
3539         {
3540             get
3541             {
3542                 return (ChildLayoutData)_widthPolicy;
3543             }
3544             set
3545             {
3546                 _widthPolicy = (int)value;
3547             }
3548         }
3549
3550         /// <summary>
3551         /// Child property to specify desired height, use MatchParent/WrapContent)
3552         /// </summary>
3553         internal ChildLayoutData LayoutHeightSpecification
3554         {
3555             get
3556             {
3557                 return (ChildLayoutData)_heightPolicy;
3558             }
3559             set
3560             {
3561                 _heightPolicy = (int)value;
3562             }
3563         }
3564
3565         internal float Weight
3566         {
3567             get
3568             {
3569                 return _weight;
3570             }
3571             set
3572             {
3573                 _weight = value;
3574                 _layout.RequestLayout();
3575             }
3576         }
3577
3578         internal bool BackgroundImageSynchronosLoading
3579         {
3580             get
3581             {
3582                 return _backgroundImageSynchronosLoading;
3583             }
3584             set
3585             {
3586                 if (value != _backgroundImageSynchronosLoading)
3587                 {
3588                     string bgUrl = "";
3589                     PropertyMap bgMap = this.Background;
3590                     int visualType = 0;
3591                     bgMap.Find(Visual.Property.Type)?.Get(out visualType);
3592                     if (visualType == (int)Visual.Type.Image)
3593                     {
3594                         bgMap.Find(ImageVisualProperty.URL)?.Get(out bgUrl);
3595                     }
3596                     if (bgUrl.Length != 0)
3597                     {
3598                         _backgroundImageSynchronosLoading = value;
3599                         bgMap.Add("synchronousLoading", new PropertyValue(_backgroundImageSynchronosLoading));
3600                         this.Background = bgMap;
3601                     }
3602                 }
3603             }
3604         }
3605
3606         internal float WorldPositionX
3607         {
3608             get
3609             {
3610                 float temp = 0.0f;
3611                 GetProperty(View.Property.WORLD_POSITION_X).Get(out temp);
3612                 return temp;
3613             }
3614         }
3615
3616         internal float WorldPositionY
3617         {
3618             get
3619             {
3620                 float temp = 0.0f;
3621                 GetProperty(View.Property.WORLD_POSITION_Y).Get(out temp);
3622                 return temp;
3623             }
3624         }
3625
3626         internal float WorldPositionZ
3627         {
3628             get
3629             {
3630                 float temp = 0.0f;
3631                 GetProperty(View.Property.WORLD_POSITION_Z).Get(out temp);
3632                 return temp;
3633             }
3634         }
3635
3636         internal bool FocusState
3637         {
3638             get
3639             {
3640                 return IsKeyboardFocusable();
3641             }
3642             set
3643             {
3644                 SetKeyboardFocusable(value);
3645             }
3646         }
3647
3648         /// <summary>
3649         /// Set the layout on this View. Replaces any existing Layout.
3650         /// </summary>
3651         /// <remarks>
3652         /// </remarks>
3653         internal LayoutItem Layout
3654         {
3655             get
3656             {
3657                 return _layout;
3658             }
3659             set
3660             {
3661                 // Do nothing if layout provided is already set on this View.
3662                 if (value == _layout)
3663                 {
3664                     return;
3665                 }
3666
3667                 Log.Info("NUI", "Setting Layout on:" + Name + "\n");
3668                 layoutingDisabled = false;
3669                 layoutSet = true;
3670
3671                 // If new layout being set already has a owner then that owner receives a replacement default layout.
3672                 // First check if the layout to be set already has a owner.
3673                 if (value?.Owner != null)
3674                 {
3675                     Log.Info("NUI", "Set layout already in use by another View: " + value.Owner.Name + "will get a LayoutGroup\n");
3676                     // Previous owner of the layout gets a default layout as a replacement.
3677                     value.Owner.Layout = new LayoutGroup();
3678
3679                     // Copy Margin and Padding to replacement LayoutGroup.
3680                     value.Owner.Layout.Margin = value.Margin;
3681                     value.Owner.Layout.Padding = value.Padding;
3682                 }
3683
3684                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
3685                 // View if no replacement. Previously margin and padding values would have been moved from
3686                 // the View to the layout.
3687                 if (_layout != null ) // Existing layout
3688                 {
3689                     if (value != null)
3690                     {
3691                         // Existing layout being replaced so copy over margin and padding values.
3692                         value.Margin = _layout.Margin;
3693                         value.Padding = _layout.Padding;
3694                     }
3695                     else
3696                     {
3697                       // Layout not being replaced so restore margin and padding to View.
3698                       SetValue(MarginProperty, _layout.Margin);
3699                       SetValue(PaddingProperty, _layout.Padding);
3700                       NotifyPropertyChanged();
3701                     }
3702                 }
3703                 else
3704                 {
3705                     // First Layout to be added to the View hence copy
3706
3707                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
3708                     if (value !=null)
3709                     {
3710                         if (Margin.Top != 0 || Margin.Bottom !=0 || Margin.Start !=0 || Margin.End != 0)
3711                         {
3712                             // If View already has a margin set then store it in Layout instead.
3713                             value.Margin = Margin;
3714                             SetValue(MarginProperty, new Extents(0,0,0,0));
3715                             NotifyPropertyChanged();
3716                         }
3717
3718                         if (Padding.Top != 0 || Padding.Bottom !=0 || Padding.Start !=0 || Padding.End != 0)
3719                         {
3720                             // If View already has a padding set then store it in Layout instead.
3721                             value.Padding = Padding;
3722                             SetValue(PaddingProperty, new Extents(0,0,0,0));
3723                             NotifyPropertyChanged();
3724                         }
3725                     }
3726                 }
3727
3728                 // Remove existing layout from it's parent layout group.
3729                 _layout?.Unparent();
3730
3731                 // Set layout to this view
3732                 SetLayout(value);
3733             }
3734         }
3735
3736         internal void SetLayout(LayoutItem layout)
3737         {
3738             _layout = layout;
3739             _layout?.AttachToOwner(this);
3740             _layout?.RequestLayout();
3741         }
3742
3743         /// <summary>
3744         /// Stores the calculated width value and its ModeType. Width component.
3745         /// </summary>
3746         internal MeasureSpecification MeasureSpecificationWidth
3747         {
3748             set
3749             {
3750                 _measureSpecificationWidth = value;
3751                 _layout?.RequestLayout();
3752             }
3753             get
3754             {
3755                 return _measureSpecificationWidth;
3756             }
3757         }
3758
3759         /// <summary>
3760         /// Stores the calculated width value and its ModeType. Height component.
3761         /// </summary>
3762         internal MeasureSpecification MeasureSpecificationHeight
3763         {
3764             set
3765             {
3766                 _measureSpecificationHeight = value;
3767                 _layout?.RequestLayout();
3768             }
3769             get
3770             {
3771                 return _measureSpecificationHeight;
3772             }
3773         }
3774
3775         internal float ParentOriginX
3776         {
3777             get
3778             {
3779                 float temp = 0.0f;
3780                 GetProperty(View.Property.PARENT_ORIGIN_X).Get(out temp);
3781                 return temp;
3782             }
3783             set
3784             {
3785                 SetProperty(View.Property.PARENT_ORIGIN_X, new Tizen.NUI.PropertyValue(value));
3786                 NotifyPropertyChanged();
3787             }
3788         }
3789
3790         internal float ParentOriginY
3791         {
3792             get
3793             {
3794                 float temp = 0.0f;
3795                 GetProperty(View.Property.PARENT_ORIGIN_Y).Get(out temp);
3796                 return temp;
3797             }
3798             set
3799             {
3800                 SetProperty(View.Property.PARENT_ORIGIN_Y, new Tizen.NUI.PropertyValue(value));
3801                 NotifyPropertyChanged();
3802             }
3803         }
3804
3805         internal float ParentOriginZ
3806         {
3807             get
3808             {
3809                 float temp = 0.0f;
3810                 GetProperty(View.Property.PARENT_ORIGIN_Z).Get(out temp);
3811                 return temp;
3812             }
3813             set
3814             {
3815                 SetProperty(View.Property.PARENT_ORIGIN_Z, new Tizen.NUI.PropertyValue(value));
3816                 NotifyPropertyChanged();
3817             }
3818         }
3819
3820         internal float PivotPointX
3821         {
3822             get
3823             {
3824                 float temp = 0.0f;
3825                 GetProperty(View.Property.ANCHOR_POINT_X).Get(out temp);
3826                 return temp;
3827             }
3828             set
3829             {
3830                 SetProperty(View.Property.ANCHOR_POINT_X, new Tizen.NUI.PropertyValue(value));
3831             }
3832         }
3833
3834         internal float PivotPointY
3835         {
3836             get
3837             {
3838                 float temp = 0.0f;
3839                 GetProperty(View.Property.ANCHOR_POINT_Y).Get(out temp);
3840                 return temp;
3841             }
3842             set
3843             {
3844                 SetProperty(View.Property.ANCHOR_POINT_Y, new Tizen.NUI.PropertyValue(value));
3845             }
3846         }
3847
3848         internal float PivotPointZ
3849         {
3850             get
3851             {
3852                 float temp = 0.0f;
3853                 GetProperty(View.Property.ANCHOR_POINT_Z).Get(out temp);
3854                 return temp;
3855             }
3856             set
3857             {
3858                 SetProperty(View.Property.ANCHOR_POINT_Z, new Tizen.NUI.PropertyValue(value));
3859             }
3860         }
3861
3862         internal Matrix WorldMatrix
3863         {
3864             get
3865             {
3866                 Matrix temp = new Matrix();
3867                 GetProperty(View.Property.WORLD_MATRIX).Get(temp);
3868                 return temp;
3869             }
3870         }
3871
3872         private int LeftFocusableViewId
3873         {
3874             get
3875             {
3876                 int temp = 0;
3877                 GetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID).Get(out temp);
3878                 return temp;
3879             }
3880             set
3881             {
3882                 SetProperty(View.Property.LEFT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3883             }
3884         }
3885
3886         private int RightFocusableViewId
3887         {
3888             get
3889             {
3890                 int temp = 0;
3891                 GetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID).Get(out temp);
3892                 return temp;
3893             }
3894             set
3895             {
3896                 SetProperty(View.Property.RIGHT_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3897             }
3898         }
3899
3900         private int UpFocusableViewId
3901         {
3902             get
3903             {
3904                 int temp = 0;
3905                 GetProperty(View.Property.UP_FOCUSABLE_VIEW_ID).Get(out temp);
3906                 return temp;
3907             }
3908             set
3909             {
3910                 SetProperty(View.Property.UP_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3911             }
3912         }
3913
3914         private int DownFocusableViewId
3915         {
3916             get
3917             {
3918                 int temp = 0;
3919                 GetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID).Get(out temp);
3920                 return temp;
3921             }
3922             set
3923             {
3924                 SetProperty(View.Property.DOWN_FOCUSABLE_VIEW_ID, new Tizen.NUI.PropertyValue(value));
3925             }
3926         }
3927
3928         /// <summary>
3929         /// Perform an action on a visual registered to this view. <br />
3930         /// Visuals will have actions. This API is used to perform one of these actions with the given attributes.
3931         /// </summary>
3932         /// <param name="propertyIndexOfVisual">The Property index of the visual.</param>
3933         /// <param name="propertyIndexOfActionId">The action to perform. See Visual to find the supported actions.</param>
3934         /// <param name="attributes">Optional attributes for the action.</param>
3935         /// <since_tizen> 5 </since_tizen>
3936         public void DoAction(int propertyIndexOfVisual, int propertyIndexOfActionId, PropertyValue attributes)
3937         {
3938             Interop.View.View_DoAction(swigCPtr, propertyIndexOfVisual, propertyIndexOfActionId, PropertyValue.getCPtr(attributes));
3939             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
3940         }
3941
3942         /// <summary>
3943         /// Creates an animation to animate the background color visual. If there is no
3944         /// background visual, creates one with transparent black as it's mixColor.
3945         /// </summary>
3946         /// <since_tizen> 3 </since_tizen>
3947         public Animation AnimateBackgroundColor(object destinationValue,
3948                                                  int startTime,
3949                                                  int endTime,
3950                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
3951                                                  object initialValue = null)
3952         {
3953             Tizen.NUI.PropertyMap background = Background;
3954
3955             if (background.Empty())
3956             {
3957                 // If there is no background yet, ensure there is a transparent
3958                 // color visual
3959                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
3960                 background = Background;
3961             }
3962             return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
3963         }
3964
3965         /// <summary>
3966         /// Creates an animation to animate the mixColor of the named visual.
3967         /// </summary>
3968         /// <since_tizen> 3 </since_tizen>
3969         public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
3970         {
3971             Animation animation = null;
3972             {
3973                 PropertyMap _animator = new PropertyMap();
3974                 if (alphaFunction != null)
3975                 {
3976                     _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
3977                 }
3978
3979                 PropertyMap _timePeriod = new PropertyMap();
3980                 _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
3981                 _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
3982                 _animator.Add("timePeriod", new PropertyValue(_timePeriod));
3983
3984                 PropertyMap _transition = new PropertyMap();
3985                 _transition.Add("animator", new PropertyValue(_animator));
3986                 _transition.Add("target", new PropertyValue(targetVisual));
3987                 _transition.Add("property", new PropertyValue("mixColor"));
3988
3989                 if (initialColor != null)
3990                 {
3991                     PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
3992                     _transition.Add("initialValue", initValue);
3993                 }
3994
3995                 PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
3996                 _transition.Add("targetValue", destValue);
3997                 TransitionData _transitionData = new TransitionData(_transition);
3998
3999                 animation = new Animation(Interop.View.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
4000                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4001                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4002             }
4003             return animation;
4004         }
4005
4006         // From Container Base class
4007         /// <summary>
4008         /// Adds a child view to this view.
4009         /// </summary>
4010         /// <seealso cref="Container.Add" />
4011         /// <since_tizen> 4 </since_tizen>
4012         public override void Add(View child)
4013         {
4014             bool hasLayout = (_layout != null);
4015             Log.Info("NUI", "Add:" + child.Name + " to View:" + Name + "which has layout[" + hasLayout + "] + \n");
4016
4017             if (null == child)
4018             {
4019                 Tizen.Log.Fatal("NUI", "Child is null");
4020                 return;
4021             }
4022
4023             Container oldParent = child.GetParent();
4024             if (oldParent != this)
4025             {
4026                 // If child already has a parent then re-parent child
4027                 if (oldParent != null)
4028                 {
4029                     oldParent.Remove(child);
4030                 }
4031                 child.InternalParent = this;
4032
4033                 Interop.Actor.Actor_Add(swigCPtr, View.getCPtr(child));
4034
4035                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4036                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4037                 Children.Add(child);
4038
4039                 if (ChildAdded != null)
4040                 {
4041                     ChildAddedEventArgs e = new ChildAddedEventArgs
4042                     {
4043                         Added = child
4044                     };
4045                     ChildAdded(this, e);
4046                 }
4047                 BindableObject.SetInheritedBindingContext(child, this?.BindingContext);
4048             }
4049         }
4050
4051         /// <summary>
4052         /// Removes a child view from this View. If the view was not a child of this view, this is a no-op.
4053         /// </summary>
4054         /// <seealso cref="Container.Remove" />
4055         /// <since_tizen> 4 </since_tizen>
4056         public override void Remove(View child)
4057         {
4058             bool hasLayout = (_layout != null);
4059             Log.Info("NUI","Removing View:" + child.Name + "layout[" + hasLayout.ToString() +"]\n");
4060
4061             Interop.Actor.Actor_Remove(swigCPtr, View.getCPtr(child));
4062             if (NDalicPINVOKE.SWIGPendingException.Pending)
4063                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4064
4065             Children.Remove(child);
4066             child.InternalParent = null;
4067
4068             if (ChildRemoved != null)
4069             {
4070                 ChildRemovedEventArgs e = new ChildRemovedEventArgs
4071                 {
4072                     Removed = child
4073                 };
4074                 ChildRemoved(this, e);
4075             }
4076         }
4077
4078         /// <summary>
4079         /// Retrieves a child view by index.
4080         /// </summary>
4081         /// <seealso cref="Container.GetChildAt" />
4082         /// <since_tizen> 4 </since_tizen>
4083         public override View GetChildAt(uint index)
4084         {
4085             if (index < Children.Count)
4086             {
4087                 return Children[Convert.ToInt32(index)];
4088             }
4089             else
4090             {
4091                 return null;
4092             }
4093         }
4094
4095         /// <summary>
4096         /// Retrieves the number of children held by the view.
4097         /// </summary>
4098         /// <seealso cref="Container.GetChildCount" />
4099         /// <since_tizen> 4 </since_tizen>
4100         public override uint GetChildCount()
4101         {
4102             return Convert.ToUInt32(Children.Count);
4103         }
4104
4105         /// <summary>
4106         /// Gets the views parent.
4107         /// </summary>
4108         /// <seealso cref="Container.GetParent()" />
4109         /// <since_tizen> 4 </since_tizen>
4110         public override Container GetParent()
4111         {
4112             return this.InternalParent as Container;
4113         }
4114
4115         /// <summary>
4116         /// Queries whether the view has a focus.
4117         /// </summary>
4118         /// <returns>True if this view has a focus.</returns>
4119         /// <since_tizen> 3 </since_tizen>
4120         public bool HasFocus()
4121         {
4122             bool ret = false;
4123             if (swigCPtr.Handle != global::System.IntPtr.Zero)
4124             {
4125                 ret = Interop.View.View_HasKeyInputFocus(swigCPtr);
4126                                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4127             }
4128             else
4129             {
4130                 Tizen.Log.Error("NUI", "swigCPtr of view is aleady disposed.");
4131             }
4132             return ret;
4133         }
4134
4135         /// <summary>
4136         /// Sets the name of the style to be applied to the view.
4137         /// </summary>
4138         /// <param name="styleName">A string matching a style described in a stylesheet.</param>
4139         /// <since_tizen> 3 </since_tizen>
4140         public void SetStyleName(string styleName)
4141         {
4142             Interop.View.View_SetStyleName(swigCPtr, styleName);
4143             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4144         }
4145
4146         /// <summary>
4147         /// Retrieves the name of the style to be applied to the view (if any).
4148         /// </summary>
4149         /// <returns>A string matching a style, or an empty string.</returns>
4150         /// <since_tizen> 3 </since_tizen>
4151         public string GetStyleName()
4152         {
4153             string ret = Interop.View.View_GetStyleName(swigCPtr);
4154             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4155             return ret;
4156         }
4157
4158         /// <summary>
4159         /// Clears the background.
4160         /// </summary>
4161         /// <since_tizen> 3 </since_tizen>
4162         public void ClearBackground()
4163         {
4164             Interop.View.View_ClearBackground(swigCPtr);
4165             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4166         }
4167
4168         /// <summary>
4169         /// Shows the view.
4170         /// </summary>
4171         /// <remarks>
4172         /// This is an asynchronous method.
4173         /// </remarks>
4174         /// <since_tizen> 3 </since_tizen>
4175         public void Show()
4176         {
4177             SetVisible(true);
4178         }
4179
4180         /// <summary>
4181         /// Hides the view.
4182         /// </summary>
4183         /// <remarks>
4184         /// This is an asynchronous method.
4185         /// If the view is hidden, then the view and its children will not be rendered.
4186         /// 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.
4187         /// </remarks>
4188         /// <since_tizen> 3 </since_tizen>
4189         public void Hide()
4190         {
4191             SetVisible(false);
4192         }
4193
4194         /// <summary>
4195         /// Raises the view above all other views.
4196         /// </summary>
4197         /// <remarks>
4198         /// Sibling order of views within the parent will be updated automatically.
4199         /// Once a raise or lower API is used, that view will then have an exclusive sibling order independent of insertion.
4200         /// </remarks>
4201         /// <since_tizen> 3 </since_tizen>
4202         public void RaiseToTop()
4203         {
4204             var parentChildren = GetParent()?.Children;
4205
4206             if (parentChildren != null)
4207             {
4208                 parentChildren.Remove(this);
4209                 parentChildren.Add(this);
4210
4211                 Interop.NDalic.RaiseToTop(swigCPtr);
4212                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4213                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4214             }
4215
4216         }
4217
4218         /// <summary>
4219         /// Lowers the view to the bottom of all views.
4220         /// </summary>
4221         /// <remarks>
4222         /// The sibling order of views within the parent will be updated automatically.
4223         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4224         /// </remarks>
4225         /// <since_tizen> 3 </since_tizen>
4226         public void LowerToBottom()
4227         {
4228             var parentChildren = GetParent()?.Children;
4229
4230             if (parentChildren != null)
4231             {
4232                 parentChildren.Remove(this);
4233                 parentChildren.Insert(0, this);
4234
4235                 Interop.NDalic.LowerToBottom(swigCPtr);
4236                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4237                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4238             }
4239         }
4240
4241         /// <summary>
4242         /// Queries if all resources required by a view are loaded and ready.
4243         /// </summary>
4244         /// <remarks>Most resources are only loaded when the control is placed on the stage.
4245         /// </remarks>
4246         /// <since_tizen> 3 </since_tizen>
4247         public bool IsResourceReady()
4248         {
4249             bool ret = Interop.View.IsResourceReady(swigCPtr);
4250             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4251             return ret;
4252         }
4253
4254         /// <summary>
4255         /// Gets the parent layer of this view.If a view has no parent, this method does not do anything.
4256         /// </summary>
4257         /// <pre>The view has been initialized. </pre>
4258         /// <returns>The parent layer of view </returns>
4259         /// <since_tizen> 5 </since_tizen>
4260         public Layer GetLayer()
4261         {
4262             //to fix memory leak issue, match the handle count with native side.
4263             IntPtr cPtr = Interop.Actor.Actor_GetLayer(swigCPtr);
4264             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4265             Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
4266             Interop.BaseHandle.delete_BaseHandle(CPtr);
4267             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4268
4269             if (NDalicPINVOKE.SWIGPendingException.Pending)
4270                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4271             return ret;
4272         }
4273
4274         /// <summary>
4275         /// Removes a view from its parent view or layer. If a view has no parent, this method does nothing.
4276         /// </summary>
4277         /// <pre>The (child) view has been initialized. </pre>
4278         /// <since_tizen> 4 </since_tizen>
4279         public void Unparent()
4280         {
4281             GetParent()?.Remove(this);
4282         }
4283
4284         /// <summary>
4285         /// Search through this view's hierarchy for a view with the given name.
4286         /// The view itself is also considered in the search.
4287         /// </summary>
4288         /// <pre>The view has been initialized.</pre>
4289         /// <param name="viewName">The name of the view to find.</param>
4290         /// <returns>A handle to the view if found, or an empty handle if not.</returns>
4291         /// <since_tizen> 3 </since_tizen>
4292         public View FindChildByName(string viewName)
4293         {
4294             //to fix memory leak issue, match the handle count with native side.
4295             IntPtr cPtr = Interop.Actor.Actor_FindChildByName(swigCPtr, viewName);
4296             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4297             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4298             Interop.BaseHandle.delete_BaseHandle(CPtr);
4299             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4300
4301             if (NDalicPINVOKE.SWIGPendingException.Pending)
4302                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4303             return ret;
4304         }
4305
4306         /// <summary>
4307         /// Converts screen coordinates into the view's coordinate system using the default camera.
4308         /// </summary>
4309         /// <pre>The view has been initialized.</pre>
4310         /// <remarks>The view coordinates are relative to the top-left(0.0, 0.0, 0.5).</remarks>
4311         /// <param name="localX">On return, the X-coordinate relative to the view.</param>
4312         /// <param name="localY">On return, the Y-coordinate relative to the view.</param>
4313         /// <param name="screenX">The screen X-coordinate.</param>
4314         /// <param name="screenY">The screen Y-coordinate.</param>
4315         /// <returns>True if the conversion succeeded.</returns>
4316         /// <since_tizen> 3 </since_tizen>
4317         public bool ScreenToLocal(out float localX, out float localY, float screenX, float screenY)
4318         {
4319             bool ret = Interop.Actor.Actor_ScreenToLocal(swigCPtr, out localX, out localY, screenX, screenY);
4320             if (NDalicPINVOKE.SWIGPendingException.Pending)
4321                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4322             return ret;
4323         }
4324
4325         /// <summary>
4326         /// Sets the relative to parent size factor of the view.<br />
4327         /// This factor is only used when ResizePolicy is set to either:
4328         /// ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.<br />
4329         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicy.<br />
4330         /// </summary>
4331         /// <pre>The view has been initialized.</pre>
4332         /// <param name="factor">A Vector3 representing the relative factor to be applied to each axis.</param>
4333         /// <since_tizen> 3 </since_tizen>
4334         public void SetSizeModeFactor(Vector3 factor)
4335         {
4336             Interop.Actor.Actor_SetSizeModeFactor(swigCPtr, Vector3.getCPtr(factor));
4337             if (NDalicPINVOKE.SWIGPendingException.Pending)
4338                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4339         }
4340         /// <summary>
4341         /// Calculates the height of the view given a width.<br />
4342         /// The natural size is used for default calculation.<br />
4343         /// Size 0 is treated as aspect ratio 1:1.<br />
4344         /// </summary>
4345         /// <param name="width">The width to use.</param>
4346         /// <returns>The height based on the width.</returns>
4347         /// <since_tizen> 3 </since_tizen>
4348         public float GetHeightForWidth(float width)
4349         {
4350             float ret = Interop.Actor.Actor_GetHeightForWidth(swigCPtr, width);
4351             if (NDalicPINVOKE.SWIGPendingException.Pending)
4352                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4353             return ret;
4354         }
4355
4356         /// <summary>
4357         /// Calculates the width of the view given a height.<br />
4358         /// The natural size is used for default calculation.<br />
4359         /// Size 0 is treated as aspect ratio 1:1.<br />
4360         /// </summary>
4361         /// <param name="height">The height to use.</param>
4362         /// <returns>The width based on the height.</returns>
4363         /// <since_tizen> 3 </since_tizen>
4364         public float GetWidthForHeight(float height)
4365         {
4366             float ret = Interop.Actor.Actor_GetWidthForHeight(swigCPtr, height);
4367             if (NDalicPINVOKE.SWIGPendingException.Pending)
4368                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4369             return ret;
4370         }
4371
4372         /// <summary>
4373         /// Return the amount of size allocated for relayout.
4374         /// </summary>
4375         /// <param name="dimension">The dimension to retrieve.</param>
4376         /// <returns>Return the size.</returns>
4377         /// <since_tizen> 3 </since_tizen>
4378         public float GetRelayoutSize(DimensionType dimension)
4379         {
4380             float ret = Interop.Actor.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
4381             if (NDalicPINVOKE.SWIGPendingException.Pending)
4382                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4383             return ret;
4384         }
4385
4386         /// <summary>
4387         /// Set the padding for the view.
4388         /// </summary>
4389         /// <param name="padding">Padding for the view.</param>
4390         /// <since_tizen> 3 </since_tizen>
4391         public void SetPadding(PaddingType padding)
4392         {
4393             Interop.Actor.Actor_SetPadding(swigCPtr, PaddingType.getCPtr(padding));
4394             if (NDalicPINVOKE.SWIGPendingException.Pending)
4395                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4396         }
4397
4398         /// <summary>
4399         /// Return the value of padding for the view.
4400         /// </summary>
4401         /// <param name="paddingOut">the value of padding for the view</param>
4402         /// <since_tizen> 3 </since_tizen>
4403         public void GetPadding(PaddingType paddingOut)
4404         {
4405             Interop.Actor.Actor_GetPadding(swigCPtr, PaddingType.getCPtr(paddingOut));
4406             if (NDalicPINVOKE.SWIGPendingException.Pending)
4407                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4408         }
4409
4410         /// <since_tizen> 3 </since_tizen>
4411         public uint AddRenderer(Renderer renderer)
4412         {
4413             uint ret = Interop.Actor.Actor_AddRenderer(swigCPtr, Renderer.getCPtr(renderer));
4414             if (NDalicPINVOKE.SWIGPendingException.Pending)
4415                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4416             return ret;
4417         }
4418
4419         /// <since_tizen> 3 </since_tizen>
4420         public Renderer GetRendererAt(uint index)
4421         {
4422             //to fix memory leak issue, match the handle count with native side.
4423             IntPtr cPtr = Interop.Actor.Actor_GetRendererAt(swigCPtr, index);
4424             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4425             Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
4426             if (cPtr != null && ret == null)
4427             {
4428                 ret = new Renderer(cPtr, false);
4429                 if (NDalicPINVOKE.SWIGPendingException.Pending)
4430                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4431                 return ret;
4432             }
4433             Interop.BaseHandle.delete_BaseHandle(CPtr);
4434             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4435
4436             if (NDalicPINVOKE.SWIGPendingException.Pending)
4437                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4438             return ret;
4439         }
4440
4441         /// <since_tizen> 3 </since_tizen>
4442         public void RemoveRenderer(Renderer renderer)
4443         {
4444             Interop.Actor.Actor_RemoveRenderer__SWIG_0(swigCPtr, Renderer.getCPtr(renderer));
4445             if (NDalicPINVOKE.SWIGPendingException.Pending)
4446                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4447         }
4448
4449         /// <since_tizen> 3 </since_tizen>
4450         public void RemoveRenderer(uint index)
4451         {
4452             Interop.Actor.Actor_RemoveRenderer__SWIG_1(swigCPtr, index);
4453             if (NDalicPINVOKE.SWIGPendingException.Pending)
4454                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4455         }
4456
4457         internal void Raise()
4458         {
4459             var parentChildren = GetParent()?.Children;
4460
4461             if (parentChildren != null)
4462             {
4463                 int currentIndex = parentChildren.IndexOf(this);
4464
4465                 // If the view is not already the last item in the list.
4466                 if (currentIndex >= 0 && currentIndex < parentChildren.Count - 1)
4467                 {
4468                     View temp = parentChildren[currentIndex + 1];
4469                     parentChildren[currentIndex + 1] = this;
4470                     parentChildren[currentIndex] = temp;
4471
4472                     Interop.NDalic.Raise(swigCPtr);
4473                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4474                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4475                 }
4476             }
4477         }
4478
4479         internal void Lower()
4480         {
4481             var parentChildren = GetParent()?.Children;
4482
4483             if (parentChildren != null)
4484             {
4485                 int currentIndex = parentChildren.IndexOf(this);
4486
4487                 // If the view is not already the first item in the list.
4488                 if (currentIndex > 0 && currentIndex < parentChildren.Count)
4489                 {
4490                     View temp = parentChildren[currentIndex - 1];
4491                     parentChildren[currentIndex - 1] = this;
4492                     parentChildren[currentIndex] = temp;
4493
4494                     Interop.NDalic.Lower(swigCPtr);
4495                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4496                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4497                 }
4498             }
4499         }
4500
4501         /// <summary>
4502         /// Raises the view to above the target view.
4503         /// </summary>
4504         /// <remarks>The sibling order of views within the parent will be updated automatically.
4505         /// Views on the level above the target view will still be shown above this view.
4506         /// Raising this view above views with the same sibling order as each other will raise this view above them.
4507         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4508         /// </remarks>
4509         /// <param name="target">Will be raised above this view.</param>
4510         internal void RaiseAbove(View target)
4511         {
4512             var parentChildren = GetParent()?.Children;
4513
4514             if (parentChildren != null)
4515             {
4516                 int currentIndex = parentChildren.IndexOf(this);
4517                 int targetIndex = parentChildren.IndexOf(target);
4518
4519                 if (currentIndex < 0 || targetIndex < 0 ||
4520                     currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4521                 {
4522                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
4523                     return;
4524                 }
4525                 // If the currentIndex is less than the target index and the target has the same parent.
4526                 if (currentIndex < targetIndex)
4527                 {
4528                     parentChildren.Remove(this);
4529                     parentChildren.Insert(targetIndex, this);
4530
4531                     Interop.NDalic.RaiseAbove(swigCPtr, View.getCPtr(target));
4532                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4533                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4534                 }
4535             }
4536
4537         }
4538
4539         /// <summary>
4540         /// Lowers the view to below the target view.
4541         /// </summary>
4542         /// <remarks>The sibling order of views within the parent will be updated automatically.
4543         /// Lowering this view below views with the same sibling order as each other will lower this view above them.
4544         /// Once a raise or lower API is used that view will then have an exclusive sibling order independent of insertion.
4545         /// </remarks>
4546         /// <param name="target">Will be lowered below this view.</param>
4547         internal void LowerBelow(View target)
4548         {
4549             var parentChildren = GetParent()?.Children;
4550
4551             if (parentChildren != null)
4552             {
4553                 int currentIndex = parentChildren.IndexOf(this);
4554                 int targetIndex = parentChildren.IndexOf(target);
4555                 if (currentIndex < 0 || targetIndex < 0 ||
4556                    currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
4557                 {
4558                     NUILog.Error("index should be bigger than 0 and less than children of layer count");
4559                     return;
4560                 }
4561
4562                 // If the currentIndex is not already the 0th index and the target has the same parent.
4563                 if ((currentIndex != 0) && (targetIndex != -1) &&
4564                     (currentIndex > targetIndex))
4565                 {
4566                     parentChildren.Remove(this);
4567                     parentChildren.Insert(targetIndex, this);
4568
4569                     Interop.NDalic.LowerBelow(swigCPtr, View.getCPtr(target));
4570                     if (NDalicPINVOKE.SWIGPendingException.Pending)
4571                         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4572                 }
4573             }
4574
4575         }
4576
4577         internal string GetName()
4578         {
4579             string ret = Interop.Actor.Actor_GetName(swigCPtr);
4580             if (NDalicPINVOKE.SWIGPendingException.Pending)
4581                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4582             return ret;
4583         }
4584
4585         internal void SetName(string name)
4586         {
4587             Interop.Actor.Actor_SetName(swigCPtr, name);
4588             if (NDalicPINVOKE.SWIGPendingException.Pending)
4589                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4590         }
4591
4592         internal uint GetId()
4593         {
4594             uint ret = Interop.Actor.Actor_GetId(swigCPtr);
4595             if (NDalicPINVOKE.SWIGPendingException.Pending)
4596                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4597             return ret;
4598         }
4599
4600         internal bool IsRoot()
4601         {
4602             bool ret = Interop.ActorInternal.Actor_IsRoot(swigCPtr);
4603             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4604             return ret;
4605         }
4606
4607         internal bool OnWindow()
4608         {
4609             bool ret = Interop.Actor.Actor_OnStage(swigCPtr);
4610             if (NDalicPINVOKE.SWIGPendingException.Pending)
4611                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4612             return ret;
4613         }
4614
4615         internal View FindChildById(uint id)
4616         {
4617             //to fix memory leak issue, match the handle count with native side.
4618             IntPtr cPtr = Interop.Actor.Actor_FindChildById(swigCPtr, id);
4619             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
4620             View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
4621             Interop.BaseHandle.delete_BaseHandle(CPtr);
4622             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
4623
4624             if (NDalicPINVOKE.SWIGPendingException.Pending)
4625                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4626             return ret;
4627         }
4628
4629         internal override View FindCurrentChildById(uint id)
4630         {
4631             return FindChildById(id);
4632         }
4633
4634         internal void SetParentOrigin(Vector3 origin)
4635         {
4636             Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
4637             if (NDalicPINVOKE.SWIGPendingException.Pending)
4638                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4639         }
4640
4641         internal Vector3 GetCurrentParentOrigin()
4642         {
4643             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentParentOrigin(swigCPtr), true);
4644             if (NDalicPINVOKE.SWIGPendingException.Pending)
4645                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4646             return ret;
4647         }
4648
4649         internal void SetAnchorPoint(Vector3 anchorPoint)
4650         {
4651             Interop.Actor.Actor_SetAnchorPoint(swigCPtr, Vector3.getCPtr(anchorPoint));
4652             if (NDalicPINVOKE.SWIGPendingException.Pending)
4653                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4654         }
4655
4656         internal Vector3 GetCurrentAnchorPoint()
4657         {
4658             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentAnchorPoint(swigCPtr), true);
4659             if (NDalicPINVOKE.SWIGPendingException.Pending)
4660                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4661             return ret;
4662         }
4663
4664         internal void SetSize(float width, float height)
4665         {
4666             Interop.ActorInternal.Actor_SetSize__SWIG_0(swigCPtr, width, height);
4667             if (NDalicPINVOKE.SWIGPendingException.Pending)
4668                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4669         }
4670
4671         internal void SetSize(float width, float height, float depth)
4672         {
4673             Interop.ActorInternal.Actor_SetSize__SWIG_1(swigCPtr, width, height, depth);
4674             if (NDalicPINVOKE.SWIGPendingException.Pending)
4675                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4676         }
4677
4678         internal void SetSize(Vector2 size)
4679         {
4680             Interop.ActorInternal.Actor_SetSize__SWIG_2(swigCPtr, Vector2.getCPtr(size));
4681             if (NDalicPINVOKE.SWIGPendingException.Pending)
4682                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4683         }
4684
4685         internal void SetSize(Vector3 size)
4686         {
4687             Interop.ActorInternal.Actor_SetSize__SWIG_3(swigCPtr, Vector3.getCPtr(size));
4688             if (NDalicPINVOKE.SWIGPendingException.Pending)
4689                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4690         }
4691
4692         internal Vector3 GetTargetSize()
4693         {
4694             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetTargetSize(swigCPtr), true);
4695             if (NDalicPINVOKE.SWIGPendingException.Pending)
4696                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4697             return ret;
4698         }
4699
4700         internal Size2D GetCurrentSize()
4701         {
4702             Size ret = new Size(Interop.Actor.Actor_GetCurrentSize(swigCPtr), true);
4703             if (NDalicPINVOKE.SWIGPendingException.Pending)
4704                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4705             Size2D size = new Size2D((int)ret.Width, (int)ret.Height);
4706             return size;
4707         }
4708
4709         internal Vector3 GetNaturalSize()
4710         {
4711             Vector3 ret = new Vector3(Interop.Actor.Actor_GetNaturalSize(swigCPtr), true);
4712             if (NDalicPINVOKE.SWIGPendingException.Pending)
4713                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4714             return ret;
4715         }
4716
4717         internal void SetPosition(float x, float y)
4718         {
4719             Interop.ActorInternal.Actor_SetPosition__SWIG_0(swigCPtr, x, y);
4720             if (NDalicPINVOKE.SWIGPendingException.Pending)
4721                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4722         }
4723
4724         internal void SetPosition(float x, float y, float z)
4725         {
4726             Interop.ActorInternal.Actor_SetPosition__SWIG_1(swigCPtr, x, y, z);
4727             if (NDalicPINVOKE.SWIGPendingException.Pending)
4728                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4729         }
4730
4731         internal void SetPosition(Vector3 position)
4732         {
4733             Interop.ActorInternal.Actor_SetPosition__SWIG_2(swigCPtr, Vector3.getCPtr(position));
4734             if (NDalicPINVOKE.SWIGPendingException.Pending)
4735                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4736         }
4737
4738         internal void SetX(float x)
4739         {
4740             Interop.ActorInternal.Actor_SetX(swigCPtr, x);
4741             if (NDalicPINVOKE.SWIGPendingException.Pending)
4742                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4743         }
4744
4745         internal void SetY(float y)
4746         {
4747             Interop.ActorInternal.Actor_SetY(swigCPtr, y);
4748             if (NDalicPINVOKE.SWIGPendingException.Pending)
4749                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4750         }
4751
4752         internal void SetZ(float z)
4753         {
4754             Interop.ActorInternal.Actor_SetZ(swigCPtr, z);
4755             if (NDalicPINVOKE.SWIGPendingException.Pending)
4756                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4757         }
4758
4759         internal void TranslateBy(Vector3 distance)
4760         {
4761             Interop.ActorInternal.Actor_TranslateBy(swigCPtr, Vector3.getCPtr(distance));
4762             if (NDalicPINVOKE.SWIGPendingException.Pending)
4763                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4764         }
4765
4766         internal Position GetCurrentPosition()
4767         {
4768             Position ret = new Position(Interop.Actor.Actor_GetCurrentPosition(swigCPtr), true);
4769             if (NDalicPINVOKE.SWIGPendingException.Pending)
4770                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4771             return ret;
4772         }
4773
4774         internal Vector3 GetCurrentWorldPosition()
4775         {
4776             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldPosition(swigCPtr), true);
4777             if (NDalicPINVOKE.SWIGPendingException.Pending)
4778                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4779             return ret;
4780         }
4781
4782         internal void SetInheritPosition(bool inherit)
4783         {
4784             Interop.ActorInternal.Actor_SetInheritPosition(swigCPtr, inherit);
4785             if (NDalicPINVOKE.SWIGPendingException.Pending)
4786                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4787         }
4788
4789         internal bool IsPositionInherited()
4790         {
4791             bool ret = Interop.ActorInternal.Actor_IsPositionInherited(swigCPtr);
4792             if (NDalicPINVOKE.SWIGPendingException.Pending)
4793                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4794             return ret;
4795         }
4796
4797         internal void SetOrientation(Degree angle, Vector3 axis)
4798         {
4799             Interop.ActorInternal.Actor_SetOrientation__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4800             if (NDalicPINVOKE.SWIGPendingException.Pending)
4801                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4802         }
4803
4804         internal void SetOrientation(Radian angle, Vector3 axis)
4805         {
4806             Interop.ActorInternal.Actor_SetOrientation__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4807             if (NDalicPINVOKE.SWIGPendingException.Pending)
4808                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4809         }
4810
4811         internal void SetOrientation(Rotation orientation)
4812         {
4813             Interop.ActorInternal.Actor_SetOrientation__SWIG_2(swigCPtr, Rotation.getCPtr(orientation));
4814             if (NDalicPINVOKE.SWIGPendingException.Pending)
4815                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4816         }
4817
4818         internal void RotateBy(Degree angle, Vector3 axis)
4819         {
4820             Interop.ActorInternal.Actor_RotateBy__SWIG_0(swigCPtr, Degree.getCPtr(angle), Vector3.getCPtr(axis));
4821             if (NDalicPINVOKE.SWIGPendingException.Pending)
4822                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4823         }
4824
4825         internal void RotateBy(Radian angle, Vector3 axis)
4826         {
4827             Interop.ActorInternal.Actor_RotateBy__SWIG_1(swigCPtr, Radian.getCPtr(angle), Vector3.getCPtr(axis));
4828             if (NDalicPINVOKE.SWIGPendingException.Pending)
4829                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4830         }
4831
4832         internal void RotateBy(Rotation relativeRotation)
4833         {
4834             Interop.ActorInternal.Actor_RotateBy__SWIG_2(swigCPtr, Rotation.getCPtr(relativeRotation));
4835             if (NDalicPINVOKE.SWIGPendingException.Pending)
4836                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4837         }
4838
4839         internal Rotation GetCurrentOrientation()
4840         {
4841             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentOrientation(swigCPtr), true);
4842             if (NDalicPINVOKE.SWIGPendingException.Pending)
4843                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4844             return ret;
4845         }
4846
4847         internal void SetInheritOrientation(bool inherit)
4848         {
4849             Interop.ActorInternal.Actor_SetInheritOrientation(swigCPtr, inherit);
4850             if (NDalicPINVOKE.SWIGPendingException.Pending)
4851                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4852         }
4853
4854         internal bool IsOrientationInherited()
4855         {
4856             bool ret = Interop.ActorInternal.Actor_IsOrientationInherited(swigCPtr);
4857             if (NDalicPINVOKE.SWIGPendingException.Pending)
4858                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4859             return ret;
4860         }
4861
4862         internal Rotation GetCurrentWorldOrientation()
4863         {
4864             Rotation ret = new Rotation(Interop.ActorInternal.Actor_GetCurrentWorldOrientation(swigCPtr), true);
4865             if (NDalicPINVOKE.SWIGPendingException.Pending)
4866                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4867             return ret;
4868         }
4869
4870         internal void SetScale(float scale)
4871         {
4872             Interop.ActorInternal.Actor_SetScale__SWIG_0(swigCPtr, scale);
4873             if (NDalicPINVOKE.SWIGPendingException.Pending)
4874                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4875         }
4876
4877         internal void SetScale(float scaleX, float scaleY, float scaleZ)
4878         {
4879             Interop.ActorInternal.Actor_SetScale__SWIG_1(swigCPtr, scaleX, scaleY, scaleZ);
4880             if (NDalicPINVOKE.SWIGPendingException.Pending)
4881                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4882         }
4883
4884         internal void SetScale(Vector3 scale)
4885         {
4886             Interop.ActorInternal.Actor_SetScale__SWIG_2(swigCPtr, Vector3.getCPtr(scale));
4887             if (NDalicPINVOKE.SWIGPendingException.Pending)
4888                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4889         }
4890
4891         internal void ScaleBy(Vector3 relativeScale)
4892         {
4893             Interop.ActorInternal.Actor_ScaleBy(swigCPtr, Vector3.getCPtr(relativeScale));
4894             if (NDalicPINVOKE.SWIGPendingException.Pending)
4895                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4896         }
4897
4898         internal Vector3 GetCurrentScale()
4899         {
4900             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentScale(swigCPtr), true);
4901             if (NDalicPINVOKE.SWIGPendingException.Pending)
4902                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4903             return ret;
4904         }
4905
4906         internal Vector3 GetCurrentWorldScale()
4907         {
4908             Vector3 ret = new Vector3(Interop.ActorInternal.Actor_GetCurrentWorldScale(swigCPtr), true);
4909             if (NDalicPINVOKE.SWIGPendingException.Pending)
4910                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4911             return ret;
4912         }
4913
4914         internal void SetInheritScale(bool inherit)
4915         {
4916             Interop.ActorInternal.Actor_SetInheritScale(swigCPtr, inherit);
4917             if (NDalicPINVOKE.SWIGPendingException.Pending)
4918                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4919         }
4920
4921         internal bool IsScaleInherited()
4922         {
4923             bool ret = Interop.ActorInternal.Actor_IsScaleInherited(swigCPtr);
4924             if (NDalicPINVOKE.SWIGPendingException.Pending)
4925                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4926             return ret;
4927         }
4928
4929         internal Matrix GetCurrentWorldMatrix()
4930         {
4931             Matrix ret = new Matrix(Interop.ActorInternal.Actor_GetCurrentWorldMatrix(swigCPtr), true);
4932             if (NDalicPINVOKE.SWIGPendingException.Pending)
4933                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4934             return ret;
4935         }
4936
4937         internal void SetVisible(bool visible)
4938         {
4939             Interop.Actor.Actor_SetVisible(swigCPtr, visible);
4940             if (NDalicPINVOKE.SWIGPendingException.Pending)
4941                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4942         }
4943
4944         internal bool IsVisible()
4945         {
4946             bool ret = Interop.ActorInternal.Actor_IsVisible(swigCPtr);
4947             if (NDalicPINVOKE.SWIGPendingException.Pending)
4948                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4949             return ret;
4950         }
4951
4952         internal void SetOpacity(float opacity)
4953         {
4954             Interop.ActorInternal.Actor_SetOpacity(swigCPtr, opacity);
4955             if (NDalicPINVOKE.SWIGPendingException.Pending)
4956                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4957         }
4958
4959         internal float GetCurrentOpacity()
4960         {
4961             float ret = Interop.ActorInternal.Actor_GetCurrentOpacity(swigCPtr);
4962             if (NDalicPINVOKE.SWIGPendingException.Pending)
4963                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4964             return ret;
4965         }
4966
4967         internal void SetColor(Vector4 color)
4968         {
4969             Interop.ActorInternal.Actor_SetColor(swigCPtr, Vector4.getCPtr(color));
4970             if (NDalicPINVOKE.SWIGPendingException.Pending)
4971                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4972         }
4973
4974         internal Vector4 GetCurrentColor()
4975         {
4976             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentColor(swigCPtr), true);
4977             if (NDalicPINVOKE.SWIGPendingException.Pending)
4978                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4979             return ret;
4980         }
4981
4982         internal void SetColorMode(ColorMode colorMode)
4983         {
4984             Interop.ActorInternal.Actor_SetColorMode(swigCPtr, (int)colorMode);
4985             if (NDalicPINVOKE.SWIGPendingException.Pending)
4986                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4987         }
4988
4989         internal ColorMode GetColorMode()
4990         {
4991             ColorMode ret = (ColorMode)Interop.ActorInternal.Actor_GetColorMode(swigCPtr);
4992             if (NDalicPINVOKE.SWIGPendingException.Pending)
4993                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
4994             return ret;
4995         }
4996
4997         internal Vector4 GetCurrentWorldColor()
4998         {
4999             Vector4 ret = new Vector4(Interop.ActorInternal.Actor_GetCurrentWorldColor(swigCPtr), true);
5000             if (NDalicPINVOKE.SWIGPendingException.Pending)
5001                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5002             return ret;
5003         }
5004
5005         internal void SetDrawMode(DrawModeType drawMode)
5006         {
5007             Interop.ActorInternal.Actor_SetDrawMode(swigCPtr, (int)drawMode);
5008             if (NDalicPINVOKE.SWIGPendingException.Pending)
5009                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5010         }
5011
5012         internal DrawModeType GetDrawMode()
5013         {
5014             DrawModeType ret = (DrawModeType)Interop.ActorInternal.Actor_GetDrawMode(swigCPtr);
5015             if (NDalicPINVOKE.SWIGPendingException.Pending)
5016                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5017             return ret;
5018         }
5019
5020         internal void SetKeyboardFocusable(bool focusable)
5021         {
5022             Interop.ActorInternal.Actor_SetKeyboardFocusable(swigCPtr, focusable);
5023             if (NDalicPINVOKE.SWIGPendingException.Pending)
5024                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5025         }
5026
5027         internal bool IsKeyboardFocusable()
5028         {
5029             bool ret = Interop.ActorInternal.Actor_IsKeyboardFocusable(swigCPtr);
5030             if (NDalicPINVOKE.SWIGPendingException.Pending)
5031                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5032             return ret;
5033         }
5034
5035         internal void SetResizePolicy(ResizePolicyType policy, DimensionType dimension)
5036         {
5037             Interop.Actor.Actor_SetResizePolicy(swigCPtr, (int)policy, (int)dimension);
5038             if (NDalicPINVOKE.SWIGPendingException.Pending)
5039                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5040         }
5041
5042         internal ResizePolicyType GetResizePolicy(DimensionType dimension)
5043         {
5044             ResizePolicyType ret = (ResizePolicyType)Interop.Actor.Actor_GetResizePolicy(swigCPtr, (int)dimension);
5045             if (NDalicPINVOKE.SWIGPendingException.Pending)
5046                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5047             return ret;
5048         }
5049
5050         internal Vector3 GetSizeModeFactor()
5051         {
5052             Vector3 ret = new Vector3(Interop.Actor.Actor_GetSizeModeFactor(swigCPtr), true);
5053             if (NDalicPINVOKE.SWIGPendingException.Pending)
5054                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5055             return ret;
5056         }
5057
5058         internal void SetMinimumSize(Vector2 size)
5059         {
5060             Interop.ActorInternal.Actor_SetMinimumSize(swigCPtr, Vector2.getCPtr(size));
5061             if (NDalicPINVOKE.SWIGPendingException.Pending)
5062                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5063         }
5064
5065         internal Vector2 GetMinimumSize()
5066         {
5067             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMinimumSize(swigCPtr), true);
5068             if (NDalicPINVOKE.SWIGPendingException.Pending)
5069                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5070             return ret;
5071         }
5072
5073         internal void SetMaximumSize(Vector2 size)
5074         {
5075             Interop.ActorInternal.Actor_SetMaximumSize(swigCPtr, Vector2.getCPtr(size));
5076             if (NDalicPINVOKE.SWIGPendingException.Pending)
5077                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5078         }
5079
5080         internal Vector2 GetMaximumSize()
5081         {
5082             Vector2 ret = new Vector2(Interop.ActorInternal.Actor_GetMaximumSize(swigCPtr), true);
5083             if (NDalicPINVOKE.SWIGPendingException.Pending)
5084                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5085             return ret;
5086         }
5087
5088         internal int GetHierarchyDepth()
5089         {
5090             int ret = Interop.Actor.Actor_GetHierarchyDepth(swigCPtr);
5091             if (NDalicPINVOKE.SWIGPendingException.Pending)
5092                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5093             return ret;
5094         }
5095
5096         internal uint GetRendererCount()
5097         {
5098             uint ret = Interop.Actor.Actor_GetRendererCount(swigCPtr);
5099             if (NDalicPINVOKE.SWIGPendingException.Pending)
5100                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5101             return ret;
5102         }
5103
5104         internal TouchDataSignal TouchSignal()
5105         {
5106             TouchDataSignal ret = new TouchDataSignal(Interop.ActorSignal.Actor_TouchSignal(swigCPtr), false);
5107             if (NDalicPINVOKE.SWIGPendingException.Pending)
5108                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5109             return ret;
5110         }
5111
5112         internal HoverSignal HoveredSignal()
5113         {
5114             HoverSignal ret = new HoverSignal(Interop.ActorSignal.Actor_HoveredSignal(swigCPtr), false);
5115             if (NDalicPINVOKE.SWIGPendingException.Pending)
5116                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5117             return ret;
5118         }
5119
5120         internal WheelSignal WheelEventSignal()
5121         {
5122             WheelSignal ret = new WheelSignal(Interop.ActorSignal.Actor_WheelEventSignal(swigCPtr), false);
5123             if (NDalicPINVOKE.SWIGPendingException.Pending)
5124                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5125             return ret;
5126         }
5127
5128         internal ViewSignal OnWindowSignal()
5129         {
5130             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnStageSignal(swigCPtr), false);
5131             if (NDalicPINVOKE.SWIGPendingException.Pending)
5132                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5133             return ret;
5134         }
5135
5136         internal ViewSignal OffWindowSignal()
5137         {
5138             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OffStageSignal(swigCPtr), false);
5139             if (NDalicPINVOKE.SWIGPendingException.Pending)
5140                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5141             return ret;
5142         }
5143
5144         internal ViewSignal OnRelayoutSignal()
5145         {
5146             ViewSignal ret = new ViewSignal(Interop.ActorSignal.Actor_OnRelayoutSignal(swigCPtr), false);
5147             if (NDalicPINVOKE.SWIGPendingException.Pending)
5148                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5149             return ret;
5150         }
5151
5152         internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
5153         {
5154             ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(Interop.NDalic.VisibilityChangedSignal(View.getCPtr(view)), false);
5155             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5156             return ret;
5157         }
5158
5159         internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
5160         {
5161             ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(Interop.Layout.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
5162             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5163             return ret;
5164         }
5165
5166         internal ViewSignal ResourcesLoadedSignal()
5167         {
5168             ViewSignal ret = new ViewSignal(Interop.View.ResourceReadySignal(swigCPtr), false);
5169             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5170             return ret;
5171         }
5172
5173         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
5174         {
5175             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
5176         }
5177
5178         internal bool IsTopLevelView()
5179         {
5180             if (GetParent() is Layer)
5181             {
5182                 return true;
5183             }
5184             return false;
5185         }
5186
5187         internal void SetKeyInputFocus()
5188         {
5189             Interop.ViewInternal.View_SetKeyInputFocus(swigCPtr);
5190             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5191         }
5192
5193         internal void ClearKeyInputFocus()
5194         {
5195             Interop.ViewInternal.View_ClearKeyInputFocus(swigCPtr);
5196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5197         }
5198
5199         internal PinchGestureDetector GetPinchGestureDetector()
5200         {
5201             PinchGestureDetector ret = new PinchGestureDetector(Interop.ViewInternal.View_GetPinchGestureDetector(swigCPtr), true);
5202             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5203             return ret;
5204         }
5205
5206         internal PanGestureDetector GetPanGestureDetector()
5207         {
5208             PanGestureDetector ret = new PanGestureDetector(Interop.ViewInternal.View_GetPanGestureDetector(swigCPtr), true);
5209             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5210             return ret;
5211         }
5212
5213         internal TapGestureDetector GetTapGestureDetector()
5214         {
5215             TapGestureDetector ret = new TapGestureDetector(Interop.ViewInternal.View_GetTapGestureDetector(swigCPtr), true);
5216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5217             return ret;
5218         }
5219
5220         internal LongPressGestureDetector GetLongPressGestureDetector()
5221         {
5222             LongPressGestureDetector ret = new LongPressGestureDetector(Interop.ViewInternal.View_GetLongPressGestureDetector(swigCPtr), true);
5223             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5224             return ret;
5225         }
5226
5227         internal void SetBackgroundColor(Vector4 color)
5228         {
5229             Interop.ViewInternal.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
5230             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5231         }
5232
5233         internal Vector4 GetBackgroundColor()
5234         {
5235             Vector4 ret = new Vector4(Interop.ViewInternal.View_GetBackgroundColor(swigCPtr), true);
5236             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5237             return ret;
5238         }
5239
5240         internal void SetBackgroundImage(Image image)
5241         {
5242             Interop.ViewInternal.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
5243             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5244         }
5245
5246         internal ControlKeySignal KeyEventSignal()
5247         {
5248             ControlKeySignal ret = new ControlKeySignal(Interop.ViewSignal.View_KeyEventSignal(swigCPtr), false);
5249             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5250             return ret;
5251         }
5252
5253         internal KeyInputFocusSignal KeyInputFocusGainedSignal()
5254         {
5255             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusGainedSignal(swigCPtr), false);
5256             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5257             return ret;
5258         }
5259
5260         internal KeyInputFocusSignal KeyInputFocusLostSignal()
5261         {
5262             KeyInputFocusSignal ret = new KeyInputFocusSignal(Interop.ViewSignal.View_KeyInputFocusLostSignal(swigCPtr), false);
5263             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
5264             return ret;
5265         }
5266
5267         internal IntPtr GetPtrfromView()
5268         {
5269             return (IntPtr)swigCPtr;
5270         }
5271
5272         /// <summary>
5273         /// Removes the layout from this View.
5274         /// </summary>
5275         internal void ResetLayout()
5276         {
5277             _layout = null;
5278         }
5279
5280         internal ResourceLoadingStatusType GetBackgroundResourceStatus()
5281         {
5282             return (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5283         }
5284
5285         /// <summary>
5286         /// you can override it to clean-up your own resources.
5287         /// </summary>
5288         /// <param name="type">DisposeTypes</param>
5289         /// <since_tizen> 3 </since_tizen>
5290         protected override void Dispose(DisposeTypes type)
5291         {
5292             if (disposed)
5293             {
5294                 return;
5295             }
5296
5297             if (type == DisposeTypes.Explicit)
5298             {
5299                 //Called by User
5300                 //Release your own managed resources here.
5301                 //You should release all of your own disposable objects here.
5302             }
5303
5304             //Release your own unmanaged resources here.
5305             //You should not access any managed member here except static instance.
5306             //because the execution order of Finalizes is non-deterministic.
5307             if (this != null)
5308             {
5309                 DisConnectFromSignals();
5310             }
5311
5312             if (swigCPtr.Handle != global::System.IntPtr.Zero)
5313             {
5314                 if (swigCMemOwn)
5315                 {
5316                     swigCMemOwn = false;
5317                     Interop.View.delete_View(swigCPtr);
5318                 }
5319                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
5320             }
5321
5322             foreach (View view in Children)
5323             {
5324                 view.InternalParent = null;
5325             }
5326
5327             base.Dispose(type);
5328
5329         }
5330
5331         private void OnSize2DChanged(int width, int height)
5332         {
5333             Size2D = new Size2D(width, height);
5334         }
5335
5336         private void OnPosition2DChanged(int x, int y)
5337         {
5338             Position2D = new Position2D(x, y);
5339         }
5340
5341         private void DisConnectFromSignals()
5342         {
5343             // Save current CPtr.
5344             global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr;
5345
5346             // Use BaseHandle CPtr as current might have been deleted already in derived classes.
5347             swigCPtr = GetBaseHandleCPtrHandleRef;
5348
5349             if (_onRelayoutEventCallback != null)
5350             {
5351                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5352             }
5353
5354             if (_offWindowEventCallback != null)
5355             {
5356                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5357             }
5358
5359             if (_onWindowEventCallback != null)
5360             {
5361                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5362             }
5363
5364             if (_wheelEventCallback != null)
5365             {
5366                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5367             }
5368
5369             if (_hoverEventCallback != null)
5370             {
5371                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5372             }
5373
5374             if (_touchDataCallback != null)
5375             {
5376                 this.TouchSignal().Disconnect(_touchDataCallback);
5377             }
5378
5379             if (_ResourcesLoadedCallback != null)
5380             {
5381                 this.ResourcesLoadedSignal().Disconnect(_ResourcesLoadedCallback);
5382             }
5383
5384             if (_offWindowEventCallback != null)
5385             {
5386                 this.OffWindowSignal().Disconnect(_offWindowEventCallback);
5387             }
5388
5389             if (_onWindowEventCallback != null)
5390             {
5391                 this.OnWindowSignal().Disconnect(_onWindowEventCallback);
5392             }
5393
5394             if (_wheelEventCallback != null)
5395             {
5396                 this.WheelEventSignal().Disconnect(_wheelEventCallback);
5397             }
5398
5399             if (_hoverEventCallback != null)
5400             {
5401                 this.HoveredSignal().Disconnect(_hoverEventCallback);
5402             }
5403
5404             if (_touchDataCallback != null)
5405             {
5406                 this.TouchSignal().Disconnect(_touchDataCallback);
5407             }
5408
5409             if (_onRelayoutEventCallback != null)
5410             {
5411                 this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
5412             }
5413
5414             if (_keyCallback != null)
5415             {
5416                 this.KeyEventSignal().Disconnect(_keyCallback);
5417             }
5418
5419             if (_keyInputFocusLostCallback != null)
5420             {
5421                 this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
5422             }
5423
5424             if (_keyInputFocusGainedCallback != null)
5425             {
5426                 this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
5427             }
5428
5429             if (_backgroundResourceLoadedCallback != null)
5430             {
5431                 this.ResourcesLoadedSignal().Disconnect(_backgroundResourceLoadedCallback);
5432             }
5433
5434             if (_onWindowSendEventCallback != null)
5435             {
5436                 this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
5437             }
5438
5439             // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.
5440             // Restore current CPtr.
5441             swigCPtr = currentCPtr;
5442         }
5443
5444         private void OnKeyInputFocusGained(IntPtr view)
5445         {
5446             if (_keyInputFocusGainedEventHandler != null)
5447             {
5448                 _keyInputFocusGainedEventHandler(this, null);
5449             }
5450         }
5451
5452         private void OnKeyInputFocusLost(IntPtr view)
5453         {
5454             if (_keyInputFocusLostEventHandler != null)
5455             {
5456                 _keyInputFocusLostEventHandler(this, null);
5457             }
5458         }
5459
5460         private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
5461         {
5462             if (keyEvent == global::System.IntPtr.Zero)
5463             {
5464                 NUILog.Error("keyEvent should not be null!");
5465                 return true;
5466             }
5467
5468             KeyEventArgs e = new KeyEventArgs();
5469
5470             bool result = false;
5471
5472             e.Key = Tizen.NUI.Key.GetKeyFromPtr(keyEvent);
5473
5474             if (_keyEventHandler != null)
5475             {
5476                 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
5477
5478                 // Oring the result of each callback.
5479                 foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
5480                 {
5481                     result |= del(this, e);
5482                 }
5483             }
5484
5485             return result;
5486         }
5487
5488         // Callback for View OnRelayout signal
5489         private void OnRelayout(IntPtr data)
5490         {
5491             if (_onRelayoutEventHandler != null)
5492             {
5493                 _onRelayoutEventHandler(this, null);
5494             }
5495         }
5496
5497         // Callback for View TouchSignal
5498         private bool OnTouch(IntPtr view, IntPtr touchData)
5499         {
5500             if (touchData == global::System.IntPtr.Zero)
5501             {
5502                 NUILog.Error("touchData should not be null!");
5503                 return true;
5504             }
5505
5506             TouchEventArgs e = new TouchEventArgs();
5507
5508             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
5509
5510             if (_touchDataEventHandler != null)
5511             {
5512                 return _touchDataEventHandler(this, e);
5513             }
5514             return false;
5515         }
5516
5517         // Callback for View Hover signal
5518         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
5519         {
5520             if (hoverEvent == global::System.IntPtr.Zero)
5521             {
5522                 NUILog.Error("hoverEvent should not be null!");
5523                 return true;
5524             }
5525
5526             HoverEventArgs e = new HoverEventArgs();
5527
5528             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
5529
5530             if (_hoverEventHandler != null)
5531             {
5532                 return _hoverEventHandler(this, e);
5533             }
5534             return false;
5535         }
5536
5537         // Callback for View Wheel signal
5538         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
5539         {
5540             if (wheelEvent == global::System.IntPtr.Zero)
5541             {
5542                 NUILog.Error("wheelEvent should not be null!");
5543                 return true;
5544             }
5545
5546             WheelEventArgs e = new WheelEventArgs();
5547
5548             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
5549
5550             if (_wheelEventHandler != null)
5551             {
5552                 return _wheelEventHandler(this, e);
5553             }
5554             return false;
5555         }
5556
5557         // Callback for View OnWindow signal
5558         private void OnWindow(IntPtr data)
5559         {
5560             if (_onWindowEventHandler != null)
5561             {
5562                 _onWindowEventHandler(this, null);
5563             }
5564         }
5565
5566         // Callback for View OffWindow signal
5567         private void OffWindow(IntPtr data)
5568         {
5569             if (_offWindowEventHandler != null)
5570             {
5571                 _offWindowEventHandler(this, null);
5572             }
5573         }
5574
5575         // Callback for View visibility change signal
5576         private void OnVisibilityChanged(IntPtr data, bool visibility, VisibilityChangeType type)
5577         {
5578             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
5579             if (data != null)
5580             {
5581                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5582             }
5583             e.Visibility = visibility;
5584             e.Type = type;
5585
5586             if (_visibilityChangedEventHandler != null)
5587             {
5588                 _visibilityChangedEventHandler(this, e);
5589             }
5590         }
5591
5592         // Callback for View layout direction change signal
5593         private void OnLayoutDirectionChanged(IntPtr data, ViewLayoutDirectionType type)
5594         {
5595             LayoutDirectionChangedEventArgs e = new LayoutDirectionChangedEventArgs();
5596             if (data != null)
5597             {
5598                 e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
5599             }
5600             e.Type = type;
5601
5602             if (_layoutDirectionChangedEventHandler != null)
5603             {
5604                 _layoutDirectionChangedEventHandler(this, e);
5605             }
5606         }
5607
5608         private void OnResourcesLoaded(IntPtr view)
5609         {
5610             if (_resourcesLoadedEventHandler != null)
5611             {
5612                 _resourcesLoadedEventHandler(this, null);
5613             }
5614         }
5615
5616         private View ConvertIdToView(uint id)
5617         {
5618             View view = GetParent()?.FindCurrentChildById(id);
5619
5620             //If we can't find the parent's children, find in the top layer.
5621             if (!view) 
5622             {
5623                 Container parent = GetParent();
5624                 while ((parent is View) && (parent != null))
5625                 {
5626                     parent = parent.GetParent();
5627                     if (parent is Layer)
5628                     {
5629                         view = parent.FindCurrentChildById(id);
5630                         break;
5631                     }
5632                 }
5633             }
5634
5635             return view;
5636         }
5637
5638         private void OnBackgroundResourceLoaded(IntPtr view)
5639         {
5640             BackgroundResourceLoadedEventArgs e = new BackgroundResourceLoadedEventArgs();
5641             e.Status = (ResourceLoadingStatusType)Interop.View.View_GetVisualResourceStatus(this.swigCPtr, Property.BACKGROUND);
5642
5643             if (_backgroundResourceLoadedEventHandler != null)
5644             {
5645                 _backgroundResourceLoadedEventHandler(this, e);
5646             }
5647         }
5648
5649         /// <summary>
5650         /// Event argument passed through the ChildAdded event.
5651         /// </summary>
5652         /// <since_tizen> 5 </since_tizen>
5653         public class ChildAddedEventArgs : EventArgs
5654         {
5655             /// <summary>
5656             /// Added child view at moment.
5657             /// </summary>
5658             /// <since_tizen> 5 </since_tizen>
5659             public View Added { get; set; }
5660         }
5661
5662         /// <summary>
5663         /// Event argument passed through the ChildRemoved event.
5664         /// </summary>
5665         /// <since_tizen> 5 </since_tizen>
5666         public class ChildRemovedEventArgs : EventArgs
5667         {
5668             /// <summary>
5669             /// Removed child view at moment.
5670             /// </summary>
5671             /// <since_tizen> 5 </since_tizen>
5672             public View Removed { get; set; }
5673         }
5674
5675         /// <summary>
5676         /// Event arguments that passed via the KeyEvent signal.
5677         /// </summary>
5678         /// <since_tizen> 3 </since_tizen>
5679         public class KeyEventArgs : EventArgs
5680         {
5681             private Key _key;
5682
5683             /// <summary>
5684             /// Key - is the key sent to the view.
5685             /// </summary>
5686             /// <since_tizen> 3 </since_tizen>
5687             public Key Key
5688             {
5689                 get
5690                 {
5691                     return _key;
5692                 }
5693                 set
5694                 {
5695                     _key = value;
5696                 }
5697             }
5698         }
5699
5700         /// <summary>
5701         /// Event arguments that passed via the touch signal.
5702         /// </summary>
5703         /// <since_tizen> 3 </since_tizen>
5704         public class TouchEventArgs : EventArgs
5705         {
5706             private Touch _touch;
5707
5708             /// <summary>
5709             /// Touch - contains the information of touch points.
5710             /// </summary>
5711             /// <since_tizen> 3 </since_tizen>
5712             public Touch Touch
5713             {
5714                 get
5715                 {
5716                     return _touch;
5717                 }
5718                 set
5719                 {
5720                     _touch = value;
5721                 }
5722             }
5723         }
5724
5725         /// <summary>
5726         /// Event arguments that passed via the hover signal.
5727         /// </summary>
5728         /// <since_tizen> 3 </since_tizen>
5729         public class HoverEventArgs : EventArgs
5730         {
5731             private Hover _hover;
5732
5733             /// <summary>
5734             /// Hover - contains touch points that represent the points that are currently being hovered or the points where a hover has stopped.
5735             /// </summary>
5736             /// <since_tizen> 3 </since_tizen>
5737             public Hover Hover
5738             {
5739                 get
5740                 {
5741                     return _hover;
5742                 }
5743                 set
5744                 {
5745                     _hover = value;
5746                 }
5747             }
5748         }
5749
5750         /// <summary>
5751         /// Event arguments that passed via the wheel signal.
5752         /// </summary>
5753         /// <since_tizen> 3 </since_tizen>
5754         public class WheelEventArgs : EventArgs
5755         {
5756             private Wheel _wheel;
5757
5758             /// <summary>
5759             /// WheelEvent - store a wheel rolling type: MOUSE_WHEEL or CUSTOM_WHEEL.
5760             /// </summary>
5761             /// <since_tizen> 3 </since_tizen>
5762             public Wheel Wheel
5763             {
5764                 get
5765                 {
5766                     return _wheel;
5767                 }
5768                 set
5769                 {
5770                     _wheel = value;
5771                 }
5772             }
5773         }
5774
5775         /// <summary>
5776         /// Event arguments of visibility changed.
5777         /// </summary>
5778         /// <since_tizen> 3 </since_tizen>
5779         public class VisibilityChangedEventArgs : EventArgs
5780         {
5781             private View _view;
5782             private bool _visibility;
5783             private VisibilityChangeType _type;
5784
5785             /// <summary>
5786             /// The view, or child of view, whose visibility has changed.
5787             /// </summary>
5788             /// <since_tizen> 3 </since_tizen>
5789             public View View
5790             {
5791                 get
5792                 {
5793                     return _view;
5794                 }
5795                 set
5796                 {
5797                     _view = value;
5798                 }
5799             }
5800
5801             /// <summary>
5802             /// Whether the view is now visible or not.
5803             /// </summary>
5804             /// <since_tizen> 3 </since_tizen>
5805             public bool Visibility
5806             {
5807                 get
5808                 {
5809                     return _visibility;
5810                 }
5811                 set
5812                 {
5813                     _visibility = value;
5814                 }
5815             }
5816
5817             /// <summary>
5818             /// Whether the view's visible property has changed or a parent's.
5819             /// </summary>
5820             /// <since_tizen> 3 </since_tizen>
5821             public VisibilityChangeType Type
5822             {
5823                 get
5824                 {
5825                     return _type;
5826                 }
5827                 set
5828                 {
5829                     _type = value;
5830                 }
5831             }
5832         }
5833
5834         /// <summary>
5835         /// Event arguments of layout direction changed.
5836         /// </summary>
5837         /// <since_tizen> 4 </since_tizen>
5838         public class LayoutDirectionChangedEventArgs : EventArgs
5839         {
5840             private View _view;
5841             private ViewLayoutDirectionType _type;
5842
5843             /// <summary>
5844             /// The view, or child of view, whose layout direction has changed.
5845             /// </summary>
5846             /// <since_tizen> 4 </since_tizen>
5847             public View View
5848             {
5849                 get
5850                 {
5851                     return _view;
5852                 }
5853                 set
5854                 {
5855                     _view = value;
5856                 }
5857             }
5858
5859             /// <summary>
5860             /// Whether the view's layout direction property has changed or a parent's.
5861             /// </summary>
5862             /// <since_tizen> 4 </since_tizen>
5863             public ViewLayoutDirectionType Type
5864             {
5865                 get
5866                 {
5867                     return _type;
5868                 }
5869                 set
5870                 {
5871                     _type = value;
5872                 }
5873             }
5874         }
5875
5876
5877         private Dictionary<string, Transition> transDictionary = new Dictionary<string, Transition>();
5878
5879         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
5880         [EditorBrowsable(EditorBrowsableState.Never)]
5881         public Transition GetTransition(string transitionName)
5882         {
5883             Transition trans = null;
5884             transDictionary.TryGetValue(transitionName, out trans);
5885             return trans;
5886         }
5887
5888         private void LoadTransitions()
5889         {
5890             foreach (string str in transitionNames)
5891             {
5892                 string resourceName = str + ".xaml";
5893                 Transition trans = null;
5894
5895                 string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
5896
5897                 string likelyResourcePath = resource + "animation/" + resourceName;
5898
5899                 if (File.Exists(likelyResourcePath))
5900                 {
5901                     trans = Extensions.LoadObject<Transition>(likelyResourcePath);
5902                 }
5903                 if (trans)
5904                 {
5905                     transDictionary.Add(trans.Name, trans);
5906                 }
5907             }
5908         }
5909
5910         /// This will be public opened in tizen_next after ACR done. Before ACR, need to be hidden as inhouse API.
5911         [EditorBrowsable(EditorBrowsableState.Never)]
5912         public string[] TransitionNames
5913         {
5914             get
5915             {
5916                 return transitionNames;
5917             }
5918             set
5919             {
5920                 transitionNames = value;
5921                 LoadTransitions();
5922             }
5923         }
5924         private string[] transitionNames;
5925
5926         internal class BackgroundResourceLoadedEventArgs : EventArgs
5927         {
5928             private ResourceLoadingStatusType status = ResourceLoadingStatusType.Invalid;
5929             public ResourceLoadingStatusType Status
5930             {
5931                 get
5932                 {
5933                     return status;
5934                 }
5935                 set
5936                 {
5937                     status = value;
5938                 }
5939             }
5940         }
5941
5942         internal class Property
5943         {
5944             internal static readonly int TOOLTIP = Interop.ViewProperty.View_Property_TOOLTIP_get();
5945             internal static readonly int STATE = Interop.ViewProperty.View_Property_STATE_get();
5946             internal static readonly int SUB_STATE = Interop.ViewProperty.View_Property_SUB_STATE_get();
5947             internal static readonly int LEFT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_LEFT_FOCUSABLE_ACTOR_ID_get();
5948             internal static readonly int RIGHT_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_RIGHT_FOCUSABLE_ACTOR_ID_get();
5949             internal static readonly int UP_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_UP_FOCUSABLE_ACTOR_ID_get();
5950             internal static readonly int DOWN_FOCUSABLE_VIEW_ID = Interop.ViewProperty.View_Property_DOWN_FOCUSABLE_ACTOR_ID_get();
5951             internal static readonly int STYLE_NAME = Interop.ViewProperty.View_Property_STYLE_NAME_get();
5952             internal static readonly int BACKGROUND = Interop.ViewProperty.View_Property_BACKGROUND_get();
5953             internal static readonly int SIBLING_ORDER = Interop.ActorProperty.Actor_Property_SIBLING_ORDER_get();
5954             internal static readonly int OPACITY = Interop.ActorProperty.Actor_Property_OPACITY_get();
5955             internal static readonly int SCREEN_POSITION = Interop.ActorProperty.Actor_Property_SCREEN_POSITION_get();
5956             internal static readonly int POSITION_USES_ANCHOR_POINT = Interop.ActorProperty.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
5957             internal static readonly int PARENT_ORIGIN = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_get();
5958             internal static readonly int PARENT_ORIGIN_X = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_X_get();
5959             internal static readonly int PARENT_ORIGIN_Y = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Y_get();
5960             internal static readonly int PARENT_ORIGIN_Z = Interop.ActorProperty.Actor_Property_PARENT_ORIGIN_Z_get();
5961             internal static readonly int ANCHOR_POINT = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_get();
5962             internal static readonly int ANCHOR_POINT_X = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_X_get();
5963             internal static readonly int ANCHOR_POINT_Y = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Y_get();
5964             internal static readonly int ANCHOR_POINT_Z = Interop.ActorProperty.Actor_Property_ANCHOR_POINT_Z_get();
5965             internal static readonly int SIZE = Interop.ActorProperty.Actor_Property_SIZE_get();
5966             internal static readonly int SIZE_WIDTH = Interop.ActorProperty.Actor_Property_SIZE_WIDTH_get();
5967             internal static readonly int SIZE_HEIGHT = Interop.ActorProperty.Actor_Property_SIZE_HEIGHT_get();
5968             internal static readonly int SIZE_DEPTH = Interop.ActorProperty.Actor_Property_SIZE_DEPTH_get();
5969             internal static readonly int POSITION = Interop.ActorProperty.Actor_Property_POSITION_get();
5970             internal static readonly int POSITION_X = Interop.ActorProperty.Actor_Property_POSITION_X_get();
5971             internal static readonly int POSITION_Y = Interop.ActorProperty.Actor_Property_POSITION_Y_get();
5972             internal static readonly int POSITION_Z = Interop.ActorProperty.Actor_Property_POSITION_Z_get();
5973             internal static readonly int WORLD_POSITION = Interop.ActorProperty.Actor_Property_WORLD_POSITION_get();
5974             internal static readonly int WORLD_POSITION_X = Interop.ActorProperty.Actor_Property_WORLD_POSITION_X_get();
5975             internal static readonly int WORLD_POSITION_Y = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Y_get();
5976             internal static readonly int WORLD_POSITION_Z = Interop.ActorProperty.Actor_Property_WORLD_POSITION_Z_get();
5977             internal static readonly int ORIENTATION = Interop.ActorProperty.Actor_Property_ORIENTATION_get();
5978             internal static readonly int WORLD_ORIENTATION = Interop.ActorProperty.Actor_Property_WORLD_ORIENTATION_get();
5979             internal static readonly int SCALE = Interop.ActorProperty.Actor_Property_SCALE_get();
5980             internal static readonly int SCALE_X = Interop.ActorProperty.Actor_Property_SCALE_X_get();
5981             internal static readonly int SCALE_Y = Interop.ActorProperty.Actor_Property_SCALE_Y_get();
5982             internal static readonly int SCALE_Z = Interop.ActorProperty.Actor_Property_SCALE_Z_get();
5983             internal static readonly int WORLD_SCALE = Interop.ActorProperty.Actor_Property_WORLD_SCALE_get();
5984             internal static readonly int VISIBLE = Interop.ActorProperty.Actor_Property_VISIBLE_get();
5985             internal static readonly int WORLD_COLOR = Interop.ActorProperty.Actor_Property_WORLD_COLOR_get();
5986             internal static readonly int WORLD_MATRIX = Interop.ActorProperty.Actor_Property_WORLD_MATRIX_get();
5987             internal static readonly int NAME = Interop.ActorProperty.Actor_Property_NAME_get();
5988             internal static readonly int SENSITIVE = Interop.ActorProperty.Actor_Property_SENSITIVE_get();
5989             internal static readonly int LEAVE_REQUIRED = Interop.ActorProperty.Actor_Property_LEAVE_REQUIRED_get();
5990             internal static readonly int INHERIT_ORIENTATION = Interop.ActorProperty.Actor_Property_INHERIT_ORIENTATION_get();
5991             internal static readonly int INHERIT_SCALE = Interop.ActorProperty.Actor_Property_INHERIT_SCALE_get();
5992             internal static readonly int DRAW_MODE = Interop.ActorProperty.Actor_Property_DRAW_MODE_get();
5993             internal static readonly int SIZE_MODE_FACTOR = Interop.ActorProperty.Actor_Property_SIZE_MODE_FACTOR_get();
5994             internal static readonly int WIDTH_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_WIDTH_RESIZE_POLICY_get();
5995             internal static readonly int HEIGHT_RESIZE_POLICY = Interop.ActorProperty.Actor_Property_HEIGHT_RESIZE_POLICY_get();
5996             internal static readonly int SIZE_SCALE_POLICY = Interop.ActorProperty.Actor_Property_SIZE_SCALE_POLICY_get();
5997             internal static readonly int WIDTH_FOR_HEIGHT = Interop.ActorProperty.Actor_Property_WIDTH_FOR_HEIGHT_get();
5998             internal static readonly int HEIGHT_FOR_WIDTH = Interop.ActorProperty.Actor_Property_HEIGHT_FOR_WIDTH_get();
5999             internal static readonly int MINIMUM_SIZE = Interop.ActorProperty.Actor_Property_MINIMUM_SIZE_get();
6000             internal static readonly int MAXIMUM_SIZE = Interop.ActorProperty.Actor_Property_MAXIMUM_SIZE_get();
6001             internal static readonly int INHERIT_POSITION = Interop.ActorProperty.Actor_Property_INHERIT_POSITION_get();
6002             internal static readonly int CLIPPING_MODE = Interop.ActorProperty.Actor_Property_CLIPPING_MODE_get();
6003             internal static readonly int INHERIT_LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
6004             internal static readonly int LAYOUT_DIRECTION = Interop.ActorProperty.Actor_Property_LAYOUT_DIRECTION_get();
6005             internal static readonly int MARGIN = Interop.ViewProperty.View_Property_MARGIN_get();
6006             internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();
6007         }
6008     }
6009 }