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