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