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