[NUI] Add IsUsingXaml flag in properties of View and AnimatedVectorImageView
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
1 /*
2  * Copyright(c) 2022 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.Collections.Generic;
19 using System.ComponentModel;
20 using System.Runtime.InteropServices;
21 using Tizen.NUI.Binding;
22
23 namespace Tizen.NUI.BaseComponents
24 {
25     /// <summary>
26     /// View is the base class for all views.
27     /// </summary>
28     /// <since_tizen> 3 </since_tizen>
29     public partial class View : Container, IResourcesProvider
30     {
31         private static HashSet<BindableProperty> positionPropertyGroup = new HashSet<BindableProperty>();
32         private static HashSet<BindableProperty> sizePropertyGroup = new HashSet<BindableProperty>();
33         private static HashSet<BindableProperty> scalePropertyGroup = new HashSet<BindableProperty>();
34         private static bool defaultGrabTouchAfterLeave = false;
35         private static bool defaultAllowOnlyOwnTouch = false;
36
37         internal BackgroundExtraData backgroundExtraData;
38
39         private bool layoutSet = false;
40         private LayoutItem layout; // Exclusive layout assigned to this View.
41
42         // List of transitions paired with the condition that uses the transition.
43         private Dictionary<TransitionCondition, TransitionList> layoutTransitions;
44         private int widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
45         private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
46         private float weight = 0.0f; // Weighting of child View in a Layout
47         private bool backgroundImageSynchronousLoading = false;
48         private bool excludeLayouting = false;
49         private LayoutTransition layoutTransition;
50         private TransitionOptions transitionOptions = null;
51         private ThemeData themeData;
52         private bool isThemeChanged = false;
53
54         // List of constraints
55         private Constraint widthConstraint = null;
56         private Constraint heightConstraint = null;
57
58         private Size2D internalMaximumSize = null;
59         private Size2D internalMinimumSize = null;
60         private Extents internalMargin = null;
61         private Extents internalPadding = null;
62         private Vector3 internalSizeModeFactor = null;
63         private Vector2 internalCellIndex = null;
64         private Color internalBackgroundColor = null;
65         private Color internalColor = null;
66         private Position internalPivotPoint = null;
67         private Position internalPosition = null;
68         private Position2D internalPosition2D = null;
69         private Vector3 internalScale = null;
70         private Size internalSize = null;
71         private Size2D internalSize2D = null;
72         private int layoutCount = 0;
73         private ControlState propagatableControlStates = ControlState.All;
74
75         private string internalName = string.Empty;
76         private Position internalCurrentParentOrigin = null;
77         private Position internalCurrentAnchorPoint = null;
78         private Vector3 internalTargetSize = null;
79         private Size2D internalCurrentSize = null;
80         private Position internalCurrentPosition = null;
81         private Vector3 internalCurrentWorldPosition = null;
82         private Vector3 internalCurrentScale = null;
83         private Vector3 internalCurrentWorldScale = null;
84         private Vector4 internalCurrentColor = null;
85         private Vector4 internalCurrentWorldColor = null;
86         private Vector2 internalCurrentScreenPosition = null;
87
88         private static int aliveCount = 0;
89
90         static View()
91         {
92 #if REMOVE_READONLY_FOR_BINDABLE_PROPERTY
93             //to get "IsUsingXaml" feature working at preload, we need to remove readonly for BindableProperty.
94 #else
95             if (NUIApplication.IsUsingXaml)
96             {
97                 StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty,
98                     propertyChanged: SetInternalStyleNameProperty, defaultValueCreator: GetInternalStyleNameProperty);
99
100                 KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false,
101                     propertyChanged: SetInternalKeyInputFocusProperty, defaultValueCreator: GetInternalKeyInputFocusProperty);
102
103                 BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null,
104                     propertyChanged: SetInternalBackgroundColorProperty, defaultValueCreator: GetInternalBackgroundColorProperty);
105
106                 ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null,
107                     propertyChanged: SetInternalColorProperty, defaultValueCreator: GetInternalColorProperty);
108
109                 ColorRedProperty = BindableProperty.Create(nameof(ColorRed), typeof(float), typeof(View), default(float),
110                     propertyChanged: SetInternalColorRedProperty, defaultValueCreator: GetInternalColorRedProperty);
111
112                 ColorGreenProperty = BindableProperty.Create(nameof(ColorGreen), typeof(float), typeof(View), default(float),
113                     propertyChanged: SetInternalColorGreenProperty, defaultValueCreator: GetInternalColorGreenProperty);
114
115                 ColorBlueProperty = BindableProperty.Create(nameof(ColorBlue), typeof(float), typeof(View), default(float),
116                     propertyChanged: SetInternalColorBlueProperty, defaultValueCreator: GetInternalColorBlueProperty);
117
118                 BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string),
119                     propertyChanged: SetInternalBackgroundImageProperty, defaultValueCreator: GetInternalBackgroundImageProperty);
120
121                 BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle),
122                     propertyChanged: SetInternalBackgroundImageBorderProperty, defaultValueCreator: GetInternalBackgroundImageBorderProperty);
123
124                 BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null,
125                     propertyChanged: SetInternalBackgroundProperty, defaultValueCreator: GetInternalBackgroundProperty);
126
127                 StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal,
128                     propertyChanged: SetInternalStateProperty, defaultValueCreator: GetInternalStateProperty);
129
130                 SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal,
131                     propertyChanged: SetInternalSubStateProperty, defaultValueCreator: GetInternalSubStateProperty);
132
133                 TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null,
134                     propertyChanged: SetInternalTooltipProperty, defaultValueCreator: GetInternalTooltipProperty);
135
136                 FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float),
137                     propertyChanged: SetInternalFlexProperty, defaultValueCreator: GetInternalFlexProperty);
138
139                 AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int),
140                     propertyChanged: SetInternalAlignSelfProperty, defaultValueCreator: GetInternalAlignSelfProperty);
141
142                 FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null,
143                     propertyChanged: SetInternalFlexMarginProperty, defaultValueCreator: GetInternalFlexMarginProperty);
144
145                 CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null,
146                     propertyChanged: SetInternalCellIndexProperty, defaultValueCreator: GetInternalCellIndexProperty);
147
148                 RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float),
149                     propertyChanged: SetInternalRowSpanProperty, defaultValueCreator: GetInternalRowSpanProperty);
150
151                 ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float),
152                     propertyChanged: SetInternalColumnSpanProperty, defaultValueCreator: GetInternalColumnSpanProperty);
153
154                 CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left,
155                     propertyChanged: SetInternalCellHorizontalAlignmentProperty, defaultValueCreator: GetInternalCellHorizontalAlignmentProperty);
156
157                 CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top,
158                     propertyChanged: SetInternalCellVerticalAlignmentProperty, defaultValueCreator: GetInternalCellVerticalAlignmentProperty);
159
160                 WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float),
161                     propertyChanged: SetInternalWeightProperty, defaultValueCreator: GetInternalWeightProperty);
162
163                 LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null,
164                     propertyChanged: SetInternalLeftFocusableViewProperty, defaultValueCreator: GetInternalLeftFocusableViewProperty);
165
166                 RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null,
167                     propertyChanged: SetInternalRightFocusableViewProperty, defaultValueCreator: GetInternalRightFocusableViewProperty);
168
169                 UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null,
170                     propertyChanged: SetInternalUpFocusableViewProperty, defaultValueCreator: GetInternalUpFocusableViewProperty);
171
172                 DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null,
173                     propertyChanged: SetInternalDownFocusableViewProperty, defaultValueCreator: GetInternalDownFocusableViewProperty);
174
175                 ClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.ClockwiseFocusableView), typeof(View), typeof(View), null,
176                     propertyChanged: SetInternalClockwiseFocusableViewProperty, defaultValueCreator: GetInternalClockwiseFocusableViewProperty);
177
178                 CounterClockwiseFocusableViewProperty = BindableProperty.Create(nameof(View.CounterClockwiseFocusableView), typeof(View), typeof(View), null,
179                     propertyChanged: SetInternalCounterClockwiseFocusableViewProperty, defaultValueCreator: GetInternalCounterClockwiseFocusableViewProperty);
180
181                 FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false,
182                     propertyChanged: SetInternalFocusableProperty, defaultValueCreator: GetInternalFocusableProperty);
183
184                 FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true,
185                     propertyChanged: SetInternalFocusableChildrenProperty, defaultValueCreator: GetInternalFocusableChildrenProperty);
186
187                 FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false,
188                     propertyChanged: SetInternalFocusableInTouchProperty, defaultValueCreator: GetInternalFocusableInTouchProperty);
189
190                 Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null,
191                     propertyChanged: SetInternalSize2DProperty, defaultValueCreator: GetInternalSize2DProperty);
192
193                 OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float),
194                     propertyChanged: SetInternalOpacityProperty, defaultValueCreator: GetInternalOpacityProperty);
195
196                 Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null,
197                     propertyChanged: SetInternalPosition2DProperty, defaultValueCreator: GetInternalPosition2DProperty);
198
199                 PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true,
200                     propertyChanged: SetInternalPositionUsesPivotPointProperty, defaultValueCreator: GetInternalPositionUsesPivotPointProperty);
201
202                 SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int),
203                     propertyChanged: SetInternalSiblingOrderProperty, defaultValueCreator: GetInternalSiblingOrderProperty);
204
205                 ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null,
206                     propertyChanged: SetInternalParentOriginProperty, defaultValueCreator: GetInternalParentOriginProperty);
207
208                 PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null,
209                     propertyChanged: SetInternalPivotPointProperty, defaultValueCreator: GetInternalPivotPointProperty);
210
211                 SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float),
212                     propertyChanged: SetInternalSizeWidthProperty, defaultValueCreator: GetInternalSizeWidthProperty);
213
214                 SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float),
215                     propertyChanged: SetInternalSizeHeightProperty, defaultValueCreator: GetInternalSizeHeightProperty);
216
217                 PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null,
218                     propertyChanged: SetInternalPositionProperty, defaultValueCreator: GetInternalPositionProperty);
219
220                 PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float),
221                     propertyChanged: SetInternalPositionXProperty, defaultValueCreator: GetInternalPositionXProperty);
222
223                 PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float),
224                     propertyChanged: SetInternalPositionYProperty, defaultValueCreator: GetInternalPositionYProperty);
225
226                 PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float),
227                     propertyChanged: SetInternalPositionZProperty, defaultValueCreator: GetInternalPositionZProperty);
228
229                 OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null,
230                     propertyChanged: SetInternalOrientationProperty, defaultValueCreator: GetInternalOrientationProperty);
231
232                 ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null,
233                     propertyChanged: SetInternalScaleProperty, defaultValueCreator: GetInternalScaleProperty);
234
235                 ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float),
236                     propertyChanged: SetInternalScaleXProperty, defaultValueCreator: GetInternalScaleXProperty);
237
238                 ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float),
239                     propertyChanged: SetInternalScaleYProperty, defaultValueCreator: GetInternalScaleYProperty);
240
241                 ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float),
242                     propertyChanged: SetInternalScaleZProperty, defaultValueCreator: GetInternalScaleZProperty);
243
244                 NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty,
245                     propertyChanged: SetInternalNameProperty, defaultValueCreator: GetInternalNameProperty);
246
247                 SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false,
248                     propertyChanged: SetInternalSensitiveProperty, defaultValueCreator: GetInternalSensitiveProperty);
249
250                 IsEnabledProperty = BindableProperty.Create(nameof(IsEnabled), typeof(bool), typeof(View), false,
251                     propertyChanged: SetInternalIsEnabledProperty, defaultValueCreator: GetInternalIsEnabledProperty);
252
253                 DispatchKeyEventsProperty = BindableProperty.Create(nameof(DispatchKeyEvents), typeof(bool), typeof(View), false,
254                     propertyChanged: SetInternalDispatchKeyEventsProperty, defaultValueCreator: GetInternalDispatchKeyEventsProperty);
255
256                 LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false,
257                     propertyChanged: SetInternalLeaveRequiredProperty, defaultValueCreator: GetInternalLeaveRequiredProperty);
258
259                 InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false,
260                     propertyChanged: SetInternalInheritOrientationProperty, defaultValueCreator: GetInternalInheritOrientationProperty);
261
262                 InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false,
263                     propertyChanged: SetInternalInheritScaleProperty, defaultValueCreator: GetInternalInheritScaleProperty);
264
265                 DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal,
266                     propertyChanged: SetInternalDrawModeProperty, defaultValueCreator: GetInternalDrawModeProperty);
267
268                 SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null,
269                     propertyChanged: SetInternalSizeModeFactorProperty, defaultValueCreator: GetInternalSizeModeFactorProperty);
270
271                 WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
272                     propertyChanged: SetInternalWidthResizePolicyProperty, defaultValueCreator: GetInternalWidthResizePolicyProperty);
273
274                 HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed,
275                     propertyChanged: SetInternalHeightResizePolicyProperty, defaultValueCreator: GetInternalHeightResizePolicyProperty);
276
277                 SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet,
278                     propertyChanged: SetInternalSizeScalePolicyProperty, defaultValueCreator: GetInternalSizeScalePolicyProperty);
279
280                 WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false,
281                     propertyChanged: SetInternalWidthForHeightProperty, defaultValueCreator: GetInternalWidthForHeightProperty);
282
283                 HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false,
284                     propertyChanged: SetInternalHeightForWidthProperty, defaultValueCreator: GetInternalHeightForWidthProperty);
285
286                 PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null,
287                     propertyChanged: SetInternalPaddingProperty, defaultValueCreator: GetInternalPaddingProperty);
288
289                 SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null,
290                     propertyChanged: SetInternalSizeProperty, defaultValueCreator: GetInternalSizeProperty);
291
292                 MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null,
293                     propertyChanged: SetInternalMinimumSizeProperty, defaultValueCreator: GetInternalMinimumSizeProperty);
294
295                 MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null,
296                     propertyChanged: SetInternalMaximumSizeProperty, defaultValueCreator: GetInternalMaximumSizeProperty);
297
298                 InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false,
299                     propertyChanged: SetInternalInheritPositionProperty, defaultValueCreator: GetInternalInheritPositionProperty);
300
301                 ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled,
302                     propertyChanged: SetInternalClippingModeProperty, defaultValueCreator: GetInternalClippingModeProperty);
303
304                 InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false,
305                     propertyChanged: SetInternalInheritLayoutDirectionProperty, defaultValueCreator: GetInternalInheritLayoutDirectionProperty);
306
307                 LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR,
308                     propertyChanged: SetInternalLayoutDirectionProperty, defaultValueCreator: GetInternalLayoutDirectionProperty);
309
310                 MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null,
311                     propertyChanged: SetInternalMarginProperty, defaultValueCreator: GetInternalMarginProperty);
312
313                 UpdateAreaHintProperty = BindableProperty.Create(nameof(UpdateAreaHint), typeof(Vector4), typeof(View), null,
314                     propertyChanged: SetInternalUpdateAreaHintProperty, defaultValueCreator: GetInternalUpdateAreaHintProperty);
315
316                 ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null,
317                     propertyChanged: SetInternalImageShadowProperty, defaultValueCreator: GetInternalImageShadowProperty);
318
319                 BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null,
320                     propertyChanged: SetInternalBoxShadowProperty, defaultValueCreator: GetInternalBoxShadowProperty);
321
322                 CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null,
323                     propertyChanged: SetInternalCornerRadiusProperty, defaultValueCreator: GetInternalCornerRadiusProperty);
324
325                 CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute,
326                     propertyChanged: SetInternalCornerRadiusPolicyProperty, defaultValueCreator: GetInternalCornerRadiusPolicyProperty);
327
328                 BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float),
329                     propertyChanged: SetInternalBorderlineWidthProperty, defaultValueCreator: GetInternalBorderlineWidthProperty);
330
331                 BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null,
332                     propertyChanged: SetInternalBorderlineColorProperty, defaultValueCreator: GetInternalBorderlineColorProperty);
333
334                 BorderlineColorSelectorProperty = BindableProperty.Create(nameof(BorderlineColorSelector), typeof(Selector<Color>), typeof(View), null,
335                     propertyChanged: SetInternalBorderlineColorSelectorProperty, defaultValueCreator: GetInternalBorderlineColorSelectorProperty);
336
337                 BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float),
338                     propertyChanged: SetInternalBorderlineOffsetProperty, defaultValueCreator: GetInternalBorderlineOffsetProperty);
339
340                 EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false,
341                     propertyChanged: SetInternalEnableControlStateProperty, defaultValueCreator: GetInternalEnableControlStateProperty);
342
343                 ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false,
344                     propertyChanged: SetInternalThemeChangeSensitiveProperty, defaultValueCreator: GetInternalThemeChangeSensitiveProperty);
345
346                 AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty,
347                     propertyChanged: SetInternalAccessibilityNameProperty, defaultValueCreator: GetInternalAccessibilityNameProperty);
348
349                 AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty,
350                     propertyChanged: SetInternalAccessibilityDescriptionProperty, defaultValueCreator: GetInternalAccessibilityDescriptionProperty);
351
352                 AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty,
353                     propertyChanged: SetInternalAccessibilityTranslationDomainProperty, defaultValueCreator: GetInternalAccessibilityTranslationDomainProperty);
354
355                 AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(Role),
356                     propertyChanged: SetInternalAccessibilityRoleProperty, defaultValueCreator: GetInternalAccessibilityRoleProperty);
357
358                 AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false,
359                     propertyChanged: SetInternalAccessibilityHighlightableProperty, defaultValueCreator: GetInternalAccessibilityHighlightableProperty);
360
361                 AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false,
362                     propertyChanged: SetInternalAccessibilityHiddenProperty, defaultValueCreator: GetInternalAccessibilityHiddenProperty);
363
364                 ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(View), false,
365                     propertyChanged: SetInternalExcludeLayoutingProperty, defaultValueCreator: GetInternalExcludeLayoutingProperty);
366
367                 TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(View), string.Empty,
368                     propertyChanged: SetInternalTooltipTextProperty, defaultValueCreator: GetInternalTooltipTextProperty);
369
370                 PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(View), false,
371                     propertyChanged: SetInternalPositionUsesAnchorPointProperty, defaultValueCreator: GetInternalPositionUsesAnchorPointProperty);
372
373                 AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(View), null,
374                     propertyChanged: SetInternalAnchorPointProperty, defaultValueCreator: GetInternalAnchorPointProperty);
375
376                 WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(View), 0,
377                     propertyChanged: SetInternalWidthSpecificationProperty, defaultValueCreator: GetInternalWidthSpecificationProperty);
378
379                 HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(View), 0,
380                     propertyChanged: SetInternalHeightSpecificationProperty, defaultValueCreator: GetInternalHeightSpecificationProperty);
381
382                 LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(View), null,
383                     propertyChanged: SetInternalLayoutTransitionProperty, defaultValueCreator: GetInternalLayoutTransitionProperty);
384
385                 PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(View), null,
386                     propertyChanged: SetInternalPaddingEXProperty, defaultValueCreator: GetInternalPaddingEXProperty);
387
388                 LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(View), null,
389                     propertyChanged: SetInternalLayoutProperty, defaultValueCreator: GetInternalLayoutProperty);
390
391                 BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(View), false,
392                     propertyChanged: SetInternalBackgroundImageSynchronosLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronosLoadingProperty);
393
394                 BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(View), false,
395                     propertyChanged: SetInternalBackgroundImageSynchronousLoadingProperty, defaultValueCreator: GetInternalBackgroundImageSynchronousLoadingProperty);
396
397                 EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(View), false,
398                     propertyChanged: SetInternalEnableControlStatePropagationProperty, defaultValueCreator: GetInternalEnableControlStatePropagationProperty);
399
400                 PropagatableControlStatesProperty = BindableProperty.Create(nameof(PropagatableControlStates), typeof(ControlState), typeof(View), ControlState.All,
401                     propertyChanged: SetInternalPropagatableControlStatesProperty, defaultValueCreator: GetInternalPropagatableControlStatesProperty);
402
403                 GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(View), false,
404                     propertyChanged: SetInternalGrabTouchAfterLeaveProperty, defaultValueCreator: GetInternalGrabTouchAfterLeaveProperty);
405
406                 AllowOnlyOwnTouchProperty = BindableProperty.Create(nameof(AllowOnlyOwnTouch), typeof(bool), typeof(View), false,
407                     propertyChanged: SetInternalAllowOnlyOwnTouchProperty, defaultValueCreator: GetInternalAllowOnlyOwnTouchProperty);
408
409                 BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(BlendEquationType), typeof(View), default(BlendEquationType),
410                     propertyChanged: SetInternalBlendEquationProperty, defaultValueCreator: GetInternalBlendEquationProperty);
411
412                 TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(TransitionOptions), typeof(View), default(TransitionOptions),
413                     propertyChanged: SetInternalTransitionOptionsProperty, defaultValueCreator: GetInternalTransitionOptionsProperty);
414
415                 AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(View), string.Empty,
416                     propertyChanged: SetInternalAutomationIdProperty, defaultValueCreator: GetInternalAutomationIdProperty);
417
418                 TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Offset), typeof(View), default(Offset),
419                     propertyChanged: SetInternalTouchAreaOffsetProperty, defaultValueCreator: GetInternalTouchAreaOffsetProperty);
420
421                 DispatchTouchMotionProperty = BindableProperty.Create(nameof(DispatchTouchMotion), typeof(bool), typeof(View), false,
422                     propertyChanged: SetInternalDispatchTouchMotionProperty, defaultValueCreator: GetInternalDispatchTouchMotionProperty);
423
424                 DispatchHoverMotionProperty = BindableProperty.Create(nameof(DispatchHoverMotion), typeof(bool), typeof(View), false,
425                     propertyChanged: SetInternalDispatchHoverMotionProperty, defaultValueCreator: GetInternalDispatchHoverMotionProperty);
426
427                 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
428                 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
429                 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
430                 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
431
432                 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
433                 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
434                 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
435                 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
436
437                 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
438                 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
439                 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
440                 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
441             }
442 #endif
443         }
444
445         static internal new void Preload()
446         {
447             Container.Preload();
448
449             // not needed, at preload, APP can not set the "IsUsingXaml" flag, it have the default value at preload
450             // if (NUIApplication.IsUsingXaml)
451             // {
452             //     // Do nothing. Just call for load static values.
453             //     var temporalPositionPropertyGroup = positionPropertyGroup;
454             //     var temporalSizePropertyGroup = sizePropertyGroup;
455             //     var temporalScalePropertyGroup = scalePropertyGroup;
456             // }
457         }
458
459         /// <summary>
460         /// Accessibility mode for controlling View's Accessible implementation.
461         /// It is only relevant when deriving custom controls from View directly,
462         /// as classes derived from CustomView (or any of its subclasses) get the
463         /// Custom mode by default.
464         /// </summary>
465         [EditorBrowsable(EditorBrowsableState.Never)]
466         public enum ViewAccessibilityMode
467         {
468             /// <summary>
469             /// Default accessibility implementation. Overriding View.Accessibility...()
470             /// virtual methods will have no effect.
471             /// </summary>
472             [EditorBrowsable(EditorBrowsableState.Never)]
473             Default,
474             /// <summary>
475             /// Custom accessibility implementation. Overriding View.Accessibility...()
476             /// will be necessary to provide accessibility support for the View.
477             /// </summary>
478             [EditorBrowsable(EditorBrowsableState.Never)]
479             Custom,
480         }
481
482         private static IntPtr NewWithAccessibilityMode(ViewAccessibilityMode accessibilityMode)
483         {
484             switch (accessibilityMode)
485             {
486                 case ViewAccessibilityMode.Custom:
487                     {
488                         return Interop.View.NewCustom();
489                     }
490                 case ViewAccessibilityMode.Default:
491                 default:
492                     {
493                         return Interop.View.New();
494                     }
495             }
496         }
497
498         /// <summary>
499         /// Creates a new instance of a view.
500         /// </summary>
501         /// <since_tizen> 3 </since_tizen>
502         public View() : this(ViewAccessibilityMode.Default)
503         {
504         }
505
506         [EditorBrowsable(EditorBrowsableState.Never)]
507         public View(ViewAccessibilityMode accessibilityMode) : this(NewWithAccessibilityMode(accessibilityMode), true)
508         {
509             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
510         }
511
512         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
513         [EditorBrowsable(EditorBrowsableState.Never)]
514         public View(ViewStyle viewStyle) : this(Interop.View.New(), true, viewStyle)
515         {
516         }
517
518         /// <summary>
519         /// Create a new instance of a View with setting the status of shown or hidden.
520         /// </summary>
521         /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
522         /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
523         [EditorBrowsable(EditorBrowsableState.Never)]
524         public View(bool shown) : this(Interop.View.New(), true)
525         {
526             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
527             SetVisible(shown);
528         }
529
530         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
531         {
532             InitializeStyle(viewStyle);
533         }
534
535         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : this(cPtr, cMemoryOwn, shown, cMemoryOwn)
536         {
537         }
538
539         internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
540         {
541             if (HasBody())
542             {
543                 PositionUsesPivotPoint = false;
544                 GrabTouchAfterLeave = defaultGrabTouchAfterLeave;
545                 AllowOnlyOwnTouch = defaultAllowOnlyOwnTouch;
546             }
547
548             if (!shown)
549             {
550                 SetVisible(false);
551             }
552
553             aliveCount++;
554         }
555
556         internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
557         {
558             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
559
560             if (!shown)
561             {
562                 SetVisible(false);
563             }
564         }
565
566         /// <summary>
567         /// The event that is triggered when the View's ControlState is changed.
568         /// </summary>
569         [EditorBrowsable(EditorBrowsableState.Never)]
570         public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
571
572         internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
573
574
575         /// <summary>
576         /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
577         /// </summary>
578         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
579         [EditorBrowsable(EditorBrowsableState.Never)]
580         public bool LayoutSet
581         {
582             get
583             {
584                 return layoutSet;
585             }
586         }
587
588         /// <summary>
589         /// Flag to allow Layouting to be disabled for Views.
590         /// Once a View has a Layout set then any children added to Views from then on will receive
591         /// automatic Layouts.
592         /// </summary>
593         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
594         [EditorBrowsable(EditorBrowsableState.Never)]
595         public static bool LayoutingDisabled { get; set; } = true;
596
597         /// <summary>
598         /// If set to true, the <see cref="GrabTouchAfterLeave"/> property value is set to true when all Views are created.
599         /// </summary>
600         /// <param name="enable">Sets value of GrabTouchAfterLeave property</param>
601         [EditorBrowsable(EditorBrowsableState.Never)]
602         public static void SetDefaultGrabTouchAfterLeave(bool enable)
603         {
604             defaultGrabTouchAfterLeave = enable;
605         }
606
607         /// <summary>
608         /// If set to true, the <see cref="AllowOnlyOwnTouch"/> property value is set to true when all Views are created.
609         /// </summary>
610         /// <param name="enable">Sets value of AllowOnlyOwnTouch property</param>
611         [EditorBrowsable(EditorBrowsableState.Never)]
612         public static void SetDefaultAllowOnlyOwnTouch(bool enable)
613         {
614             defaultAllowOnlyOwnTouch = enable;
615         }
616
617         /// <summary>
618         /// Deprecate. Do not use this.
619         /// The style instance applied to this view.
620         /// Note that do not modify the ViewStyle.
621         /// Modifying ViewStyle will affect other views with same ViewStyle.
622         /// </summary>
623         [EditorBrowsable(EditorBrowsableState.Never)]
624         protected ViewStyle ViewStyle
625         {
626             get
627             {
628                 if (themeData == null) themeData = new ThemeData();
629
630                 if (themeData.viewStyle == null)
631                 {
632                     ApplyStyle(CreateViewStyle());
633                 }
634                 return themeData.viewStyle;
635             }
636         }
637
638         /// <summary>
639         /// Get/Set the control state.
640         /// Note that the ControlState only available for the classes derived from Control.
641         /// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
642         /// please set <see cref="EnableControlState"/> to true.
643         /// </summary>
644         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
645         [EditorBrowsable(EditorBrowsableState.Never)]
646         public ControlState ControlState
647         {
648             get
649             {
650                 return themeData == null ? ControlState.Normal : themeData.controlStates;
651             }
652             protected set
653             {
654                 if (ControlState == value)
655                 {
656                     return;
657                 }
658
659                 var prevState = ControlState;
660
661                 if (themeData == null) themeData = new ThemeData();
662                 themeData.controlStates = value;
663
664                 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
665
666                 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
667
668                 if (themeData.ControlStatePropagation)
669                 {
670                     foreach (View child in Children)
671                     {
672                         ControlState allowed = child.PropagatableControlStates;
673                         if (allowed.Contains(ControlState.All))
674                         {
675                             child.ControlState = value;
676                         }
677                         else
678                         {
679                             ControlState newControlState = child.ControlState;
680
681                             if (allowed.Contains(ControlState.Normal))
682                             {
683                                 if (value.Contains(ControlState.Normal))
684                                 {
685                                     newControlState += ControlState.Normal;
686                                 }
687                                 else
688                                 {
689                                     newControlState -= ControlState.Normal;
690                                 }
691                             }
692
693                             if (allowed.Contains(ControlState.Disabled))
694                             {
695                                 if (value.Contains(ControlState.Disabled))
696                                 {
697                                     newControlState += ControlState.Disabled;
698                                 }
699                                 else
700                                 {
701                                     newControlState -= ControlState.Disabled;
702                                 }
703                             }
704
705                             if (allowed.Contains(ControlState.Selected))
706                             {
707                                 if (value.Contains(ControlState.Selected))
708                                 {
709                                     newControlState += ControlState.Selected;
710                                 }
711                                 else
712                                 {
713                                     newControlState -= ControlState.Selected;
714                                 }
715                             }
716
717                             if (allowed.Contains(ControlState.Pressed))
718                             {
719                                 if (value.Contains(ControlState.Pressed))
720                                 {
721                                     newControlState += ControlState.Pressed;
722                                 }
723                                 else
724                                 {
725                                     newControlState -= ControlState.Pressed;
726                                 }
727                             }
728
729                             if (allowed.Contains(ControlState.Focused))
730                             {
731                                 if (value.Contains(ControlState.Focused))
732                                 {
733                                     newControlState += ControlState.Focused;
734                                 }
735                                 else
736                                 {
737                                     newControlState -= ControlState.Focused;
738                                 }
739                             }
740
741                             if (allowed.Contains(ControlState.Other))
742                             {
743                                 if (value.Contains(ControlState.Other))
744                                 {
745                                     newControlState += ControlState.Other;
746                                 }
747                                 else
748                                 {
749                                     newControlState -= ControlState.Other;
750                                 }
751                             }
752
753                             if (child.ControlState != newControlState)
754                                 child.ControlState = newControlState;
755                         }
756                     }
757                 }
758
759                 OnControlStateChanged(changeInfo);
760
761                 ControlStateChangedEvent?.Invoke(this, changeInfo);
762             }
763         }
764
765         /// <summary>
766         /// Gets / Sets the status of whether the view is excluded from its parent's layouting or not.
767         /// </summary>
768         /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
769         [EditorBrowsable(EditorBrowsableState.Never)]
770         public bool ExcludeLayouting
771         {
772             get
773             {
774                 if (NUIApplication.IsUsingXaml)
775                 {
776                     return (bool)GetValue(ExcludeLayoutingProperty);
777                 }
778                 else
779                 {
780                     return (bool)GetInternalExcludeLayoutingProperty(this);
781                 }
782             }
783             set
784             {
785                 if (NUIApplication.IsUsingXaml)
786                 {
787                     SetValue(ExcludeLayoutingProperty, value);
788                 }
789                 else
790                 {
791                     SetInternalExcludeLayoutingProperty(this, null, value);
792                 }
793                 NotifyPropertyChanged();
794             }
795         }
796
797         private bool InternalExcludeLayouting
798         {
799             get
800             {
801                 return excludeLayouting;
802             }
803             set
804             {
805                 excludeLayouting = value;
806                 if (Layout != null && Layout.SetPositionByLayout == value)
807                 {
808                     Layout.SetPositionByLayout = !value;
809                     Layout.RequestLayout();
810                 }
811             }
812         }
813
814         /// <summary>
815         /// The StyleName, type string.
816         /// The value indicates DALi style name defined in json theme file.
817         /// </summary>
818         /// <since_tizen> 3 </since_tizen>
819         public string StyleName
820         {
821             get
822             {
823                 if (NUIApplication.IsUsingXaml)
824                 {
825                     return (string)GetValue(StyleNameProperty);
826                 }
827                 else
828                 {
829                     return (string)GetInternalStyleNameProperty(this);
830                 }
831             }
832             set
833             {
834                 if (NUIApplication.IsUsingXaml)
835                 {
836                     SetValue(StyleNameProperty, value);
837                 }
838                 else
839                 {
840                     SetInternalStyleNameProperty(this, null, value);
841                 }
842                 NotifyPropertyChanged();
843             }
844         }
845
846         /// <summary>
847         /// The KeyInputFocus, type bool.
848         /// </summary>
849         [EditorBrowsable(EditorBrowsableState.Never)]
850         public bool KeyInputFocus
851         {
852             get
853             {
854                 if (NUIApplication.IsUsingXaml)
855                 {
856                     return (bool)GetValue(KeyInputFocusProperty);
857                 }
858                 else
859                 {
860                     return (bool)GetInternalKeyInputFocusProperty(this);
861                 }
862             }
863             set
864             {
865                 if (NUIApplication.IsUsingXaml)
866                 {
867                     SetValue(KeyInputFocusProperty, value);
868                 }
869                 else
870                 {
871                     SetInternalKeyInputFocusProperty(this, null, value);
872                 }
873                 NotifyPropertyChanged();
874             }
875         }
876
877         /// <summary>
878         /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
879         /// </summary>
880         /// <remarks>
881         /// <para>
882         /// The property cascade chaining set is not recommended.
883         /// </para>
884         /// <para>
885         /// Animatable - This property can be animated using <c>Animation</c> class.
886         /// <code>
887         /// animation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
888         /// </code>
889         /// </para>
890         /// </remarks>
891         /// <example>
892         /// This way is recommended for setting the property
893         /// <code>
894         /// var view = new View();
895         /// view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
896         /// </code>
897         /// This way to set the property is prohibited
898         /// <code>
899         /// view.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
900         /// </code>
901         /// </example>
902         /// <since_tizen> 3 </since_tizen>
903         public Color BackgroundColor
904         {
905             get
906             {
907                 if (NUIApplication.IsUsingXaml)
908                 {
909                     return (Color)GetValue(BackgroundColorProperty);
910                 }
911                 else
912                 {
913                     return (Color)GetInternalBackgroundColorProperty(this);
914                 }
915             }
916             set
917             {
918                 if (NUIApplication.IsUsingXaml)
919                 {
920                     SetValue(BackgroundColorProperty, value);
921                 }
922                 else
923                 {
924                     SetInternalBackgroundColorProperty(this, null, value);
925                 }
926                 NotifyPropertyChanged();
927             }
928         }
929
930         /// <summary>
931         /// The mutually exclusive with "backgroundColor" and "background" type Map.
932         /// </summary>
933         /// <since_tizen> 3 </since_tizen>
934         public string BackgroundImage
935         {
936             get
937             {
938                 if (NUIApplication.IsUsingXaml)
939                 {
940                     return (string)GetValue(BackgroundImageProperty);
941                 }
942                 else
943                 {
944                     return (string)GetInternalBackgroundImageProperty(this);
945                 }
946             }
947             set
948             {
949                 if (NUIApplication.IsUsingXaml)
950                 {
951                     SetValue(BackgroundImageProperty, value);
952                 }
953                 else
954                 {
955                     SetInternalBackgroundImageProperty(this, null, value);
956                 }
957                 NotifyPropertyChanged();
958             }
959         }
960
961         /// <summary>
962         /// Get or set the border of background image.
963         /// </summary>
964         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
965         [EditorBrowsable(EditorBrowsableState.Never)]
966         public Rectangle BackgroundImageBorder
967         {
968             get
969             {
970                 if (NUIApplication.IsUsingXaml)
971                 {
972                     return (Rectangle)GetValue(BackgroundImageBorderProperty);
973                 }
974                 else
975                 {
976                     return (Rectangle)GetInternalBackgroundImageBorderProperty(this);
977                 }
978             }
979             set
980             {
981                 if (NUIApplication.IsUsingXaml)
982                 {
983                     SetValue(BackgroundImageBorderProperty, value);
984                 }
985                 else
986                 {
987                     SetInternalBackgroundImageBorderProperty(this, null, value);
988                 }
989                 NotifyPropertyChanged();
990             }
991         }
992
993         /// <summary>
994         /// The background of view.
995         /// </summary>
996         /// <since_tizen> 3 </since_tizen>
997         public Tizen.NUI.PropertyMap Background
998         {
999             get
1000             {
1001                 if (NUIApplication.IsUsingXaml)
1002                 {
1003                     return (PropertyMap)GetValue(BackgroundProperty);
1004                 }
1005                 else
1006                 {
1007                     return (PropertyMap)GetInternalBackgroundProperty(this);
1008                 }
1009             }
1010             set
1011             {
1012                 if (NUIApplication.IsUsingXaml)
1013                 {
1014                     SetValue(BackgroundProperty, value);
1015                 }
1016                 else
1017                 {
1018                     SetInternalBackgroundProperty(this, null, value);
1019                 }
1020                 NotifyPropertyChanged();
1021             }
1022         }
1023
1024         /// <summary>
1025         /// Describes a shadow as an image for a View.
1026         /// It is null by default.
1027         /// </summary>
1028         /// <remarks>
1029         /// Getter returns copied instance of current shadow.
1030         /// </remarks>
1031         /// <remarks>
1032         /// The mutually exclusive with "BoxShadow".
1033         /// </remarks>
1034         /// <remarks>
1035         /// <para>
1036         /// Animatable - This property can be animated using <c>Animation</c> class.
1037         /// To animate this property, specify a sub-property with separator ".", for example, "ImageShadow.Offset".
1038         /// <code>
1039         /// animation.AnimateTo(view, "ImageShadow.Offset", new Vector2(10, 10));
1040         /// </code>
1041         /// Animatable sub-property : Offset.
1042         /// </para>
1043         /// </remarks>
1044         [EditorBrowsable(EditorBrowsableState.Never)]
1045         public ImageShadow ImageShadow
1046         {
1047             get
1048             {
1049                 if (NUIApplication.IsUsingXaml)
1050                 {
1051                     return (ImageShadow)GetValue(ImageShadowProperty);
1052                 }
1053                 else
1054                 {
1055                     return (ImageShadow)GetInternalImageShadowProperty(this);
1056                 }
1057             }
1058             set
1059             {
1060                 if (NUIApplication.IsUsingXaml)
1061                 {
1062                     SetValue(ImageShadowProperty, value);
1063                 }
1064                 else
1065                 {
1066                     SetInternalImageShadowProperty(this, null, value);
1067                 }
1068                 NotifyPropertyChanged();
1069             }
1070         }
1071
1072         /// <summary>
1073         /// Describes a box shaped shadow drawing for a View.
1074         /// It is null by default.
1075         /// </summary>
1076         /// <remarks>
1077         /// The mutually exclusive with "ImageShadow".
1078         /// </remarks>
1079         /// <remarks>
1080         /// <para>
1081         /// Animatable - This property can be animated using <c>Animation</c> class.
1082         /// To animate this property, specify a sub-property with separator ".", for example, "BoxShadow.BlurRadius".
1083         /// <code>
1084         /// animation.AnimateTo(view, "BoxShadow.BlurRadius", 10.0f);
1085         /// </code>
1086         /// Animatable sub-property : Offset, Color, BlurRadius.
1087         /// </para>
1088         /// </remarks>
1089         /// <since_tizen> 9 </since_tizen>
1090         public Shadow BoxShadow
1091         {
1092             get
1093             {
1094                 if (NUIApplication.IsUsingXaml)
1095                 {
1096                     return (Shadow)GetValue(BoxShadowProperty);
1097                 }
1098                 else
1099                 {
1100                     return (Shadow)GetInternalBoxShadowProperty(this);
1101                 }
1102             }
1103             set
1104             {
1105                 if (NUIApplication.IsUsingXaml)
1106                 {
1107                     SetValue(BoxShadowProperty, value);
1108                 }
1109                 else
1110                 {
1111                     SetInternalBoxShadowProperty(this, null, value);
1112                 }
1113                 NotifyPropertyChanged();
1114             }
1115         }
1116
1117         /// <summary>
1118         /// The radius for the rounded corners of the View.
1119         /// This will rounds background and shadow edges.
1120         /// The values in Vector4 are used in clockwise order from top-left to bottom-left : Vector4(top-left-corner, top-right-corner, bottom-right-corner, bottom-left-corner).
1121         /// Each radius will clamp internally to the half of smaller of the view's width or height.
1122         /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
1123         /// </summary>
1124         /// <remarks>
1125         /// <para>
1126         /// Animatable - This property can be animated using <c>Animation</c> class.
1127         /// <code>
1128         /// animation.AnimateTo(view, "CornerRadius", new Vector4(10, 10, 10, 10));
1129         /// </code>
1130         /// </para>
1131         /// </remarks>
1132         /// <since_tizen> 9 </since_tizen>
1133         public Vector4 CornerRadius
1134         {
1135             get
1136             {
1137                 if (NUIApplication.IsUsingXaml)
1138                 {
1139                     return (Vector4)GetValue(CornerRadiusProperty);
1140                 }
1141                 else
1142                 {
1143                     return (Vector4)GetInternalCornerRadiusProperty(this);
1144                 }
1145             }
1146             set
1147             {
1148                 if (NUIApplication.IsUsingXaml)
1149                 {
1150                     SetValue(CornerRadiusProperty, value);
1151                 }
1152                 else
1153                 {
1154                     SetInternalCornerRadiusProperty(this, null, value);
1155                 }
1156                 NotifyPropertyChanged();
1157             }
1158         }
1159
1160         /// <summary>
1161         /// Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units).
1162         /// It is absolute by default.
1163         /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
1164         /// </summary>
1165         /// <since_tizen> 9 </since_tizen>
1166         public VisualTransformPolicyType CornerRadiusPolicy
1167         {
1168             get
1169             {
1170
1171                 if (NUIApplication.IsUsingXaml)
1172                 {
1173                     return (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
1174                 }
1175                 else
1176                 {
1177                     return (VisualTransformPolicyType)GetInternalCornerRadiusPolicyProperty(this);
1178                 }
1179             }
1180             set
1181             {
1182                 if (NUIApplication.IsUsingXaml)
1183                 {
1184                     SetValue(CornerRadiusPolicyProperty, value);
1185                 }
1186                 else
1187                 {
1188                     SetInternalCornerRadiusPolicyProperty(this, null, value);
1189                 }
1190             }
1191         }
1192
1193         /// <summary>
1194         /// The width for the borderline of the View.
1195         /// </summary>
1196         /// <remarks>
1197         /// <para>
1198         /// Animatable - This property can be animated using <c>Animation</c> class.
1199         /// <code>
1200         /// animation.AnimateTo(view, "BorderlineWidth", 100.0f);
1201         /// </code>
1202         /// </para>
1203         /// Note that, an image background may not have borderline if it uses the Border property.
1204         /// </remarks>
1205         /// <since_tizen> 9 </since_tizen>
1206         public float BorderlineWidth
1207         {
1208             get
1209             {
1210                 if (NUIApplication.IsUsingXaml)
1211                 {
1212                     return (float)GetValue(BorderlineWidthProperty);
1213                 }
1214                 else
1215                 {
1216                     return (float)GetInternalBorderlineWidthProperty(this);
1217                 }
1218             }
1219             set
1220             {
1221                 if (NUIApplication.IsUsingXaml)
1222                 {
1223                     SetValue(BorderlineWidthProperty, value);
1224                 }
1225                 else
1226                 {
1227                     SetInternalBorderlineWidthProperty(this, null, value);
1228                 }
1229                 NotifyPropertyChanged();
1230             }
1231         }
1232
1233         /// <summary>
1234         /// The color for the borderline of the View.
1235         /// It is Color.Black by default.
1236         /// </summary>
1237         /// <remarks>
1238         /// <para>
1239         /// Animatable - This property can be animated using <c>Animation</c> class.
1240         /// <code>
1241         /// animation.AnimateTo(view, "BorderlineColor", new Color(r, g, b, a));
1242         /// </code>
1243         /// </para>
1244         /// </remarks>
1245         /// <since_tizen> 9 </since_tizen>
1246         public Color BorderlineColor
1247         {
1248             get
1249             {
1250                 if (NUIApplication.IsUsingXaml)
1251                 {
1252                     return (Color)GetValue(BorderlineColorProperty);
1253                 }
1254                 else
1255                 {
1256                     return (Color)GetInternalBorderlineColorProperty(this);
1257                 }
1258             }
1259             set
1260             {
1261                 if (NUIApplication.IsUsingXaml)
1262                 {
1263                     SetValue(BorderlineColorProperty, value);
1264                 }
1265                 else
1266                 {
1267                     SetInternalBorderlineColorProperty(this, null, value);
1268                 }
1269                 NotifyPropertyChanged();
1270             }
1271         }
1272
1273         /// <summary>
1274         /// The color selector for the borderline of the View.
1275         /// Like BackgroundColor, color selector typed BorderlineColor should be used in ViewStyle only.
1276         /// So this API is internally used only.
1277         /// </summary>
1278         internal Selector<Color> BorderlineColorSelector
1279         {
1280             get
1281             {
1282                 if (NUIApplication.IsUsingXaml)
1283                 {
1284                     return (Selector<Color>)GetValue(BorderlineColorSelectorProperty);
1285                 }
1286                 else
1287                 {
1288                     return (Selector<Color>)GetInternalBorderlineColorSelectorProperty(this);
1289                 }
1290             }
1291             set
1292             {
1293                 if (NUIApplication.IsUsingXaml)
1294                 {
1295                     SetValue(BorderlineColorSelectorProperty, value);
1296                 }
1297                 else
1298                 {
1299                     SetInternalBorderlineColorSelectorProperty(this, null, value);
1300                 }
1301                 NotifyPropertyChanged();
1302             }
1303         }
1304
1305         /// <summary>
1306         /// The Relative offset for the borderline of the View.
1307         /// Recommended range : [-1.0f to 1.0f].
1308         /// If -1.0f, draw borderline inside of the View.
1309         /// If 1.0f, draw borderline outside of the View.
1310         /// If 0.0f, draw borderline half inside and half outside.
1311         /// It is 0.0f by default.
1312         /// </summary>
1313         /// <remarks>
1314         /// <para>
1315         /// Animatable - This property can be animated using <c>Animation</c> class.
1316         /// <code>
1317         /// animation.AnimateTo(view, "BorderlineOffset", -1.0f);
1318         /// </code>
1319         /// </para>
1320         /// </remarks>
1321         /// <since_tizen> 9 </since_tizen>
1322         public float BorderlineOffset
1323         {
1324             get
1325             {
1326                 if (NUIApplication.IsUsingXaml)
1327                 {
1328                     return (float)GetValue(BorderlineOffsetProperty);
1329                 }
1330                 else
1331                 {
1332                     return (float)GetInternalBorderlineOffsetProperty(this);
1333                 }
1334             }
1335             set
1336             {
1337                 if (NUIApplication.IsUsingXaml)
1338                 {
1339                     SetValue(BorderlineOffsetProperty, value);
1340                 }
1341                 else
1342                 {
1343                     SetInternalBorderlineOffsetProperty(this, null, value);
1344                 }
1345                 NotifyPropertyChanged();
1346             }
1347         }
1348
1349         /// <summary>
1350         /// The current state of the view.
1351         /// </summary>
1352         /// <since_tizen> 3 </since_tizen>
1353         public States State
1354         {
1355             get
1356             {
1357                 if (NUIApplication.IsUsingXaml)
1358                 {
1359                     return (States)GetValue(StateProperty);
1360                 }
1361                 else
1362                 {
1363                     return (States)GetInternalStateProperty(this);
1364                 }
1365             }
1366             set
1367             {
1368                 if (NUIApplication.IsUsingXaml)
1369                 {
1370                     SetValue(StateProperty, value);
1371                 }
1372                 else
1373                 {
1374                     SetInternalStateProperty(this, null, value);
1375                 }
1376                 NotifyPropertyChanged();
1377             }
1378         }
1379
1380         /// <summary>
1381         /// The current sub state of the view.
1382         /// </summary>
1383         /// <since_tizen> 3 </since_tizen>
1384         public States SubState
1385         {
1386             get
1387             {
1388                 if (NUIApplication.IsUsingXaml)
1389                 {
1390                     return (States)GetValue(SubStateProperty);
1391                 }
1392                 else
1393                 {
1394                     return (States)GetInternalSubStateProperty(this);
1395                 }
1396             }
1397             set
1398             {
1399                 if (NUIApplication.IsUsingXaml)
1400                 {
1401                     SetValue(SubStateProperty, value);
1402                 }
1403                 else
1404                 {
1405                     SetInternalSubStateProperty(this, null, value);
1406                 }
1407                 NotifyPropertyChanged();
1408             }
1409         }
1410
1411         /// <summary>
1412         /// Displays a tooltip
1413         /// </summary>
1414         /// <since_tizen> 3 </since_tizen>
1415         public Tizen.NUI.PropertyMap Tooltip
1416         {
1417             get
1418             {
1419                 if (NUIApplication.IsUsingXaml)
1420                 {
1421                     return (PropertyMap)GetValue(TooltipProperty);
1422                 }
1423                 else
1424                 {
1425                     return (PropertyMap)GetInternalTooltipProperty(this);
1426                 }
1427             }
1428             set
1429             {
1430                 if (NUIApplication.IsUsingXaml)
1431                 {
1432                     SetValue(TooltipProperty, value);
1433                 }
1434                 else
1435                 {
1436                     SetInternalTooltipProperty(this, null, value);
1437                 }
1438                 NotifyPropertyChanged();
1439             }
1440         }
1441
1442         /// <summary>
1443         /// Displays a tooltip as a text.
1444         /// </summary>
1445         /// <since_tizen> 3 </since_tizen>
1446         public string TooltipText
1447         {
1448             get
1449             {
1450                 if (NUIApplication.IsUsingXaml)
1451                 {
1452                     return GetValue(TooltipTextProperty) as string;
1453                 }
1454                 else
1455                 {
1456                     return GetInternalTooltipTextProperty(this) as string;
1457                 }
1458             }
1459             set
1460             {
1461                 if (NUIApplication.IsUsingXaml)
1462                 {
1463                     SetValue(TooltipTextProperty, value);
1464                 }
1465                 else
1466                 {
1467                     SetInternalTooltipTextProperty(this, null, value);
1468                 }
1469             }
1470         }
1471
1472         private string InternalTooltipText
1473         {
1474             get
1475             {
1476                 using (var propertyValue = GetProperty(Property.TOOLTIP))
1477                 {
1478                     using var propertyMap = new PropertyMap();
1479                     if (propertyValue != null && propertyValue.Get(propertyMap))
1480                     {
1481                         using var retrivedContentValue = propertyMap?.Find(NDalic.TooltipContent);
1482                         if (retrivedContentValue != null)
1483                         {
1484                             using var contextPropertyMap = new PropertyMap();
1485                             if (retrivedContentValue.Get(contextPropertyMap))
1486                             {
1487                                 using var retrivedTextValue = contextPropertyMap?.Find(NDalic.TextVisualText);
1488                                 if (retrivedTextValue != null && retrivedTextValue.Get(out string retrivedValue))
1489                                 {
1490                                     return retrivedValue;
1491                                 }
1492                             }
1493                         }
1494                     }
1495                     return "";
1496                 }
1497             }
1498             set
1499             {
1500                 var temp = new Tizen.NUI.PropertyValue(value);
1501                 SetProperty(View.Property.TOOLTIP, temp);
1502                 temp.Dispose();
1503                 NotifyPropertyChanged();
1504             }
1505         }
1506
1507         /// <summary>
1508         /// The Child property of FlexContainer.<br />
1509         /// The proportion of the free space in the container, the flex item will receive.<br />
1510         /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
1511         /// </summary>
1512         /// <since_tizen> 3 </since_tizen>
1513         [Obsolete("Deprecated in API8, will be removed in API10.")]
1514         public float Flex
1515         {
1516             get
1517             {
1518                 if (NUIApplication.IsUsingXaml)
1519                 {
1520                     return (float)GetValue(FlexProperty);
1521                 }
1522                 else
1523                 {
1524                     return (float)GetInternalFlexProperty(this);
1525                 }
1526             }
1527             set
1528             {
1529                 if (NUIApplication.IsUsingXaml)
1530                 {
1531                     SetValue(FlexProperty, value);
1532                 }
1533                 else
1534                 {
1535                     SetInternalFlexProperty(this, null, value);
1536                 }
1537                 NotifyPropertyChanged();
1538             }
1539         }
1540
1541         /// <summary>
1542         /// The Child property of FlexContainer.<br />
1543         /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
1544         /// </summary>
1545         /// <since_tizen> 3 </since_tizen>
1546         [Obsolete("Deprecated in API8, will be removed in API10.")]
1547         public int AlignSelf
1548         {
1549             get
1550             {
1551                 if (NUIApplication.IsUsingXaml)
1552                 {
1553                     return (int)GetValue(AlignSelfProperty);
1554                 }
1555                 else
1556                 {
1557                     return (int)GetInternalAlignSelfProperty(this);
1558                 }
1559             }
1560             set
1561             {
1562                 if (NUIApplication.IsUsingXaml)
1563                 {
1564                     SetValue(AlignSelfProperty, value);
1565                 }
1566                 else
1567                 {
1568                     SetInternalAlignSelfProperty(this, null, value);
1569                 }
1570                 NotifyPropertyChanged();
1571             }
1572         }
1573
1574         /// <summary>
1575         /// The Child property of FlexContainer.<br />
1576         /// The space around the flex item.<br />
1577         /// </summary>
1578         /// <remarks>
1579         /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
1580         /// </remarks>
1581         /// <since_tizen> 3 </since_tizen>
1582         [Obsolete("Deprecated in API8, will be removed in API10.")]
1583         public Vector4 FlexMargin
1584         {
1585             get
1586             {
1587                 if (NUIApplication.IsUsingXaml)
1588                 {
1589                     Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
1590                     return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
1591                 }
1592                 else
1593                 {
1594                     Vector4 temp = (Vector4)GetInternalFlexMarginProperty(this);
1595                     return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
1596                 }
1597             }
1598             set
1599             {
1600                 if (NUIApplication.IsUsingXaml)
1601                 {
1602                     SetValue(FlexMarginProperty, value);
1603                 }
1604                 else
1605                 {
1606                     SetInternalFlexMarginProperty(this, null, value);
1607                 }
1608                 NotifyPropertyChanged();
1609             }
1610         }
1611
1612         /// <summary>
1613         /// The top-left cell this child occupies, if not set, the first available cell is used.
1614         /// </summary>
1615         /// <remarks>
1616         /// The property cascade chaining set is not recommended.
1617         /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
1618         /// </remarks>
1619         /// <example>
1620         /// This way is recommended for setting the property
1621         /// <code>
1622         /// var view = new View();
1623         /// view.CellIndex = new Vector2(1, 3);
1624         /// </code>
1625         /// This way to set the property is prohibited
1626         /// <code>
1627         /// view.CellIndex.X = 1; //This does not guarantee a proper operation
1628         /// </code>
1629         /// </example>
1630         /// <since_tizen> 3 </since_tizen>
1631         public Vector2 CellIndex
1632         {
1633             get
1634             {
1635                 if (NUIApplication.IsUsingXaml)
1636                 {
1637                     return (Vector2)GetValue(CellIndexProperty);
1638                 }
1639                 else
1640                 {
1641                     return (Vector2)GetInternalCellIndexProperty(this);
1642                 }
1643
1644
1645             }
1646             set
1647             {
1648                 if (NUIApplication.IsUsingXaml)
1649                 {
1650                     SetValue(CellIndexProperty, value);
1651                 }
1652                 else
1653                 {
1654                     SetInternalCellIndexProperty(this, null, value);
1655                 }
1656
1657
1658                 NotifyPropertyChanged();
1659             }
1660         }
1661
1662         /// <summary>
1663         /// The number of rows this child occupies, if not set, the default value is 1.
1664         /// </summary>
1665         /// <remarks>
1666         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1667         /// </remarks>
1668         /// <since_tizen> 3 </since_tizen>
1669         public float RowSpan
1670         {
1671             get
1672             {
1673                 if (NUIApplication.IsUsingXaml)
1674                 {
1675                     return (float)GetValue(RowSpanProperty);
1676                 }
1677                 else
1678                 {
1679                     return (float)GetInternalRowSpanProperty(this);
1680                 }
1681             }
1682             set
1683             {
1684                 if (NUIApplication.IsUsingXaml)
1685                 {
1686                     SetValue(RowSpanProperty, value);
1687                 }
1688                 else
1689                 {
1690                     SetInternalRowSpanProperty(this, null, value);
1691                 }
1692                 NotifyPropertyChanged();
1693             }
1694         }
1695
1696         /// <summary>
1697         /// The number of columns this child occupies, if not set, the default value is 1.
1698         /// </summary>
1699         /// <remarks>
1700         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1701         /// </remarks>
1702         /// <since_tizen> 3 </since_tizen>
1703         public float ColumnSpan
1704         {
1705             get
1706             {
1707                 if (NUIApplication.IsUsingXaml)
1708                 {
1709                     return (float)GetValue(ColumnSpanProperty);
1710                 }
1711                 else
1712                 {
1713                     return (float)GetInternalColumnSpanProperty(this);
1714                 }
1715             }
1716             set
1717             {
1718                 if (NUIApplication.IsUsingXaml)
1719                 {
1720                     SetValue(ColumnSpanProperty, value);
1721                 }
1722                 else
1723                 {
1724                     SetInternalColumnSpanProperty(this, null, value);
1725                 }
1726                 NotifyPropertyChanged();
1727             }
1728         }
1729
1730         /// <summary>
1731         /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
1732         /// </summary>
1733         /// <remarks>
1734         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1735         /// </remarks>
1736         /// <since_tizen> 3 </since_tizen>
1737         public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
1738         {
1739             get
1740             {
1741                 if (NUIApplication.IsUsingXaml)
1742                 {
1743                     return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
1744                 }
1745                 else
1746                 {
1747                     return (HorizontalAlignmentType)GetInternalCellHorizontalAlignmentProperty(this);
1748                 }
1749             }
1750             set
1751             {
1752                 if (NUIApplication.IsUsingXaml)
1753                 {
1754                     SetValue(CellHorizontalAlignmentProperty, value);
1755                 }
1756                 else
1757                 {
1758                     SetInternalCellHorizontalAlignmentProperty(this, null, value);
1759                 }
1760                 NotifyPropertyChanged();
1761             }
1762         }
1763
1764         /// <summary>
1765         /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
1766         /// </summary>
1767         /// <remarks>
1768         /// This property is for <see cref="TableView"/> class. Use the property for the child position of <see cref="TableView"/>.
1769         /// </remarks>
1770         /// <since_tizen> 3 </since_tizen>
1771         public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
1772         {
1773             get
1774             {
1775                 if (NUIApplication.IsUsingXaml)
1776                 {
1777                     return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
1778                 }
1779                 else
1780                 {
1781                     return (VerticalAlignmentType)GetInternalCellVerticalAlignmentProperty(this);
1782                 }
1783             }
1784             set
1785             {
1786                 if (NUIApplication.IsUsingXaml)
1787                 {
1788                     SetValue(CellVerticalAlignmentProperty, value);
1789                 }
1790                 else
1791                 {
1792                     SetInternalCellVerticalAlignmentProperty(this, null, value);
1793                 }
1794                 NotifyPropertyChanged();
1795             }
1796         }
1797
1798         /// <summary>
1799         /// The left focusable view.<br />
1800         /// This will return null if not set.<br />
1801         /// This will also return null if the specified left focusable view is not on a window.<br />
1802         /// </summary>
1803         /// <since_tizen> 3 </since_tizen>
1804         public View LeftFocusableView
1805         {
1806             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1807             get
1808             {
1809                 if (NUIApplication.IsUsingXaml)
1810                 {
1811                     return (View)GetValue(LeftFocusableViewProperty);
1812                 }
1813                 else
1814                 {
1815                     return (View)GetInternalLeftFocusableViewProperty(this);
1816                 }
1817             }
1818             set
1819             {
1820                 if (NUIApplication.IsUsingXaml)
1821                 {
1822                     SetValue(LeftFocusableViewProperty, value);
1823                 }
1824                 else
1825                 {
1826                     SetInternalLeftFocusableViewProperty(this, null, value);
1827                 }
1828                 NotifyPropertyChanged();
1829             }
1830         }
1831
1832         /// <summary>
1833         /// The right focusable view.<br />
1834         /// This will return null if not set.<br />
1835         /// This will also return null if the specified right focusable view is not on a window.<br />
1836         /// </summary>
1837         /// <since_tizen> 3 </since_tizen>
1838         public View RightFocusableView
1839         {
1840             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1841             get
1842             {
1843                 if (NUIApplication.IsUsingXaml)
1844                 {
1845                     return (View)GetValue(RightFocusableViewProperty);
1846                 }
1847                 else
1848                 {
1849                     return (View)GetInternalRightFocusableViewProperty(this);
1850                 }
1851             }
1852             set
1853             {
1854                 if (NUIApplication.IsUsingXaml)
1855                 {
1856                     SetValue(RightFocusableViewProperty, value);
1857                 }
1858                 else
1859                 {
1860                     SetInternalRightFocusableViewProperty(this, null, value);
1861                 }
1862                 NotifyPropertyChanged();
1863             }
1864         }
1865
1866         /// <summary>
1867         /// The up focusable view.<br />
1868         /// This will return null if not set.<br />
1869         /// This will also return null if the specified up focusable view is not on a window.<br />
1870         /// </summary>
1871         /// <since_tizen> 3 </since_tizen>
1872         public View UpFocusableView
1873         {
1874             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1875             get
1876             {
1877                 if (NUIApplication.IsUsingXaml)
1878                 {
1879                     return (View)GetValue(UpFocusableViewProperty);
1880                 }
1881                 else
1882                 {
1883                     return (View)GetInternalUpFocusableViewProperty(this);
1884                 }
1885             }
1886             set
1887             {
1888                 if (NUIApplication.IsUsingXaml)
1889                 {
1890                     SetValue(UpFocusableViewProperty, value);
1891                 }
1892                 else
1893                 {
1894                     SetInternalUpFocusableViewProperty(this, null, value);
1895                 }
1896                 NotifyPropertyChanged();
1897             }
1898         }
1899
1900         /// <summary>
1901         /// The down focusable view.<br />
1902         /// This will return null if not set.<br />
1903         /// This will also return null if the specified down focusable view is not on a window.<br />
1904         /// </summary>
1905         /// <since_tizen> 3 </since_tizen>
1906         public View DownFocusableView
1907         {
1908             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1909             get
1910             {
1911                 if (NUIApplication.IsUsingXaml)
1912                 {
1913                     return (View)GetValue(DownFocusableViewProperty);
1914                 }
1915                 else
1916                 {
1917                     return (View)GetInternalDownFocusableViewProperty(this);
1918                 }
1919             }
1920             set
1921             {
1922                 if (NUIApplication.IsUsingXaml)
1923                 {
1924                     SetValue(DownFocusableViewProperty, value);
1925                 }
1926                 else
1927                 {
1928                     SetInternalDownFocusableViewProperty(this, null, value);
1929                 }
1930                 NotifyPropertyChanged();
1931             }
1932         }
1933
1934         /// <summary>
1935         /// The clockwise focusable view by rotary wheel.<br />
1936         /// This will return null if not set.<br />
1937         /// This will also return null if the specified clockwise focusable view is not on a window.<br />
1938         /// </summary>
1939         [EditorBrowsable(EditorBrowsableState.Never)]
1940         public View ClockwiseFocusableView
1941         {
1942             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1943             get
1944             {
1945                 if (NUIApplication.IsUsingXaml)
1946                 {
1947                     return (View)GetValue(ClockwiseFocusableViewProperty);
1948                 }
1949                 else
1950                 {
1951                     return (View)GetInternalClockwiseFocusableViewProperty(this);
1952                 }
1953             }
1954             set
1955             {
1956                 if (NUIApplication.IsUsingXaml)
1957                 {
1958                     SetValue(ClockwiseFocusableViewProperty, value);
1959                 }
1960                 else
1961                 {
1962                     SetInternalClockwiseFocusableViewProperty(this, null, value);
1963                 }
1964                 NotifyPropertyChanged();
1965             }
1966         }
1967
1968         /// <summary>
1969         /// The counter clockwise focusable view by rotary wheel.<br />
1970         /// This will return null if not set.<br />
1971         /// This will also return null if the specified counter clockwise focusable view is not on a window.<br />
1972         /// </summary>
1973         [EditorBrowsable(EditorBrowsableState.Never)]
1974         public View CounterClockwiseFocusableView
1975         {
1976             // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
1977             get
1978             {
1979                 if (NUIApplication.IsUsingXaml)
1980                 {
1981                     return (View)GetValue(CounterClockwiseFocusableViewProperty);
1982                 }
1983                 else
1984                 {
1985                     return (View)GetInternalCounterClockwiseFocusableViewProperty(this);
1986                 }
1987             }
1988             set
1989             {
1990                 if (NUIApplication.IsUsingXaml)
1991                 {
1992                     SetValue(CounterClockwiseFocusableViewProperty, value);
1993                 }
1994                 else
1995                 {
1996                     SetInternalCounterClockwiseFocusableViewProperty(this, null, value);
1997                 }
1998                 NotifyPropertyChanged();
1999             }
2000         }
2001
2002         /// <summary>
2003         /// Whether the view should be focusable by keyboard navigation.
2004         /// </summary>
2005         /// <since_tizen> 3 </since_tizen>
2006         public bool Focusable
2007         {
2008             get
2009             {
2010                 if (NUIApplication.IsUsingXaml)
2011                 {
2012                     return (bool)GetValue(FocusableProperty);
2013                 }
2014                 else
2015                 {
2016                     return (bool)GetInternalFocusableProperty(this);
2017                 }
2018             }
2019             set
2020             {
2021                 if (NUIApplication.IsUsingXaml)
2022                 {
2023                     SetValue(FocusableProperty, value);
2024                 }
2025                 else
2026                 {
2027                     SetInternalFocusableProperty(this, null, value);
2028                 }
2029                 NotifyPropertyChanged();
2030             }
2031         }
2032
2033         /// <summary>
2034         /// Whether the children of this view can be focusable by keyboard navigation. If user sets this to false, the children of this actor view will not be focused.
2035         /// Note : Default value is true.
2036         /// </summary>
2037         [EditorBrowsable(EditorBrowsableState.Never)]
2038         public bool FocusableChildren
2039         {
2040             get
2041             {
2042                 if (NUIApplication.IsUsingXaml)
2043                 {
2044                     return (bool)GetValue(FocusableChildrenProperty);
2045                 }
2046                 else
2047                 {
2048                     return (bool)GetInternalFocusableChildrenProperty(this);
2049                 }
2050             }
2051             set
2052             {
2053                 if (NUIApplication.IsUsingXaml)
2054                 {
2055                     SetValue(FocusableChildrenProperty, value);
2056                 }
2057                 else
2058                 {
2059                     SetInternalFocusableChildrenProperty(this, null, value);
2060                 }
2061                 NotifyPropertyChanged();
2062             }
2063         }
2064
2065         /// <summary>
2066         /// Whether this view can focus by touch.
2067         /// If Focusable is false, FocusableInTouch is disabled.
2068         /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
2069         /// </summary>
2070         [EditorBrowsable(EditorBrowsableState.Never)]
2071         public bool FocusableInTouch
2072         {
2073             get
2074             {
2075
2076                 if (NUIApplication.IsUsingXaml)
2077                 {
2078                     return (bool)GetValue(FocusableInTouchProperty);
2079                 }
2080                 else
2081                 {
2082                     return (bool)GetInternalFocusableInTouchProperty(this);
2083                 }
2084             }
2085             set
2086             {
2087                 if (NUIApplication.IsUsingXaml)
2088                 {
2089                     SetValue(FocusableInTouchProperty, value);
2090                 }
2091                 else
2092                 {
2093                     SetInternalFocusableInTouchProperty(this, null, value);
2094                 }
2095                 NotifyPropertyChanged();
2096             }
2097         }
2098
2099         /// <summary>
2100         /// Retrieves the position of the view.
2101         /// The coordinates are relative to the view's parent.
2102         /// </summary>
2103         /// <remarks>
2104         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
2105         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
2106         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
2107         /// and users can get the current actual values through them.
2108         /// </remarks>
2109         /// <since_tizen> 3 </since_tizen>
2110         public Position CurrentPosition
2111         {
2112             get
2113             {
2114                 return GetCurrentPosition();
2115             }
2116         }
2117
2118         /// <summary>
2119         /// Sets the size of a view for the width and the height.<br />
2120         /// Geometry can be scaled to fit within this area.<br />
2121         /// This does not interfere with the view's scale factor.<br />
2122         /// The views default depth is the minimum of width and height.<br />
2123         /// </summary>
2124         /// <remarks>
2125         /// The property cascade chaining set is not recommended.
2126         /// </remarks>
2127         /// <example>
2128         /// This way is recommended for setting the property
2129         /// <code>
2130         /// var view = new View();
2131         /// view.Size2D = new Size2D(100, 200);
2132         /// </code>
2133         /// This way to set the property is prohibited
2134         /// <code>
2135         /// view.Size2D.Width = 100; //This does not guarantee a proper operation
2136         /// </code>
2137         /// </example>
2138         /// <since_tizen> 3 </since_tizen>
2139         public Size2D Size2D
2140         {
2141             get
2142             {
2143                 if (NUIApplication.IsUsingXaml)
2144                 {
2145                     var temp = (Size2D)GetValue(Size2DProperty);
2146                     if (this.Layout == null)
2147                     {
2148                         if (temp.Width < 0) { temp.Width = 0; }
2149                         if (temp.Height < 0) { temp.Height = 0; }
2150                     }
2151                     return temp;
2152                 }
2153                 else
2154                 {
2155                     var temp = (Size2D)GetInternalSize2DProperty(this);
2156                     if (this.Layout == null)
2157                     {
2158                         if (temp.Width < 0) { temp.Width = 0; }
2159                         if (temp.Height < 0) { temp.Height = 0; }
2160                     }
2161                     return temp;
2162                 }
2163             }
2164             set
2165             {
2166                 if (NUIApplication.IsUsingXaml)
2167                 {
2168                     SetValue(Size2DProperty, value);
2169                 }
2170                 else
2171                 {
2172                     SetInternalSize2DProperty(this, null, value);
2173                 }
2174                 NotifyPropertyChanged();
2175             }
2176         }
2177
2178         /// <summary>
2179         /// Retrieves the size of the view.
2180         /// The coordinates are relative to the view's parent.
2181         /// </summary>
2182         /// <remarks>
2183         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
2184         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
2185         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
2186         /// and users can get the current actual values through them.
2187         /// </remarks>
2188         /// <since_tizen> 3 </since_tizen>
2189         public Size2D CurrentSize
2190         {
2191             get
2192             {
2193                 return GetCurrentSize();
2194             }
2195         }
2196
2197         /// <summary>
2198         /// Retrieves and sets the view's opacity.<br />
2199         /// </summary>
2200         /// <remarks>
2201         /// <para>
2202         /// Animatable - This property can be animated using <c>Animation</c> class.
2203         /// <code>
2204         /// animation.AnimateTo(view, "Opacity", 0.5f);
2205         /// </code>
2206         /// </para>
2207         /// </remarks>
2208         /// <since_tizen> 3 </since_tizen>
2209         public float Opacity
2210         {
2211             get
2212             {
2213                 if (NUIApplication.IsUsingXaml)
2214                 {
2215                     return (float)GetValue(OpacityProperty);
2216                 }
2217                 else
2218                 {
2219                     return (float)GetInternalOpacityProperty(this);
2220                 }
2221             }
2222             set
2223             {
2224                 if (NUIApplication.IsUsingXaml)
2225                 {
2226                     SetValue(OpacityProperty, value);
2227                 }
2228                 else
2229                 {
2230                     SetInternalOpacityProperty(this, null, value);
2231                 }
2232                 NotifyPropertyChanged();
2233             }
2234         }
2235
2236         /// <summary>
2237         /// Sets the position of the view for X and Y.<br />
2238         /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
2239         /// If the position inheritance is disabled, sets the world position.<br />
2240         /// </summary>
2241         /// <remarks>
2242         /// The property cascade chaining set is not recommended.
2243         ///</remarks>
2244         /// <example>
2245         /// This way is recommended for setting the property
2246         /// <code>
2247         /// var view = new View();
2248         /// view.Position2D = new Position2D(100, 200);
2249         /// </code>
2250         /// This way to set the property is prohibited
2251         /// <code>
2252         /// view.Position2D.X = 100; //This does not guarantee a proper operation
2253         /// </code>
2254         /// </example>
2255         /// <since_tizen> 3 </since_tizen>
2256         public Position2D Position2D
2257         {
2258             get
2259             {
2260                 if (NUIApplication.IsUsingXaml)
2261                 {
2262                     return (Position2D)GetValue(Position2DProperty);
2263                 }
2264                 else
2265                 {
2266                     return (Position2D)GetInternalPosition2DProperty(this);
2267
2268                 }
2269             }
2270             set
2271             {
2272                 if (NUIApplication.IsUsingXaml)
2273                 {
2274                     SetValue(Position2DProperty, value);
2275                 }
2276                 else
2277                 {
2278                     SetInternalPosition2DProperty(this, null, value);
2279
2280                 }
2281                 NotifyPropertyChanged();
2282             }
2283         }
2284
2285         /// <summary>
2286         /// Retrieves the screen position of the view.<br />
2287         /// </summary>
2288         /// <since_tizen> 3 </since_tizen>
2289         public Vector2 ScreenPosition
2290         {
2291             get
2292             {
2293                 return GetCurrentScreenPosition();
2294             }
2295         }
2296
2297         /// <summary>
2298         /// Retrieves the screen position and size of the view.<br />
2299         /// </summary>
2300         /// <remarks>
2301         /// The float type Rectangle class is not ready yet.
2302         /// Therefore, it transmits data in Vector4 class.
2303         /// This type should later be changed to the appropriate data type.
2304         /// </remarks>
2305         [EditorBrowsable(EditorBrowsableState.Never)]
2306         public Vector4 ScreenPositionSize
2307         {
2308             get
2309             {
2310                 return GetCurrentScreenPositionSize();
2311             }
2312         }
2313
2314         /// <summary>
2315         /// Determines whether the pivot point should be used to determine the position of the view.
2316         /// This is false by default.
2317         /// </summary>
2318         /// <remarks>If false, then the top-left of the view is used for the position.
2319         /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
2320         /// </remarks>
2321         /// <since_tizen> 3 </since_tizen>
2322         public bool PositionUsesPivotPoint
2323         {
2324             get
2325             {
2326                 if (NUIApplication.IsUsingXaml)
2327                 {
2328                     return (bool)GetValue(PositionUsesPivotPointProperty);
2329                 }
2330                 else
2331                 {
2332                     return (bool)GetInternalPositionUsesPivotPointProperty(this);
2333                 }
2334             }
2335             set
2336             {
2337                 if (NUIApplication.IsUsingXaml)
2338                 {
2339                     SetValue(PositionUsesPivotPointProperty, value);
2340                 }
2341                 else
2342                 {
2343                     SetInternalPositionUsesPivotPointProperty(this, null, value);
2344                 }
2345                 NotifyPropertyChanged();
2346             }
2347         }
2348
2349         /// <summary>
2350         /// This has been deprecated in API5 and Will be removed in API8. Use PositionUsesPivotPoint instead.
2351         /// </summary>
2352         /// <since_tizen> 3 </since_tizen>
2353         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PositionUsesPivotPoint instead. " +
2354             "Like: " +
2355             "View view = new View(); " +
2356             "view.PivotPoint = PivotPoint.Center; " +
2357             "view.PositionUsesPivotPoint = true;" +
2358             " This has been deprecated in API5 and will be removed in API8")]
2359         [EditorBrowsable(EditorBrowsableState.Never)]
2360         public bool PositionUsesAnchorPoint
2361         {
2362             get
2363             {
2364                 if (NUIApplication.IsUsingXaml)
2365                 {
2366                     return (bool)GetValue(PositionUsesAnchorPointProperty);
2367                 }
2368                 else
2369                 {
2370                     return (bool)GetInternalPositionUsesAnchorPointProperty(this);
2371                 }
2372             }
2373             set
2374             {
2375                 if (NUIApplication.IsUsingXaml)
2376                 {
2377                     SetValue(PositionUsesAnchorPointProperty, value);
2378                 }
2379                 else
2380                 {
2381                     SetInternalPositionUsesAnchorPointProperty(this, null, value);
2382                 }
2383             }
2384         }
2385
2386         private bool InternalPositionUsesAnchorPoint
2387         {
2388             get
2389             {
2390                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint);
2391             }
2392             set
2393             {
2394                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value);
2395                 NotifyPropertyChanged();
2396             }
2397         }
2398
2399         /// <summary>
2400         /// Queries whether the view is connected to the stage.<br />
2401         /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
2402         /// </summary>
2403         /// <since_tizen> 3 </since_tizen>
2404         public bool IsOnWindow
2405         {
2406             get
2407             {
2408                 return OnWindow();
2409             }
2410         }
2411
2412         /// <summary>
2413         /// Gets the depth in the hierarchy for the view.
2414         /// </summary>
2415         /// <since_tizen> 3 </since_tizen>
2416         public int HierarchyDepth
2417         {
2418             get
2419             {
2420                 return GetHierarchyDepth();
2421             }
2422         }
2423
2424         /// <summary>
2425         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
2426         /// </summary>
2427         /// <remarks>
2428         /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
2429         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
2430         /// The values set by this property will likely change.
2431         /// </remarks>
2432         /// <since_tizen> 3 </since_tizen>
2433         public int SiblingOrder
2434         {
2435             get
2436             {
2437                 if (NUIApplication.IsUsingXaml)
2438                 {
2439                     return (int)GetValue(SiblingOrderProperty);
2440                 }
2441                 else
2442                 {
2443                     return (int)GetInternalSiblingOrderProperty(this);
2444                 }
2445             }
2446             set
2447             {
2448                 if (NUIApplication.IsUsingXaml)
2449                 {
2450                     SetValue(SiblingOrderProperty, value);
2451                 }
2452                 else
2453                 {
2454                     SetInternalSiblingOrderProperty(this, null, value);
2455                 }
2456                 Layout?.ChangeLayoutSiblingOrder(value);
2457                 NotifyPropertyChanged();
2458             }
2459         }
2460
2461         /// <summary>
2462         /// Returns the natural size of the view.
2463         /// </summary>
2464         /// <remarks>
2465         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2466         /// </remarks>
2467         /// <since_tizen> 5 </since_tizen>
2468         public Vector3 NaturalSize
2469         {
2470             get
2471             {
2472                 Vector3 ret = GetNaturalSize();
2473                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2474                 return ret;
2475             }
2476         }
2477
2478         /// <summary>
2479         /// Returns the natural size (Size2D) of the view.
2480         /// </summary>
2481         /// <remarks>
2482         /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
2483         /// </remarks>
2484         /// <since_tizen> 4 </since_tizen>
2485         public Size2D NaturalSize2D
2486         {
2487             get
2488             {
2489                 Vector3 temp = GetNaturalSize();
2490                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2491                 Size2D sz = null;
2492                 if (temp != null)
2493                 {
2494                     sz = new Size2D((int)temp.Width, (int)temp.Height);
2495                     temp.Dispose();
2496                 }
2497                 return sz;
2498             }
2499         }
2500
2501         /// <summary>
2502         /// Gets or sets the origin of a view within its parent's area.<br />
2503         /// 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 />
2504         /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
2505         /// A view's position is the distance between this origin and the view's anchor-point.<br />
2506         /// </summary>
2507         /// <pre>The view has been initialized.</pre>
2508         /// <since_tizen> 3 </since_tizen>
2509         public Position ParentOrigin
2510         {
2511             get
2512             {
2513                 if (NUIApplication.IsUsingXaml)
2514                 {
2515                     var tmp = (Position)GetValue(ParentOriginProperty);
2516                     return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
2517                 }
2518                 else
2519                 {
2520                     var tmp = (Position)GetInternalParentOriginProperty(this);
2521                     return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
2522                 }
2523             }
2524             set
2525             {
2526                 if (NUIApplication.IsUsingXaml)
2527                 {
2528                     SetValue(ParentOriginProperty, value);
2529                 }
2530                 else
2531                 {
2532                     SetInternalParentOriginProperty(this, null, value);
2533                 }
2534                 NotifyPropertyChanged();
2535             }
2536         }
2537
2538         /// <summary>
2539         /// Gets or sets the anchor-point of a view.<br />
2540         /// 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 />
2541         /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
2542         /// A view position is the distance between its parent-origin and this anchor-point.<br />
2543         /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
2544         /// <pre>The view has been initialized.</pre>
2545         /// </summary>
2546         /// <remarks>
2547         /// The property cascade chaining set is not recommended.
2548         ///</remarks>
2549         /// <example>
2550         /// This way is recommended for setting the property
2551         /// <code>
2552         /// var view = new View();
2553         /// view.PivotPoint = PivotPoint.Center;
2554         /// </code>
2555         /// This way to set the property is prohibited
2556         /// <code>
2557         /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
2558         /// </code>
2559         /// </example>
2560         /// <since_tizen> 3 </since_tizen>
2561         public Position PivotPoint
2562         {
2563             get
2564             {
2565                 if (NUIApplication.IsUsingXaml)
2566                 {
2567                     return (Position)GetValue(PivotPointProperty);
2568                 }
2569                 else
2570                 {
2571                     return (Position)GetInternalPivotPointProperty(this);
2572                 }
2573             }
2574             set
2575             {
2576                 if (NUIApplication.IsUsingXaml)
2577                 {
2578                     SetValue(PivotPointProperty, value);
2579                 }
2580                 else
2581                 {
2582                     SetInternalPivotPointProperty(this, null, value);
2583                 }
2584                 NotifyPropertyChanged();
2585             }
2586         }
2587
2588         /// <summary>
2589         /// Gets or sets the size width of the view.
2590         /// </summary>
2591         /// <remarks>
2592         /// <para>
2593         /// Animatable - This property can be animated using <c>Animation</c> class.
2594         /// <code>
2595         /// animation.AnimateTo(view, "SizeWidth", 500.0f);
2596         /// </code>
2597         /// </para>
2598         /// </remarks>
2599         /// <since_tizen> 3 </since_tizen>
2600         public float SizeWidth
2601         {
2602             get
2603             {
2604                 if (NUIApplication.IsUsingXaml)
2605                 {
2606                     return (float)GetValue(SizeWidthProperty);
2607                 }
2608                 else
2609                 {
2610                     return (float)GetInternalSizeWidthProperty(this);
2611                 }
2612
2613
2614             }
2615             set
2616             {
2617                 if (NUIApplication.IsUsingXaml)
2618                 {
2619                     SetValue(SizeWidthProperty, value);
2620                 }
2621                 else
2622                 {
2623                     SetInternalSizeWidthProperty(this, null, value);
2624                 }
2625
2626                 NotifyPropertyChanged();
2627             }
2628         }
2629
2630         /// <summary>
2631         /// Gets or sets the size height of the view.
2632         /// </summary>
2633         /// <remarks>
2634         /// <para>
2635         /// Animatable - This property can be animated using <c>Animation</c> class.
2636         /// </para>
2637         /// <code>
2638         /// animation.AnimateTo(view, "SizeHeight", 500.0f);
2639         /// </code>
2640         /// </remarks>
2641         /// <since_tizen> 3 </since_tizen>
2642         public float SizeHeight
2643         {
2644             get
2645             {
2646                 if (NUIApplication.IsUsingXaml)
2647                 {
2648                     return (float)GetValue(SizeHeightProperty);
2649                 }
2650                 else
2651                 {
2652                     return (float)GetInternalSizeHeightProperty(this);
2653                 }
2654
2655
2656             }
2657             set
2658             {
2659                 if (NUIApplication.IsUsingXaml)
2660                 {
2661                     SetValue(SizeHeightProperty, value);
2662                 }
2663                 else
2664                 {
2665                     SetInternalSizeHeightProperty(this, null, value);
2666                 }
2667
2668
2669                 NotifyPropertyChanged();
2670             }
2671         }
2672
2673         /// <summary>
2674         /// Gets or sets the position of the view.<br />
2675         /// By default, sets the position vector between the parent origin and pivot point (default).<br />
2676         /// If the position inheritance is disabled, sets the world position.<br />
2677         /// </summary>
2678         /// <remarks>
2679         /// <para>
2680         /// Animatable - This property can be animated using <c>Animation</c> class.
2681         /// <code>
2682         /// animation.AnimateTo(view, "Position", new Position(50, 0));
2683         /// </code>
2684         /// </para>
2685         /// The property cascade chaining set is not recommended.
2686         /// </remarks>
2687         /// <example>
2688         /// This way is recommended for setting the property
2689         /// <code>
2690         /// var view = new View();
2691         /// view.Position = new Position(100, 200.5f, 0);
2692         /// </code>
2693         /// This way to set the property is prohibited
2694         /// <code>
2695         /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
2696         /// </code>
2697         /// </example>
2698         /// <since_tizen> 3 </since_tizen>
2699         public Position Position
2700         {
2701             get
2702             {
2703                 if (NUIApplication.IsUsingXaml)
2704                 {
2705                     return (Position)GetValue(PositionProperty);
2706                 }
2707                 else
2708                 {
2709                     return (Position2D)GetInternalPositionProperty(this);
2710                 }
2711             }
2712             set
2713             {
2714                 if (NUIApplication.IsUsingXaml)
2715                 {
2716                     SetValue(PositionProperty, value);
2717                 }
2718                 else
2719                 {
2720                     SetInternalPositionProperty(this, null, value);
2721                 }
2722                 NotifyPropertyChanged();
2723             }
2724         }
2725
2726         /// <summary>
2727         /// Gets or sets the position X of the view.
2728         /// </summary>
2729         /// <remarks>
2730         /// <para>
2731         /// Animatable - This property can be animated using <c>Animation</c> class.
2732         /// <code>
2733         /// animation.AnimateTo(view, "PositionX", 50.0f);
2734         /// </code>
2735         /// </para>
2736         /// </remarks>
2737         /// <since_tizen> 3 </since_tizen>
2738         public float PositionX
2739         {
2740             get
2741             {
2742                 if (NUIApplication.IsUsingXaml)
2743                 {
2744                     return (float)GetValue(PositionXProperty);
2745                 }
2746                 else
2747                 {
2748                     return (float)GetInternalPositionXProperty(this);
2749                 }
2750             }
2751             set
2752             {
2753                 if (NUIApplication.IsUsingXaml)
2754                 {
2755                     SetValue(PositionXProperty, value);
2756                 }
2757                 else
2758                 {
2759                     SetInternalPositionXProperty(this, null, value);
2760                 }
2761                 NotifyPropertyChanged();
2762             }
2763         }
2764
2765         /// <summary>
2766         /// Gets or sets the position Y of the view.
2767         /// </summary>
2768         /// <remarks>
2769         /// <para>
2770         /// Animatable - This property can be animated using <c>Animation</c> class.
2771         /// <code>
2772         /// animation.AnimateTo(view, "PositionY", 50.0f);
2773         /// </code>
2774         /// </para>
2775         /// </remarks>
2776         /// <since_tizen> 3 </since_tizen>
2777         public float PositionY
2778         {
2779             get
2780             {
2781                 if (NUIApplication.IsUsingXaml)
2782                 {
2783                     return (float)GetValue(PositionYProperty);
2784                 }
2785                 else
2786                 {
2787                     return (float)GetInternalPositionYProperty(this);
2788                 }
2789             }
2790             set
2791             {
2792                 if (NUIApplication.IsUsingXaml)
2793                 {
2794                     SetValue(PositionYProperty, value);
2795                 }
2796                 else
2797                 {
2798                     SetInternalPositionYProperty(this, null, value);
2799                 }
2800                 NotifyPropertyChanged();
2801             }
2802         }
2803
2804         /// <summary>
2805         /// Gets or sets the position Z of the view.
2806         /// </summary>
2807         /// <remarks>
2808         /// <para>
2809         /// Animatable - This property can be animated using <c>Animation</c> class.
2810         /// <code>
2811         /// animation.AnimateTo(view, "PositionZ", 50.0f);
2812         /// </code>
2813         /// </para>
2814         /// </remarks>
2815         /// <since_tizen> 3 </since_tizen>
2816         public float PositionZ
2817         {
2818             get
2819             {
2820                 if (NUIApplication.IsUsingXaml)
2821                 {
2822                     return (float)GetValue(PositionZProperty);
2823                 }
2824                 else
2825                 {
2826                     return (float)GetInternalPositionZProperty(this);
2827                 }
2828             }
2829             set
2830             {
2831                 if (NUIApplication.IsUsingXaml)
2832                 {
2833                     SetValue(PositionZProperty, value);
2834                 }
2835                 else
2836                 {
2837                     SetInternalPositionZProperty(this, null, value);
2838                 }
2839                 NotifyPropertyChanged();
2840             }
2841         }
2842
2843         /// <summary>
2844         /// Gets or sets the world position of the view.
2845         /// </summary>
2846         /// <since_tizen> 3 </since_tizen>
2847         public Vector3 WorldPosition
2848         {
2849             get
2850             {
2851                 return GetCurrentWorldPosition();
2852             }
2853         }
2854
2855         /// <summary>
2856         /// Gets or sets the orientation of the view.<br />
2857         /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
2858         /// </summary>
2859         /// <remarks>
2860         /// <para>
2861         /// This is an asynchronous method.
2862         /// </para>
2863         /// <para>
2864         /// Animatable - This property can be animated using <c>Animation</c> class.
2865         /// <code>
2866         /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
2867         /// </code>
2868         /// </para>
2869         /// </remarks>
2870         /// <since_tizen> 3 </since_tizen>
2871         public Rotation Orientation
2872         {
2873             get
2874             {
2875                 if (NUIApplication.IsUsingXaml)
2876                 {
2877                     return (Rotation)GetValue(OrientationProperty);
2878                 }
2879                 else
2880                 {
2881                     return (Rotation)GetInternalOrientationProperty(this);
2882                 }
2883             }
2884             set
2885             {
2886                 if (NUIApplication.IsUsingXaml)
2887                 {
2888                     SetValue(OrientationProperty, value);
2889                 }
2890                 else
2891                 {
2892                     SetInternalOrientationProperty(this, null, value);
2893                 }
2894                 NotifyPropertyChanged();
2895             }
2896         }
2897
2898         /// <summary>
2899         /// Gets or sets the world orientation of the view.<br />
2900         /// </summary>
2901         /// <since_tizen> 3 </since_tizen>
2902         public Rotation WorldOrientation
2903         {
2904             get
2905             {
2906                 Rotation temp = new Rotation();
2907                 var pValue = GetProperty(View.Property.WorldOrientation);
2908                 pValue.Get(temp);
2909                 pValue.Dispose();
2910                 return temp;
2911             }
2912         }
2913
2914         /// <summary>
2915         /// Gets or sets the scale factor applied to the view.<br />
2916         /// </summary>
2917         /// <remarks>
2918         /// <para>
2919         /// Animatable - This property can be animated using <c>Animation</c> class.
2920         /// <code>
2921         /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
2922         /// </code>
2923         /// </para>
2924         /// The property cascade chaining set is not recommended.
2925         /// </remarks>
2926         /// <example>
2927         /// This way is recommended for setting the property
2928         /// <code>
2929         /// var view = new View();
2930         /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
2931         /// </code>
2932         /// This way to set the property is prohibited
2933         /// <code>
2934         /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
2935         /// </code>
2936         /// </example>
2937         /// <since_tizen> 3 </since_tizen>
2938         public Vector3 Scale
2939         {
2940             get
2941             {
2942                 if (NUIApplication.IsUsingXaml)
2943                 {
2944                     return (Vector3)GetValue(ScaleProperty);
2945                 }
2946                 else
2947                 {
2948                     return (Vector3)GetInternalScaleProperty(this);
2949                 }
2950
2951
2952             }
2953             set
2954             {
2955                 if (NUIApplication.IsUsingXaml)
2956                 {
2957                     SetValue(ScaleProperty, value);
2958                 }
2959                 else
2960                 {
2961                     SetInternalScaleProperty(this, null, value);
2962                 }
2963
2964
2965                 NotifyPropertyChanged();
2966             }
2967         }
2968
2969         /// <summary>
2970         /// Gets or sets the scale X factor applied to the view.
2971         /// </summary>
2972         /// <remarks>
2973         /// <para>
2974         /// Animatable - This property can be animated using <c>Animation</c> class.
2975         /// <code>
2976         /// animation.AnimateTo(view, "ScaleX", 1.5f);
2977         /// </code>
2978         /// </para>
2979         /// </remarks>
2980         /// <since_tizen> 3 </since_tizen>
2981         public float ScaleX
2982         {
2983             get
2984             {
2985                 if (NUIApplication.IsUsingXaml)
2986                 {
2987                     return (float)GetValue(ScaleXProperty);
2988                 }
2989                 else
2990                 {
2991                     return (float)GetInternalScaleXProperty(this);
2992                 }
2993
2994
2995             }
2996             set
2997             {
2998                 if (NUIApplication.IsUsingXaml)
2999                 {
3000                     SetValue(ScaleXProperty, value);
3001                 }
3002                 else
3003                 {
3004                     SetInternalScaleXProperty(this, null, value);
3005                 }
3006
3007
3008                 NotifyPropertyChanged();
3009             }
3010         }
3011
3012         /// <summary>
3013         /// Gets or sets the scale Y factor applied to the view.
3014         /// </summary>
3015         /// <remarks>
3016         /// <para>
3017         /// Animatable - This property can be animated using <c>Animation</c> class.
3018         /// <code>
3019         /// animation.AnimateTo(view, "ScaleY", 1.5f);
3020         /// </code>
3021         /// </para>
3022         /// </remarks>
3023         /// <since_tizen> 3 </since_tizen>
3024         public float ScaleY
3025         {
3026             get
3027             {
3028                 if (NUIApplication.IsUsingXaml)
3029                 {
3030                     return (float)GetValue(ScaleYProperty);
3031                 }
3032                 else
3033                 {
3034                     return (float)GetInternalScaleYProperty(this);
3035                 }
3036
3037
3038             }
3039             set
3040             {
3041                 if (NUIApplication.IsUsingXaml)
3042                 {
3043                     SetValue(ScaleYProperty, value);
3044                 }
3045                 else
3046                 {
3047                     SetInternalScaleYProperty(this, null, value);
3048                 }
3049
3050
3051                 NotifyPropertyChanged();
3052             }
3053         }
3054
3055         /// <summary>
3056         /// Gets or sets the scale Z factor applied to the view.
3057         /// </summary>
3058         /// <remarks>
3059         /// <para>
3060         /// Animatable - This property can be animated using <c>Animation</c> class.
3061         /// <code>
3062         /// animation.AnimateTo(view, "ScaleZ", 1.5f);
3063         /// </code>
3064         /// </para>
3065         /// </remarks>
3066         /// <since_tizen> 3 </since_tizen>
3067         public float ScaleZ
3068         {
3069             get
3070             {
3071                 if (NUIApplication.IsUsingXaml)
3072                 {
3073                     return (float)GetValue(ScaleZProperty);
3074                 }
3075                 else
3076                 {
3077                     return (float)GetInternalScaleZProperty(this);
3078                 }
3079
3080
3081             }
3082             set
3083             {
3084                 if (NUIApplication.IsUsingXaml)
3085                 {
3086                     SetValue(ScaleZProperty, value);
3087                 }
3088                 else
3089                 {
3090                     SetInternalScaleZProperty(this, null, value);
3091                 }
3092
3093
3094                 NotifyPropertyChanged();
3095             }
3096         }
3097
3098         /// <summary>
3099         /// Gets the world scale of the view.
3100         /// </summary>
3101         /// <since_tizen> 3 </since_tizen>
3102         public Vector3 WorldScale
3103         {
3104             get
3105             {
3106                 return GetCurrentWorldScale();
3107             }
3108         }
3109
3110         /// <summary>
3111         /// Retrieves the visibility flag of the view.
3112         /// </summary>
3113         /// <remarks>
3114         /// <para>
3115         /// If the view is not visible, then the view and its children will not be rendered.
3116         /// 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.
3117         /// </para>
3118         /// <para>
3119         /// Animatable - This property can be animated using <c>Animation</c> class.
3120         /// <code>
3121         /// animation.AnimateTo(view, "Visibility", false);
3122         /// </code>
3123         /// </para>
3124         /// </remarks>
3125         /// <since_tizen> 3 </since_tizen>
3126         public bool Visibility
3127         {
3128             get
3129             {
3130                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE);
3131             }
3132         }
3133
3134         /// <summary>
3135         /// Gets the view's world color.
3136         /// </summary>
3137         /// <since_tizen> 3 </since_tizen>
3138         public Vector4 WorldColor
3139         {
3140             get
3141             {
3142                 return GetCurrentWorldColor();
3143             }
3144         }
3145
3146         /// <summary>
3147         /// Gets or sets the view's name.
3148         /// </summary>
3149         /// <since_tizen> 3 </since_tizen>
3150         public string Name
3151         {
3152             get
3153             {
3154                 if (NUIApplication.IsUsingXaml)
3155                 {
3156                     return (string)GetValue(NameProperty);
3157                 }
3158                 else
3159                 {
3160                     return (string)GetInternalNameProperty(this);
3161                 }
3162
3163
3164             }
3165             set
3166             {
3167                 if (NUIApplication.IsUsingXaml)
3168                 {
3169                     SetValue(NameProperty, value);
3170                 }
3171                 else
3172                 {
3173                     SetInternalNameProperty(this, null, value);
3174                 }
3175
3176
3177                 NotifyPropertyChanged();
3178             }
3179         }
3180
3181         /// <summary>
3182         /// Get the number of children held by the view.
3183         /// </summary>
3184         /// <since_tizen> 3 </since_tizen>
3185         public new uint ChildCount
3186         {
3187             get
3188             {
3189                 return Convert.ToUInt32(Children.Count);
3190             }
3191         }
3192
3193         /// <summary>
3194         /// Gets the view's ID.
3195         /// Read-only
3196         /// </summary>
3197         /// <since_tizen> 3 </since_tizen>
3198         public uint ID
3199         {
3200             get
3201             {
3202                 return GetId();
3203             }
3204         }
3205
3206         /// <summary>
3207         /// Gets or sets the status of whether the view should emit touch or hover signals.
3208         /// If a View is made insensitive, then the View and its children are not hittable.
3209         /// </summary>
3210         /// <since_tizen> 3 </since_tizen>
3211         public bool Sensitive
3212         {
3213             get
3214             {
3215                 if (NUIApplication.IsUsingXaml)
3216                 {
3217                     return (bool)GetValue(SensitiveProperty);
3218                 }
3219                 else
3220                 {
3221                     return (bool)GetInternalSensitiveProperty(this);
3222                 }
3223             }
3224             set
3225             {
3226                 if (NUIApplication.IsUsingXaml)
3227                 {
3228                     SetValue(SensitiveProperty, value);
3229                 }
3230                 else
3231                 {
3232                     SetInternalSensitiveProperty(this, null, value);
3233                 }
3234                 NotifyPropertyChanged();
3235             }
3236         }
3237
3238         /// <summary>
3239         /// Gets or sets the status of whether the view should be enabled user interactions.
3240         /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
3241         /// </summary>
3242         /// <since_tizen> tizen_next </since_tizen>
3243         [EditorBrowsable(EditorBrowsableState.Never)]
3244         public bool IsEnabled
3245         {
3246             get
3247             {
3248                 if (NUIApplication.IsUsingXaml)
3249                 {
3250                     return (bool)GetValue(IsEnabledProperty);
3251                 }
3252                 else
3253                 {
3254                     return (bool)GetInternalIsEnabledProperty(this);
3255                 }
3256             }
3257             set
3258             {
3259                 if (NUIApplication.IsUsingXaml)
3260                 {
3261                     SetValue(IsEnabledProperty, value);
3262                 }
3263                 else
3264                 {
3265                     SetInternalIsEnabledProperty(this, null, value);
3266                 }
3267                 NotifyPropertyChanged();
3268             }
3269         }
3270
3271         /// <summary>
3272         /// 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.
3273         /// </summary>
3274         /// <since_tizen> 3 </since_tizen>
3275         public bool LeaveRequired
3276         {
3277             get
3278             {
3279                 if (NUIApplication.IsUsingXaml)
3280                 {
3281                     return (bool)GetValue(LeaveRequiredProperty);
3282                 }
3283                 else
3284                 {
3285                     return (bool)GetInternalLeaveRequiredProperty(this);
3286                 }
3287             }
3288             set
3289             {
3290                 if (NUIApplication.IsUsingXaml)
3291                 {
3292                     SetValue(LeaveRequiredProperty, value);
3293                 }
3294                 else
3295                 {
3296                     SetInternalLeaveRequiredProperty(this, null, value);
3297                 }
3298                 NotifyPropertyChanged();
3299             }
3300         }
3301
3302         /// <summary>
3303         /// Gets or sets the status of whether a child view inherits it's parent's orientation.
3304         /// </summary>
3305         /// <since_tizen> 3 </since_tizen>
3306         public bool InheritOrientation
3307         {
3308             get
3309             {
3310                 if (NUIApplication.IsUsingXaml)
3311                 {
3312                     return (bool)GetValue(InheritOrientationProperty);
3313                 }
3314                 else
3315                 {
3316                     return (bool)GetInternalInheritOrientationProperty(this);
3317                 }
3318             }
3319             set
3320             {
3321                 if (NUIApplication.IsUsingXaml)
3322                 {
3323                     SetValue(InheritOrientationProperty, value);
3324                 }
3325                 else
3326                 {
3327                     SetInternalInheritOrientationProperty(this, null, value);
3328                 }
3329                 NotifyPropertyChanged();
3330             }
3331         }
3332
3333         /// <summary>
3334         /// Gets or sets the status of whether a child view inherits it's parent's scale.
3335         /// </summary>
3336         /// <since_tizen> 3 </since_tizen>
3337         public bool InheritScale
3338         {
3339             get
3340             {
3341                 if (NUIApplication.IsUsingXaml)
3342                 {
3343                     return (bool)GetValue(InheritScaleProperty);
3344                 }
3345                 else
3346                 {
3347                     return (bool)GetInternalInheritScaleProperty(this);
3348                 }
3349             }
3350             set
3351             {
3352                 if (NUIApplication.IsUsingXaml)
3353                 {
3354                     SetValue(InheritScaleProperty, value);
3355                 }
3356                 else
3357                 {
3358                     SetInternalInheritScaleProperty(this, null, value);
3359                 }
3360                 NotifyPropertyChanged();
3361             }
3362         }
3363
3364         /// <summary>
3365         /// Gets or sets the status of how the view and its children should be drawn.<br />
3366         /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
3367         /// 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 />
3368         /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
3369         /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
3370         /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
3371         /// </summary>
3372         /// <since_tizen> 3 </since_tizen>
3373         public DrawModeType DrawMode
3374         {
3375             get
3376             {
3377                 if (NUIApplication.IsUsingXaml)
3378                 {
3379                     return (DrawModeType)GetValue(DrawModeProperty);
3380                 }
3381                 else
3382                 {
3383                     return (DrawModeType)GetInternalDrawModeProperty(this);
3384                 }
3385             }
3386             set
3387             {
3388                 if (NUIApplication.IsUsingXaml)
3389                 {
3390                     SetValue(DrawModeProperty, value);
3391                 }
3392                 else
3393                 {
3394                     SetInternalDrawModeProperty(this, null, value);
3395                 }
3396                 NotifyPropertyChanged();
3397             }
3398         }
3399
3400         /// <summary>
3401         /// Gets or sets the relative to parent size factor of the view.<br />
3402         /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
3403         /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
3404         /// </summary>
3405         /// <remarks>
3406         /// The property cascade chaining set is not recommended.
3407         /// </remarks>
3408         /// <example>
3409         /// This way is recommended for setting the property
3410         /// <code>
3411         /// var text = new TextField();
3412         /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
3413         /// </code>
3414         /// This way to set the property is prohibited
3415         /// <code>
3416         /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
3417         /// </code>
3418         /// </example>
3419         /// <since_tizen> 3 </since_tizen>
3420         public Vector3 SizeModeFactor
3421         {
3422             get
3423             {
3424                 if (NUIApplication.IsUsingXaml)
3425                 {
3426                     return (Vector3)GetValue(SizeModeFactorProperty);
3427                 }
3428                 else
3429                 {
3430                     return (Vector3)GetInternalSizeModeFactorProperty(this);
3431                 }
3432
3433
3434             }
3435             set
3436             {
3437                 if (NUIApplication.IsUsingXaml)
3438                 {
3439                     SetValue(SizeModeFactorProperty, value);
3440                 }
3441                 else
3442                 {
3443                     SetInternalSizeModeFactorProperty(this, null, value);
3444                 }
3445
3446
3447                 NotifyPropertyChanged();
3448             }
3449         }
3450
3451         /// <summary>
3452         /// Gets or sets the width resize policy to be used.
3453         /// </summary>
3454         /// <since_tizen> 3 </since_tizen>
3455         public ResizePolicyType WidthResizePolicy
3456         {
3457             get
3458             {
3459                 if (NUIApplication.IsUsingXaml)
3460                 {
3461                     return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
3462                 }
3463                 else
3464                 {
3465                     return (ResizePolicyType)GetInternalWidthResizePolicyProperty(this);
3466                 }
3467             }
3468             set
3469             {
3470                 if (NUIApplication.IsUsingXaml)
3471                 {
3472                     SetValue(WidthResizePolicyProperty, value);
3473                 }
3474                 else
3475                 {
3476                     SetInternalWidthResizePolicyProperty(this, null, value);
3477                 }
3478                 NotifyPropertyChanged();
3479             }
3480         }
3481
3482         /// <summary>
3483         /// Gets or sets the height resize policy to be used.
3484         /// </summary>
3485         /// <since_tizen> 3 </since_tizen>
3486         public ResizePolicyType HeightResizePolicy
3487         {
3488             get
3489             {
3490                 if (NUIApplication.IsUsingXaml)
3491                 {
3492                     return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
3493                 }
3494                 else
3495                 {
3496                     return (ResizePolicyType)GetInternalHeightResizePolicyProperty(this);
3497                 }
3498             }
3499             set
3500             {
3501                 if (NUIApplication.IsUsingXaml)
3502                 {
3503                     SetValue(HeightResizePolicyProperty, value);
3504                 }
3505                 else
3506                 {
3507                     SetInternalHeightResizePolicyProperty(this, null, value);
3508                 }
3509                 NotifyPropertyChanged();
3510             }
3511         }
3512
3513         /// <summary>
3514         /// Gets or sets the policy to use when setting size with size negotiation.<br />
3515         /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
3516         /// </summary>
3517         /// <since_tizen> 3 </since_tizen>
3518         public SizeScalePolicyType SizeScalePolicy
3519         {
3520             get
3521             {
3522                 if (NUIApplication.IsUsingXaml)
3523                 {
3524                     return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
3525                 }
3526                 else
3527                 {
3528                     return (SizeScalePolicyType)GetInternalSizeScalePolicyProperty(this);
3529                 }
3530             }
3531             set
3532             {
3533                 if (NUIApplication.IsUsingXaml)
3534                 {
3535                     SetValue(SizeScalePolicyProperty, value);
3536                 }
3537                 else
3538                 {
3539                     SetInternalSizeScalePolicyProperty(this, null, value);
3540                 }
3541                 NotifyPropertyChanged();
3542             }
3543         }
3544
3545         /// <summary>
3546         ///  Gets or sets the status of whether the width size is dependent on the height size.
3547         /// </summary>
3548         /// <since_tizen> 3 </since_tizen>
3549         public bool WidthForHeight
3550         {
3551             get
3552             {
3553                 if (NUIApplication.IsUsingXaml)
3554                 {
3555                     return (bool)GetValue(WidthForHeightProperty);
3556                 }
3557                 else
3558                 {
3559                     return (bool)GetInternalWidthForHeightProperty(this);
3560                 }
3561             }
3562             set
3563             {
3564                 if (NUIApplication.IsUsingXaml)
3565                 {
3566                     SetValue(WidthForHeightProperty, value);
3567                 }
3568                 else
3569                 {
3570                     SetInternalWidthForHeightProperty(this, null, value);
3571                 }
3572                 NotifyPropertyChanged();
3573             }
3574         }
3575
3576         /// <summary>
3577         /// Gets or sets the status of whether the height size is dependent on the width size.
3578         /// </summary>
3579         /// <since_tizen> 3 </since_tizen>
3580         public bool HeightForWidth
3581         {
3582             get
3583             {
3584                 if (NUIApplication.IsUsingXaml)
3585                 {
3586                     return (bool)GetValue(HeightForWidthProperty);
3587                 }
3588                 else
3589                 {
3590                     return (bool)GetInternalHeightForWidthProperty(this);
3591                 }
3592             }
3593             set
3594             {
3595                 if (NUIApplication.IsUsingXaml)
3596                 {
3597                     SetValue(HeightForWidthProperty, value);
3598                 }
3599                 else
3600                 {
3601                     SetInternalHeightForWidthProperty(this, null, value);
3602                 }
3603                 NotifyPropertyChanged();
3604             }
3605         }
3606
3607         /// <summary>
3608         /// Gets or sets the padding for use in layout.
3609         /// </summary>
3610         /// <remarks>
3611         /// The property cascade chaining set is not recommended.
3612         /// </remarks>
3613         /// <example>
3614         /// This way is recommended for setting the property
3615         /// <code>
3616         /// var view = new View();
3617         /// view.Padding = new Extents(5, 5, 5, 5);
3618         /// </code>
3619         /// This way to set the property is prohibited
3620         /// <code>
3621         /// view.Padding.Start = 5; //This does not guarantee a proper operation
3622         /// </code>
3623         /// </example>
3624         /// <since_tizen> 5 </since_tizen>
3625         public Extents Padding
3626         {
3627             get
3628             {
3629                 if (NUIApplication.IsUsingXaml)
3630                 {
3631                     return (Extents)GetValue(PaddingProperty);
3632                 }
3633                 else
3634                 {
3635                     return (Extents)GetInternalPaddingProperty(this);
3636                 }
3637
3638
3639             }
3640             set
3641             {
3642                 if (NUIApplication.IsUsingXaml)
3643                 {
3644                     SetValue(PaddingProperty, value);
3645                 }
3646                 else
3647                 {
3648                     SetInternalPaddingProperty(this, null, value);
3649                 }
3650
3651
3652                 NotifyPropertyChanged();
3653             }
3654         }
3655
3656         /// <summary>
3657         /// Gets or sets the minimum size the view can be assigned in size negotiation.
3658         /// </summary>
3659         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
3660         /// <remarks>
3661         /// The property cascade chaining set is not recommended.
3662         /// </remarks>
3663         /// <example>
3664         /// This way is recommended for setting the property
3665         /// <code>
3666         /// var view = new View();
3667         /// view.MinimumSize = new Size2D(100, 200);
3668         /// </code>
3669         /// This way to set the property is prohibited
3670         /// <code>
3671         /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
3672         /// </code>
3673         /// </example>
3674         /// <since_tizen> 3 </since_tizen>
3675         public Size2D MinimumSize
3676         {
3677             get
3678             {
3679                 if (NUIApplication.IsUsingXaml)
3680                 {
3681                     return (Size2D)GetValue(MinimumSizeProperty);
3682                 }
3683                 else
3684                 {
3685                     return (Size2D)GetInternalMinimumSizeProperty(this);
3686                 }
3687
3688             }
3689             set
3690             {
3691                 if (value == null)
3692                 {
3693                     throw new ArgumentNullException(nameof(value));
3694                 }
3695                 if (layout != null)
3696                 {
3697                     // Note: it only works if minimum size is >= than natural size.
3698                     // To force the size it should be done through the width&height spec or Size2D.
3699                     layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
3700                     layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
3701                     layout.RequestLayout();
3702                 }
3703                 if (NUIApplication.IsUsingXaml)
3704                 {
3705                     SetValue(MinimumSizeProperty, value);
3706                 }
3707                 else
3708                 {
3709                     SetInternalMinimumSizeProperty(this, null, value);
3710                 }
3711
3712                 NotifyPropertyChanged();
3713             }
3714         }
3715
3716         /// <summary>
3717         /// Gets or sets the maximum size the view can be assigned in size negotiation.
3718         /// </summary>
3719         /// <example>
3720         /// This way is recommended for setting the property
3721         /// <code>
3722         /// var view = new View();
3723         /// view.MaximumSize = new Size2D(100, 200);
3724         /// </code>
3725         /// This way to set the property is prohibited
3726         /// <code>
3727         /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
3728         /// </code>
3729         /// </example>
3730         /// <since_tizen> 3 </since_tizen>
3731         public Size2D MaximumSize
3732         {
3733             get
3734             {
3735                 if (NUIApplication.IsUsingXaml)
3736                 {
3737                     return (Size2D)GetValue(MaximumSizeProperty);
3738                 }
3739                 else
3740                 {
3741                     return (Size2D)GetInternalMaximumSizeProperty(this);
3742                 }
3743             }
3744             set
3745             {
3746                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
3747                 // MATCH_PARENT spec + parent container size can be used to limit
3748                 if (layout != null)
3749                 {
3750                     layout.RequestLayout();
3751                 }
3752
3753                 if (NUIApplication.IsUsingXaml)
3754                 {
3755                     SetValue(MaximumSizeProperty, value);
3756                 }
3757                 else
3758                 {
3759                     SetInternalMaximumSizeProperty(this, null, value);
3760                 }
3761
3762                 NotifyPropertyChanged();
3763             }
3764         }
3765
3766         /// <summary>
3767         /// Gets or sets whether a child view inherits it's parent's position.<br />
3768         /// Default is to inherit.<br />
3769         /// 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 />
3770         /// </summary>
3771         /// <since_tizen> 3 </since_tizen>
3772         public bool InheritPosition
3773         {
3774             get
3775             {
3776                 if (NUIApplication.IsUsingXaml)
3777                 {
3778                     return (bool)GetValue(InheritPositionProperty);
3779                 }
3780                 else
3781                 {
3782                     return (bool)GetInternalInheritPositionProperty(this);
3783                 }
3784             }
3785             set
3786             {
3787                 if (NUIApplication.IsUsingXaml)
3788                 {
3789                     SetValue(InheritPositionProperty, value);
3790                 }
3791                 else
3792                 {
3793                     SetInternalInheritPositionProperty(this, null, value);
3794                 }
3795                 NotifyPropertyChanged();
3796             }
3797         }
3798
3799         /// <summary>
3800         /// Gets or sets the clipping behavior (mode) of it's children.
3801         /// </summary>
3802         /// <since_tizen> 3 </since_tizen>
3803         public ClippingModeType ClippingMode
3804         {
3805             get
3806             {
3807                 if (NUIApplication.IsUsingXaml)
3808                 {
3809                     return (ClippingModeType)GetValue(ClippingModeProperty);
3810                 }
3811                 else
3812                 {
3813                     return (ClippingModeType)GetInternalClippingModeProperty(this);
3814                 }
3815             }
3816             set
3817             {
3818                 if (NUIApplication.IsUsingXaml)
3819                 {
3820                     SetValue(ClippingModeProperty, value);
3821                 }
3822                 else
3823                 {
3824                     SetInternalClippingModeProperty(this, null, value);
3825                 }
3826                 NotifyPropertyChanged();
3827             }
3828         }
3829
3830         /// <summary>
3831         /// Gets the number of renderers held by the view.
3832         /// </summary>
3833         /// <since_tizen> 3 </since_tizen>
3834         public uint RendererCount
3835         {
3836             get
3837             {
3838                 return GetRendererCount();
3839             }
3840         }
3841
3842         /// <summary>
3843         /// This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead.
3844         /// </summary>
3845         /// <remarks>
3846         /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
3847         /// </remarks>
3848         /// <since_tizen> 3 </since_tizen>
3849         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead. " +
3850             "Like: " +
3851             "View view = new View(); " +
3852             "view.PivotPoint = PivotPoint.Center; " +
3853             "view.PositionUsesPivotPoint = true;")]
3854         [EditorBrowsable(EditorBrowsableState.Never)]
3855         public Position AnchorPoint
3856         {
3857             get
3858             {
3859                 if (NUIApplication.IsUsingXaml)
3860                 {
3861                     return (Position)GetValue(AnchorPointProperty);
3862                 }
3863                 else
3864                 {
3865                     return (Position)GetInternalAnchorPointProperty(this);
3866                 }
3867
3868
3869             }
3870             set
3871             {
3872                 if (NUIApplication.IsUsingXaml)
3873                 {
3874                     SetValue(AnchorPointProperty, value);
3875                 }
3876                 else
3877                 {
3878                     SetInternalAnchorPointProperty(this, null, value);
3879                 }
3880
3881             }
3882         }
3883
3884         private Position InternalAnchorPoint
3885         {
3886             get
3887             {
3888                 return GetCurrentAnchorPoint();
3889             }
3890             set
3891             {
3892                 SetAnchorPoint(value);
3893                 NotifyPropertyChanged();
3894             }
3895         }
3896
3897         /// <summary>
3898         /// Sets the size of a view for the width, the height and the depth.<br />
3899         /// Geometry can be scaled to fit within this area.<br />
3900         /// This does not interfere with the view's scale factor.<br />
3901         /// The views default depth is the minimum of width and height.<br />
3902         /// </summary>
3903         /// <remarks>
3904         /// <para>
3905         /// Animatable - This property can be animated using <c>Animation</c> class.
3906         /// <code>
3907         /// animation.AnimateTo(view, "Size", new Size(100, 100));
3908         /// </code>
3909         /// </para>
3910         /// The property cascade chaining set is not recommended.
3911         /// </remarks>
3912         /// <example>
3913         /// This way is recommended for setting the property
3914         /// <code>
3915         /// var view = new View();
3916         /// view.Size = new Size(100.5f, 200, 0);
3917         /// </code>
3918         /// This way to set the property is prohibited
3919         /// <code>
3920         /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
3921         /// </code>
3922         /// </example>
3923         /// <since_tizen> 5 </since_tizen>
3924         public Size Size
3925         {
3926             get
3927             {
3928                 if (NUIApplication.IsUsingXaml)
3929                 {
3930                     return (Size)GetValue(SizeProperty);
3931                 }
3932                 else
3933                 {
3934                     return (Size)GetInternalSizeProperty(this);
3935                 }
3936             }
3937             set
3938             {
3939                 if (NUIApplication.IsUsingXaml)
3940                 {
3941                     SetValue(SizeProperty, value);
3942                 }
3943                 else
3944                 {
3945                     SetInternalSizeProperty(this, null, value);
3946                 }
3947                 NotifyPropertyChanged();
3948             }
3949         }
3950
3951         /// <summary>
3952         /// This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead.
3953         /// </summary>
3954         /// <since_tizen> 3 </since_tizen>
3955         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead. " +
3956             "Like: " +
3957             "Container parent =  view.GetParent(); " +
3958             "View view = parent as View;")]
3959         [EditorBrowsable(EditorBrowsableState.Never)]
3960         public new View Parent
3961         {
3962             get
3963             {
3964                 View ret;
3965                 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
3966                 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
3967                 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
3968
3969                 if (basehandle is Layer layer)
3970                 {
3971                     ret = new View(Layer.getCPtr(layer).Handle, false);
3972                     NUILog.Error("This Parent property is deprecated, should do not be used");
3973                 }
3974                 else
3975                 {
3976                     ret = basehandle as View;
3977                 }
3978
3979                 Interop.BaseHandle.DeleteBaseHandle(CPtr);
3980                 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
3981
3982                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
3983                 return ret;
3984             }
3985         }
3986
3987         /// <summary>
3988         /// Gets/Sets whether inherit parent's the layout Direction.
3989         /// </summary>
3990         /// <since_tizen> 4 </since_tizen>
3991         public bool InheritLayoutDirection
3992         {
3993             get
3994             {
3995                 if (NUIApplication.IsUsingXaml)
3996                 {
3997                     return (bool)GetValue(InheritLayoutDirectionProperty);
3998                 }
3999                 else
4000                 {
4001                     return (bool)GetInternalInheritLayoutDirectionProperty(this);
4002                 }
4003             }
4004             set
4005             {
4006                 if (NUIApplication.IsUsingXaml)
4007                 {
4008                     SetValue(InheritLayoutDirectionProperty, value);
4009                 }
4010                 else
4011                 {
4012                     SetInternalInheritLayoutDirectionProperty(this, null, value);
4013                 }
4014                 NotifyPropertyChanged();
4015             }
4016         }
4017
4018         /// <summary>
4019         /// Gets/Sets the layout Direction.
4020         /// </summary>
4021         /// <since_tizen> 4 </since_tizen>
4022         public ViewLayoutDirectionType LayoutDirection
4023         {
4024             get
4025             {
4026                 if (NUIApplication.IsUsingXaml)
4027                 {
4028                     return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
4029                 }
4030                 else
4031                 {
4032                     return (ViewLayoutDirectionType)GetInternalLayoutDirectionProperty(this);
4033                 }
4034             }
4035             set
4036             {
4037                 if (NUIApplication.IsUsingXaml)
4038                 {
4039                     SetValue(LayoutDirectionProperty, value);
4040                 }
4041                 else
4042                 {
4043                     SetInternalLayoutDirectionProperty(this, null, value);
4044                 }
4045                 NotifyPropertyChanged();
4046                 layout?.RequestLayout();
4047             }
4048         }
4049
4050         /// <summary>
4051         /// Gets or sets the Margin for use in layout.
4052         /// </summary>
4053         /// <remarks>
4054         /// Margin property is supported by Layout algorithms and containers.
4055         /// Please Set Layout if you want to use Margin property.
4056         /// The property cascade chaining set is not recommended.
4057         /// </remarks>
4058         /// <example>
4059         /// This way is recommended for setting the property
4060         /// <code>
4061         /// var view = new View();
4062         /// view.Margin = new Extents(10, 5, 15, 20);
4063         /// </code>
4064         /// This way to set the property is prohibited
4065         /// <code>
4066         /// view.Margin.Top = 15; //This does not guarantee a proper operation
4067         /// </code>
4068         /// </example>
4069         /// <since_tizen> 4 </since_tizen>
4070         public Extents Margin
4071         {
4072             get
4073             {
4074                 if (NUIApplication.IsUsingXaml)
4075                 {
4076                     return (Extents)GetValue(MarginProperty);
4077                 }
4078                 else
4079                 {
4080                     return (Extents)GetInternalMarginProperty(this);
4081                 }
4082
4083             }
4084             set
4085             {
4086                 if (NUIApplication.IsUsingXaml)
4087                 {
4088                     SetValue(MarginProperty, value);
4089                 }
4090                 else
4091                 {
4092                     SetInternalMarginProperty(this, null, value);
4093                 }
4094
4095                 NotifyPropertyChanged();
4096             }
4097         }
4098
4099         ///<summary>
4100         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
4101         ///</summary>
4102         /// <example>
4103         /// <code>
4104         /// // matchParentView matches its size to its parent size.
4105         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
4106         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
4107         ///
4108         /// // wrapContentView wraps its children with their desired size.
4109         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
4110         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
4111         ///
4112         /// // exactSizeView shows itself with an exact size.
4113         /// exactSizeView.WidthSpecification = 100;
4114         /// exactSizeView.HeightSpecification = 100;
4115         /// </code>
4116         /// </example>
4117         /// <since_tizen> 6 </since_tizen>
4118         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
4119         public int WidthSpecification
4120         {
4121             get
4122             {
4123                 if (NUIApplication.IsUsingXaml)
4124                 {
4125                     return (int)GetValue(WidthSpecificationProperty);
4126                 }
4127                 else
4128                 {
4129                     return (int)GetInternalWidthSpecificationProperty(this);
4130                 }
4131             }
4132             set
4133             {
4134                 if (NUIApplication.IsUsingXaml)
4135                 {
4136                     SetValue(WidthSpecificationProperty, value);
4137                 }
4138                 else
4139                 {
4140                     SetInternalWidthSpecificationProperty(this, null, value);
4141                 }
4142                 NotifyPropertyChanged();
4143             }
4144         }
4145
4146         private int InternalWidthSpecification
4147         {
4148             get
4149             {
4150                 return widthPolicy;
4151             }
4152             set
4153             {
4154                 if (value == widthPolicy)
4155                     return;
4156
4157                 widthPolicy = value;
4158                 if (widthPolicy >= 0)
4159                 {
4160                     SizeWidth = widthPolicy;
4161                 }
4162                 layout?.RequestLayout();
4163             }
4164         }
4165
4166         ///<summary>
4167         /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
4168         ///</summary>
4169         /// <example>
4170         /// <code>
4171         /// // matchParentView matches its size to its parent size.
4172         /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
4173         /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
4174         ///
4175         /// // wrapContentView wraps its children with their desired size.
4176         /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
4177         /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
4178         ///
4179         /// // exactSizeView shows itself with an exact size.
4180         /// exactSizeView.WidthSpecification = 100;
4181         /// exactSizeView.HeightSpecification = 100;
4182         /// </code>
4183         /// </example>
4184         /// <since_tizen> 6 </since_tizen>
4185         [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
4186         public int HeightSpecification
4187         {
4188             get
4189             {
4190                 if (NUIApplication.IsUsingXaml)
4191                 {
4192                     return (int)GetValue(HeightSpecificationProperty);
4193                 }
4194                 else
4195                 {
4196                     return (int)GetInternalHeightSpecificationProperty(this);
4197                 }
4198             }
4199             set
4200             {
4201                 if (NUIApplication.IsUsingXaml)
4202                 {
4203                     SetValue(HeightSpecificationProperty, value);
4204                 }
4205                 else
4206                 {
4207                     SetInternalHeightSpecificationProperty(this, null, value);
4208                 }
4209                 NotifyPropertyChanged();
4210             }
4211         }
4212
4213         private int InternalHeightSpecification
4214         {
4215             get
4216             {
4217                 return heightPolicy;
4218             }
4219             set
4220             {
4221                 if (value == heightPolicy)
4222                     return;
4223
4224                 heightPolicy = value;
4225                 if (heightPolicy >= 0)
4226                 {
4227                     SizeHeight = heightPolicy;
4228                 }
4229                 layout?.RequestLayout();
4230             }
4231         }
4232
4233         ///<summary>
4234         /// Gets the List of transitions for this View.
4235         ///</summary>
4236         /// <since_tizen> 6 </since_tizen>
4237         public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
4238         {
4239             get
4240             {
4241                 if (layoutTransitions == null)
4242                 {
4243                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
4244                 }
4245                 return layoutTransitions;
4246             }
4247         }
4248
4249         ///<summary>
4250         /// Sets a layout transitions for this View.
4251         ///</summary>
4252         /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
4253         /// <remarks>
4254         /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
4255         /// </remarks>
4256         /// <since_tizen> 6 </since_tizen>
4257         public LayoutTransition LayoutTransition
4258         {
4259             get
4260             {
4261                 if (NUIApplication.IsUsingXaml)
4262                 {
4263                     return GetValue(LayoutTransitionProperty) as LayoutTransition;
4264                 }
4265                 else
4266                 {
4267                     return GetInternalLayoutTransitionProperty(this) as LayoutTransition;
4268                 }
4269             }
4270             set
4271             {
4272                 if (NUIApplication.IsUsingXaml)
4273                 {
4274                     SetValue(LayoutTransitionProperty, value);
4275                 }
4276                 else
4277                 {
4278                     SetInternalLayoutTransitionProperty(this, null, value);
4279                 }
4280                 NotifyPropertyChanged();
4281             }
4282         }
4283
4284         private LayoutTransition InternalLayoutTransition
4285         {
4286             get
4287             {
4288                 return layoutTransition;
4289             }
4290             set
4291             {
4292                 if (value == null)
4293                 {
4294                     throw new global::System.ArgumentNullException(nameof(value));
4295                 }
4296                 if (layoutTransitions == null)
4297                 {
4298                     layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
4299                 }
4300
4301                 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
4302
4303                 AttachTransitionsToChildren(value);
4304
4305                 layoutTransition = value;
4306             }
4307         }
4308
4309         /// <summary>
4310         /// This has been deprecated in API5 and will be removed in API8. Use Padding instead.
4311         /// </summary>
4312         /// <remarks>
4313         /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
4314         /// </remarks>
4315         /// <since_tizen> 4 </since_tizen>
4316         [Obsolete("This has been deprecated in API5 and will be removed in API8. Use Padding instead.")]
4317         [EditorBrowsable(EditorBrowsableState.Never)]
4318         public Extents PaddingEX
4319         {
4320             get
4321             {
4322                 if (NUIApplication.IsUsingXaml)
4323                 {
4324                     return GetValue(PaddingEXProperty) as Extents;
4325                 }
4326                 else
4327                 {
4328                     return GetInternalPaddingEXProperty(this) as Extents;
4329                 }
4330             }
4331             set
4332             {
4333                 if (NUIApplication.IsUsingXaml)
4334                 {
4335                     SetValue(PaddingEXProperty, value);
4336                 }
4337                 else
4338                 {
4339                     SetInternalPaddingEXProperty(this, null, value);
4340                 }
4341             }
4342         }
4343
4344         private Extents InternalPaddingEX
4345         {
4346             get
4347             {
4348                 Extents temp = new Extents(0, 0, 0, 0);
4349                 var pValue = GetProperty(View.Property.PADDING);
4350                 pValue.Get(temp);
4351                 pValue.Dispose();
4352                 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
4353                 temp.Dispose();
4354                 return ret;
4355             }
4356             set
4357             {
4358                 var temp = new Tizen.NUI.PropertyValue(value);
4359                 SetProperty(View.Property.PADDING, temp);
4360                 temp.Dispose();
4361                 NotifyPropertyChanged();
4362                 layout?.RequestLayout();
4363             }
4364         }
4365
4366         /// <summary>
4367         /// The Color of View. This is an RGBA value.
4368         /// Each RGBA components match as <see cref="ColorRed"/>, <see cref="ColorGreen"/>, <see cref="ColorBlue"/>, and <see cref="Opacity"/>.
4369         /// This property will multiply the final color of this view. (BackgroundColor, BorderlineColor, BackgroundImage, etc).
4370         /// For example, if view.BackgroundColor = Color.Yellow and view.Color = Color.Purple, this view will shown as Red.
4371         /// Inherient of color value depend on <see cref="ColorMode"/>.
4372         /// </summary>
4373         /// <remarks>
4374         /// <para>
4375         /// Animatable - This property can be animated using <c>Animation</c> class.
4376         /// </para>
4377         /// The property cascade chaining set is not recommended.
4378         /// </remarks>
4379         /// <example>
4380         /// This way is recommended for setting the property
4381         /// <code>
4382         /// var view = new View();
4383         /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
4384         /// </code>
4385         /// This way to set the property is prohibited
4386         /// <code>
4387         /// view.Color.A = 0.5f; //This does not guarantee a proper operation
4388         /// </code>
4389         /// </example>
4390         [EditorBrowsable(EditorBrowsableState.Never)]
4391         public Color Color
4392         {
4393             get
4394             {
4395                 if (NUIApplication.IsUsingXaml)
4396                 {
4397                     return (Color)GetValue(ColorProperty);
4398                 }
4399                 else
4400                 {
4401                     return (Color)GetInternalColorProperty(this);
4402                 }
4403
4404
4405             }
4406             set
4407             {
4408                 if (NUIApplication.IsUsingXaml)
4409                 {
4410                     SetValue(ColorProperty, value);
4411                 }
4412                 else
4413                 {
4414                     SetInternalColorProperty(this, null, value);
4415                 }
4416
4417
4418                 NotifyPropertyChanged();
4419             }
4420         }
4421
4422         /// <summary>
4423         /// The Red component of View.Color.
4424         /// </summary>
4425         /// <remarks>
4426         /// <para>
4427         /// Animatable - This property can be animated using <c>Animation</c> class.
4428         /// </para>
4429         /// </remarks>
4430         [EditorBrowsable(EditorBrowsableState.Never)]
4431         public float ColorRed
4432         {
4433             get
4434             {
4435                 if (NUIApplication.IsUsingXaml)
4436                 {
4437                     return (float)GetValue(ColorRedProperty);
4438                 }
4439                 else
4440                 {
4441                     return (float)GetInternalColorRedProperty(this);
4442                 }
4443
4444
4445             }
4446             set
4447             {
4448                 if (NUIApplication.IsUsingXaml)
4449                 {
4450                     SetValue(ColorRedProperty, value);
4451                 }
4452                 else
4453                 {
4454                     SetInternalColorRedProperty(this, null, value);
4455                 }
4456
4457
4458                 NotifyPropertyChanged();
4459             }
4460         }
4461
4462         /// <summary>
4463         /// The Green component of View.Color.
4464         /// </summary>
4465         /// <remarks>
4466         /// <para>
4467         /// Animatable - This property can be animated using <c>Animation</c> class.
4468         /// </para>
4469         /// </remarks>
4470         [EditorBrowsable(EditorBrowsableState.Never)]
4471         public float ColorGreen
4472         {
4473             get
4474             {
4475                 if (NUIApplication.IsUsingXaml)
4476                 {
4477                     return (float)GetValue(ColorGreenProperty);
4478                 }
4479                 else
4480                 {
4481                     return (float)GetInternalColorGreenProperty(this);
4482                 }
4483
4484
4485             }
4486             set
4487             {
4488                 if (NUIApplication.IsUsingXaml)
4489                 {
4490                     SetValue(ColorGreenProperty, value);
4491                 }
4492                 else
4493                 {
4494                     SetInternalColorGreenProperty(this, null, value);
4495                 }
4496
4497
4498                 NotifyPropertyChanged();
4499             }
4500         }
4501
4502         /// <summary>
4503         /// The Blue component of View.Color.
4504         /// </summary>
4505         /// <remarks>
4506         /// <para>
4507         /// Animatable - This property can be animated using <c>Animation</c> class.
4508         /// </para>
4509         /// </remarks>
4510         [EditorBrowsable(EditorBrowsableState.Never)]
4511         public float ColorBlue
4512         {
4513             get
4514             {
4515                 if (NUIApplication.IsUsingXaml)
4516                 {
4517                     return (float)GetValue(ColorBlueProperty);
4518                 }
4519                 else
4520                 {
4521                     return (float)GetInternalColorBlueProperty(this);
4522                 }
4523
4524
4525             }
4526             set
4527             {
4528                 if (NUIApplication.IsUsingXaml)
4529                 {
4530                     SetValue(ColorBlueProperty, value);
4531                 }
4532                 else
4533                 {
4534                     SetInternalColorBlueProperty(this, null, value);
4535                 }
4536
4537
4538                 NotifyPropertyChanged();
4539             }
4540         }
4541
4542         /// <summary>
4543         /// Set the layout on this View. Replaces any existing Layout.
4544         /// </summary>
4545         /// <remarks>
4546         /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
4547         /// </remarks>
4548         /// <since_tizen> 6 </since_tizen>
4549         public LayoutItem Layout
4550         {
4551             get
4552             {
4553                 if (NUIApplication.IsUsingXaml)
4554                 {
4555                     return GetValue(LayoutProperty) as LayoutItem;
4556                 }
4557                 else
4558                 {
4559                     return GetInternalLayoutProperty(this) as LayoutItem;
4560                 }
4561             }
4562             set
4563             {
4564                 if (NUIApplication.IsUsingXaml)
4565                 {
4566                     SetValue(LayoutProperty, value);
4567                 }
4568                 else
4569                 {
4570                     SetInternalLayoutProperty(this, null, value);
4571                 }
4572             }
4573         }
4574
4575         private LayoutItem InternalLayout
4576         {
4577             get
4578             {
4579                 return layout;
4580             }
4581             set
4582             {
4583                 // Do nothing if layout provided is already set on this View.
4584                 if (value == layout)
4585                 {
4586                     return;
4587                 }
4588
4589                 LayoutingDisabled = false;
4590                 layoutSet = true;
4591
4592                 // If new layout being set already has a owner then that owner receives a replacement default layout.
4593                 // First check if the layout to be set already has a owner.
4594                 if (value?.Owner != null)
4595                 {
4596                     // Previous owner of the layout gets a default layout as a replacement.
4597                     value.Owner.Layout = new AbsoluteLayout()
4598                     {
4599                         // Copy Margin and Padding to replacement LayoutGroup.
4600                         Margin = value.Margin,
4601                         Padding = value.Padding,
4602                     };
4603                 }
4604
4605                 // Copy Margin and Padding to new layout being set or restore padding and margin back to
4606                 // View if no replacement. Previously margin and padding values would have been moved from
4607                 // the View to the layout.
4608                 if (layout != null) // Existing layout
4609                 {
4610                     if (value != null)
4611                     {
4612                         // Existing layout being replaced so copy over margin and padding values.
4613                         value.Margin = layout.Margin;
4614                         value.Padding = layout.Padding;
4615                         value.SetPositionByLayout = !excludeLayouting;
4616                     }
4617                     else
4618                     {
4619                         // Layout not being replaced so restore margin and padding to View.
4620                         SetValue(MarginProperty, layout.Margin);
4621                         SetValue(PaddingProperty, layout.Padding);
4622                         NotifyPropertyChanged();
4623                     }
4624                 }
4625                 else
4626                 {
4627                     // First Layout to be added to the View hence copy
4628
4629                     // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
4630                     if (value != null)
4631                     {
4632                         Extents margin = Margin;
4633                         Extents padding = Padding;
4634                         bool setMargin = false;
4635                         bool setPadding = false;
4636
4637                         if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
4638                         {
4639                             // If View already has a margin set then store it in Layout instead.
4640                             value.Margin = margin;
4641                             SetValue(MarginProperty, new Extents(0, 0, 0, 0));
4642                             setMargin = true;
4643                         }
4644
4645                         // The calculation of the native size of the text component requires padding.
4646                         // Don't overwrite the zero padding.
4647                         bool isTextLayout = (value is Tizen.NUI.BaseComponents.TextLabel.TextLabelLayout) ||
4648                                             (value is Tizen.NUI.BaseComponents.TextField.TextFieldLayout) ||
4649                                             (value is Tizen.NUI.BaseComponents.TextEditor.TextEditorLayout);
4650
4651                         if (!isTextLayout && (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0))
4652                         {
4653                             // If View already has a padding set then store it in Layout instead.
4654                             value.Padding = padding;
4655                             SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
4656                             setPadding = true;
4657                         }
4658
4659                         if (setMargin || setPadding)
4660                         {
4661                             NotifyPropertyChanged();
4662                         }
4663
4664                         value.SetPositionByLayout = !excludeLayouting;
4665                     }
4666                 }
4667
4668                 // Remove existing layout from it's parent layout group.
4669                 layout?.Unparent();
4670
4671                 // Set layout to this view
4672                 SetLayout(value);
4673             }
4674         }
4675
4676         /// <summary>
4677         /// The weight of the View, used to share available space in a layout with siblings.
4678         /// </summary>
4679         /// <since_tizen> 6 </since_tizen>
4680         public float Weight
4681         {
4682             get
4683             {
4684                 return weight;
4685             }
4686             set
4687             {
4688                 weight = value;
4689                 layout?.RequestLayout();
4690             }
4691         }
4692
4693         /// <summary>
4694         ///  Whether to load the BackgroundImage synchronously.
4695         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
4696         ///  Note: For Normal Quad images only.
4697         /// </summary>
4698         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
4699         [EditorBrowsable(EditorBrowsableState.Never)]
4700         public bool BackgroundImageSynchronosLoading
4701         {
4702             get
4703             {
4704                 if (NUIApplication.IsUsingXaml)
4705                 {
4706                     return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
4707                 }
4708                 else
4709                 {
4710                     return (bool)GetInternalBackgroundImageSynchronosLoadingProperty(this);
4711                 }
4712             }
4713             set
4714             {
4715                 if (NUIApplication.IsUsingXaml)
4716                 {
4717                     SetValue(BackgroundImageSynchronosLoadingProperty, value);
4718                 }
4719                 else
4720                 {
4721                     SetInternalBackgroundImageSynchronosLoadingProperty(this, null, value);
4722                 }
4723                 NotifyPropertyChanged();
4724             }
4725         }
4726
4727         private bool InternalBackgroundImageSynchronosLoading
4728         {
4729             get
4730             {
4731                 return BackgroundImageSynchronousLoading;
4732             }
4733             set
4734             {
4735                 BackgroundImageSynchronousLoading = value;
4736             }
4737         }
4738
4739         /// <summary>
4740         ///  Whether to load the BackgroundImage synchronously.
4741         ///  If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
4742         ///  Note: For Normal Quad images only.
4743         /// </summary>
4744         /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
4745         [EditorBrowsable(EditorBrowsableState.Never)]
4746         public bool BackgroundImageSynchronousLoading
4747         {
4748             get
4749             {
4750                 if (NUIApplication.IsUsingXaml)
4751                 {
4752                     return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
4753                 }
4754                 else
4755                 {
4756                     return (bool)GetInternalBackgroundImageSynchronousLoadingProperty(this);
4757                 }
4758             }
4759             set
4760             {
4761                 if (NUIApplication.IsUsingXaml)
4762                 {
4763                     SetValue(BackgroundImageSynchronousLoadingProperty, value);
4764                 }
4765                 else
4766                 {
4767                     SetInternalBackgroundImageSynchronousLoadingProperty(this, null, value);
4768                 }
4769                 NotifyPropertyChanged();
4770             }
4771         }
4772
4773         private bool InternalBackgroundImageSynchronousLoading
4774         {
4775             get
4776             {
4777                 return backgroundImageSynchronousLoading;
4778             }
4779             set
4780             {
4781                 backgroundImageSynchronousLoading = value;
4782
4783                 if (!string.IsNullOrEmpty(BackgroundImage))
4784                 {
4785                     PropertyMap bgMap = this.Background;
4786                     var temp = new PropertyValue(backgroundImageSynchronousLoading);
4787                     bgMap[ImageVisualProperty.SynchronousLoading] = temp;
4788                     temp.Dispose();
4789                     Background = bgMap;
4790                 }
4791             }
4792         }
4793
4794         /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
4795         [EditorBrowsable(EditorBrowsableState.Never)]
4796         public Vector4 UpdateAreaHint
4797         {
4798             get
4799             {
4800                 if (NUIApplication.IsUsingXaml)
4801                 {
4802                     return (Vector4)GetValue(UpdateAreaHintProperty);
4803                 }
4804                 else
4805                 {
4806                     return (Vector4)GetInternalUpdateAreaHintProperty(this);
4807                 }
4808             }
4809             set
4810             {
4811                 if (NUIApplication.IsUsingXaml)
4812                 {
4813                     SetValue(UpdateAreaHintProperty, value);
4814                 }
4815                 else
4816                 {
4817                     SetInternalUpdateAreaHintProperty(this, null, value);
4818                 }
4819                 NotifyPropertyChanged();
4820             }
4821         }
4822
4823         /// <summary>
4824         /// Enable/Disable ControlState propagation for children.
4825         /// It is false by default.
4826         /// If the View needs to share ControlState with descendants, please set it true.
4827         /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
4828         /// </summary>
4829         [EditorBrowsable(EditorBrowsableState.Never)]
4830         public bool EnableControlStatePropagation
4831         {
4832             get
4833             {
4834                 if (NUIApplication.IsUsingXaml)
4835                 {
4836                     return (bool)GetValue(EnableControlStatePropagationProperty);
4837                 }
4838                 else
4839                 {
4840                     return (bool)GetInternalEnableControlStatePropagationProperty(this);
4841                 }
4842             }
4843             set
4844             {
4845                 if (NUIApplication.IsUsingXaml)
4846                 {
4847                     SetValue(EnableControlStatePropagationProperty, value);
4848                 }
4849                 else
4850                 {
4851                     SetInternalEnableControlStatePropagationProperty(this, null, value);
4852                 }
4853                 NotifyPropertyChanged();
4854             }
4855         }
4856
4857         private bool InternalEnableControlStatePropagation
4858         {
4859             get => themeData?.ControlStatePropagation ?? false;
4860             set
4861             {
4862                 if (InternalEnableControlStatePropagation == value) return;
4863
4864                 if (themeData == null) themeData = new ThemeData();
4865
4866                 themeData.ControlStatePropagation = value;
4867
4868                 foreach (View child in Children)
4869                 {
4870                     child.EnableControlStatePropagation = value;
4871                 }
4872             }
4873         }
4874
4875         /// <summary>
4876         /// The ControlStates can propagate from the parent.
4877         /// Listed ControlStates will be accepted propagation of the parent ControlState changes
4878         /// if parent view EnableControlState is true.
4879         /// <see cref="EnableControlState"/>.
4880         /// Default is ControlState.All, so every ControlStates will be propagated from the parent.
4881         /// </summary>
4882         [EditorBrowsable(EditorBrowsableState.Never)]
4883         public ControlState PropagatableControlStates
4884         {
4885             get
4886             {
4887                 if (NUIApplication.IsUsingXaml)
4888                 {
4889                     return (ControlState)GetValue(PropagatableControlStatesProperty);
4890                 }
4891                 else
4892                 {
4893                     return (ControlState)GetInternalPropagatableControlStatesProperty(this);
4894                 }
4895             }
4896             set
4897             {
4898                 if (NUIApplication.IsUsingXaml)
4899                 {
4900                     SetValue(PropagatableControlStatesProperty, value);
4901                 }
4902                 else
4903                 {
4904                     SetInternalPropagatableControlStatesProperty(this, null, value);
4905                 }
4906                 NotifyPropertyChanged();
4907             }
4908         }
4909
4910         private ControlState InternalPropagatableControlStates
4911         {
4912             get => propagatableControlStates;
4913             set => propagatableControlStates = value;
4914         }
4915
4916         /// <summary>
4917         /// By default, it is false in View, true in Control.
4918         /// Note that if the value is true, the View will be a touch receptor.
4919         /// </summary>
4920         [EditorBrowsable(EditorBrowsableState.Never)]
4921         public bool EnableControlState
4922         {
4923             get
4924             {
4925                 if (NUIApplication.IsUsingXaml)
4926                 {
4927                     return (bool)GetValue(EnableControlStateProperty);
4928                 }
4929                 else
4930                 {
4931                     return (bool)GetInternalEnableControlStateProperty(this);
4932                 }
4933             }
4934             set
4935             {
4936                 if (NUIApplication.IsUsingXaml)
4937                 {
4938                     SetValue(EnableControlStateProperty, value);
4939                 }
4940                 else
4941                 {
4942                     SetInternalEnableControlStateProperty(this, null, value);
4943                 }
4944             }
4945         }
4946
4947         /// <summary>
4948         /// Whether the actor grab all touches even if touch leaves its boundary.
4949         /// </summary>
4950         /// <returns>true, if it grab all touch after start</returns>
4951         [EditorBrowsable(EditorBrowsableState.Never)]
4952         public bool GrabTouchAfterLeave
4953         {
4954             get
4955             {
4956                 if (NUIApplication.IsUsingXaml)
4957                 {
4958                     return (bool)GetValue(GrabTouchAfterLeaveProperty);
4959                 }
4960                 else
4961                 {
4962                     return (bool)GetInternalGrabTouchAfterLeaveProperty(this);
4963                 }
4964             }
4965             set
4966             {
4967                 if (NUIApplication.IsUsingXaml)
4968                 {
4969                     SetValue(GrabTouchAfterLeaveProperty, value);
4970                 }
4971                 else
4972                 {
4973                     SetInternalGrabTouchAfterLeaveProperty(this, null, value);
4974                 }
4975             }
4976         }
4977
4978         private bool InternalGrabTouchAfterLeave
4979         {
4980             get
4981             {
4982                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart);
4983             }
4984             set
4985             {
4986                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value);
4987
4988                 // Use custom HitTest callback only if GrabTouchAfterLeave is true.
4989                 if (value)
4990                 {
4991                     RegisterHitTestCallback();
4992                 }
4993                 else
4994                 {
4995                     UnregisterHitTestCallback();
4996                 }
4997
4998                 NotifyPropertyChanged();
4999             }
5000         }
5001
5002         /// <summary>
5003         /// Whether the view will only receive own touch.
5004         /// </summary>
5005         /// <returns>true, if it only receives touches that started from itself.</returns>
5006         [EditorBrowsable(EditorBrowsableState.Never)]
5007         public bool AllowOnlyOwnTouch
5008         {
5009             get
5010             {
5011                 if (NUIApplication.IsUsingXaml)
5012                 {
5013                     return (bool)GetValue(AllowOnlyOwnTouchProperty);
5014                 }
5015                 else
5016                 {
5017                     return (bool)GetInternalAllowOnlyOwnTouchProperty(this);
5018                 }
5019             }
5020             set
5021             {
5022                 if (NUIApplication.IsUsingXaml)
5023                 {
5024                     SetValue(AllowOnlyOwnTouchProperty, value);
5025                 }
5026                 else
5027                 {
5028                     SetInternalAllowOnlyOwnTouchProperty(this, null, value);
5029                 }
5030             }
5031         }
5032
5033         private bool InternalAllowOnlyOwnTouch
5034         {
5035             get
5036             {
5037                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch);
5038             }
5039             set
5040             {
5041                 Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value);
5042                 NotifyPropertyChanged();
5043             }
5044         }
5045
5046         /// <summary>
5047         /// Determines which blend equation will be used to render renderers of this actor.
5048         /// </summary>
5049         /// <returns>blend equation enum currently assigned</returns>
5050         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
5051         [EditorBrowsable(EditorBrowsableState.Never)]
5052         public BlendEquationType BlendEquation
5053         {
5054             get
5055             {
5056                 if (NUIApplication.IsUsingXaml)
5057                 {
5058                     return (BlendEquationType)GetValue(BlendEquationProperty);
5059                 }
5060                 else
5061                 {
5062                     return (BlendEquationType)GetInternalBlendEquationProperty(this);
5063                 }
5064             }
5065             set
5066             {
5067                 if (NUIApplication.IsUsingXaml)
5068                 {
5069                     SetValue(BlendEquationProperty, value);
5070                 }
5071                 else
5072                 {
5073                     SetInternalBlendEquationProperty(this, null, value);
5074                 }
5075             }
5076         }
5077
5078         private BlendEquationType InternalBlendEquation
5079         {
5080             get
5081             {
5082                 return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation);
5083             }
5084             set
5085             {
5086                 Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value);
5087                 NotifyPropertyChanged();
5088             }
5089         }
5090
5091         /// <summary>
5092         /// If the value is true, the View will change its style as the theme changes.
5093         /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
5094         /// </summary>
5095         /// <since_tizen> 9 </since_tizen>
5096         public bool ThemeChangeSensitive
5097         {
5098             get
5099             {
5100                 if (NUIApplication.IsUsingXaml)
5101                 {
5102                     return (bool)GetValue(ThemeChangeSensitiveProperty);
5103                 }
5104                 else
5105                 {
5106                     return (bool)GetInternalThemeChangeSensitiveProperty(this);
5107                 }
5108             }
5109             set
5110             {
5111                 if (NUIApplication.IsUsingXaml)
5112                 {
5113                     SetValue(ThemeChangeSensitiveProperty, value);
5114                 }
5115                 else
5116                 {
5117                     SetInternalThemeChangeSensitiveProperty(this, null, value);
5118                 }
5119             }
5120         }
5121
5122         /// <summary>
5123         /// Create Style, it is abstract function and must be override.
5124         /// </summary>
5125         [EditorBrowsable(EditorBrowsableState.Never)]
5126         protected virtual ViewStyle CreateViewStyle()
5127         {
5128             return new ViewStyle();
5129         }
5130
5131         /// <summary>
5132         /// Called after the View's ControlStates changed.
5133         /// </summary>
5134         /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
5135         [EditorBrowsable(EditorBrowsableState.Never)]
5136         protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
5137         {
5138         }
5139
5140         /// <summary>
5141         /// </summary>
5142         [EditorBrowsable(EditorBrowsableState.Never)]
5143         protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
5144         {
5145             isThemeChanged = true;
5146             if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
5147             else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
5148             isThemeChanged = false;
5149         }
5150
5151         /// <summary>
5152         /// Apply style instance to the view.
5153         /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
5154         /// </summary>
5155         /// <since_tizen> 9 </since_tizen>
5156         public virtual void ApplyStyle(ViewStyle viewStyle)
5157         {
5158             if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
5159
5160             if (themeData == null) themeData = new ThemeData();
5161
5162             themeData.viewStyle = viewStyle;
5163
5164             if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
5165             {
5166                 // Nothing to apply
5167                 return;
5168             }
5169
5170             BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
5171
5172             if (bindablePropertyOfView == null)
5173             {
5174                 return;
5175             }
5176
5177             var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
5178             viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
5179
5180             foreach (var sourceProperty in dirtyStyleProperties)
5181             {
5182                 var sourceValue = viewStyle.GetValue(sourceProperty);
5183
5184                 if (sourceValue == null)
5185                 {
5186                     continue;
5187                 }
5188
5189                 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
5190
5191                 // Do not set value again when theme is changed and the value has been set already.
5192                 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
5193                 {
5194                     continue;
5195                 }
5196
5197                 if (destinationProperty != null)
5198                 {
5199                     InternalSetValue(destinationProperty, sourceValue);
5200                 }
5201             }
5202         }
5203
5204         /// <summary>
5205         /// Get whether the View is culled or not.
5206         /// True means that the View is out of the view frustum.
5207         /// </summary>
5208         /// <remarks>
5209         /// Hidden-API (Inhouse-API).
5210         /// </remarks>
5211         [EditorBrowsable(EditorBrowsableState.Never)]
5212         public bool Culled
5213         {
5214             get
5215             {
5216                 return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled);
5217             }
5218         }
5219
5220         /// <summary>
5221         /// Set or Get TransitionOptions for the page transition.
5222         /// This property is used to define how this view will be transitioned during Page switching.
5223         /// </summary>
5224         /// <since_tizen> 9 </since_tizen>
5225         public TransitionOptions TransitionOptions
5226         {
5227             get
5228             {
5229                 if (NUIApplication.IsUsingXaml)
5230                 {
5231                     return GetValue(TransitionOptionsProperty) as TransitionOptions;
5232                 }
5233                 else
5234                 {
5235                     return GetInternalTransitionOptionsProperty(this) as TransitionOptions;
5236                 }
5237             }
5238             set
5239             {
5240                 if (NUIApplication.IsUsingXaml)
5241                 {
5242                     SetValue(TransitionOptionsProperty, value);
5243                 }
5244                 else
5245                 {
5246                     SetInternalTransitionOptionsProperty(this, null, value);
5247                 }
5248                 NotifyPropertyChanged();
5249             }
5250         }
5251
5252         private TransitionOptions InternalTransitionOptions
5253         {
5254             set
5255             {
5256                 transitionOptions = value;
5257             }
5258             get
5259             {
5260                 return transitionOptions;
5261             }
5262         }
5263
5264         /// <summary>
5265         /// Called when the view is hit through TouchEvent or GestureEvent.
5266         /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
5267         /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
5268         /// User can override whether hit or not in HitTest.
5269         /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
5270         /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
5271         /// </summary>
5272         // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
5273         [EditorBrowsable(EditorBrowsableState.Never)]
5274         protected virtual bool HitTest(Touch touch)
5275         {
5276             return true;
5277         }
5278
5279         /// <summary>
5280         /// Retrieve the View's current Color.
5281         /// </summary>
5282         /// <remarks>
5283         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
5284         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
5285         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
5286         /// and users can get the current actual values through them.
5287         /// </remarks>
5288         [EditorBrowsable(EditorBrowsableState.Never)]
5289         public Color CurrentColor => GetCurrentColor();
5290
5291         /// <summary>
5292         /// Retrieve the current scale factor applied to the View.
5293         /// </summary>
5294         /// <remarks>
5295         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
5296         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
5297         /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
5298         /// and users can get the current actual values through them.
5299         /// </remarks>
5300         [EditorBrowsable(EditorBrowsableState.Never)]
5301         public Vector3 CurrentScale => GetCurrentScale();
5302
5303         /// <summary>
5304         /// Gets the number of currently alived View object.
5305         /// </summary>
5306         [EditorBrowsable(EditorBrowsableState.Never)]
5307         public static int AliveCount => aliveCount;
5308
5309         /// <summary>
5310         /// Voice interaction name for voice touch.
5311         /// </summary>
5312         [EditorBrowsable(EditorBrowsableState.Never)]
5313         public string VoiceInteractionName
5314         {
5315             set
5316             {
5317                 AutomationId = value;
5318             }
5319             get
5320             {
5321                 return AutomationId;
5322             }
5323         }
5324     }
5325 }