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