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