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