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