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