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