2 * Copyright(c) 2022 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using System.Runtime.InteropServices;
21 using Tizen.NUI.Binding;
23 namespace Tizen.NUI.BaseComponents
26 /// View is the base class for all views.
28 /// <since_tizen> 3 </since_tizen>
29 public partial class View : Container, IResourcesProvider
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;
36 internal BackgroundExtraData backgroundExtraData;
38 private bool layoutSet = false;
39 private LayoutItem layout; // Exclusive layout assigned to this View.
41 // List of transitions paired with the condition that uses the transition.
42 private Dictionary<TransitionCondition, TransitionList> layoutTransitions;
43 private int widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
44 private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
45 private float weight = 0.0f; // Weighting of child View in a Layout
46 private bool backgroundImageSynchronousLoading = false;
47 private bool excludeLayouting = false;
48 private LayoutTransition layoutTransition;
49 private TransitionOptions transitionOptions = null;
50 private ThemeData themeData;
51 private bool isThemeChanged = false;
53 // List of constraints
54 private Constraint widthConstraint = null;
55 private Constraint heightConstraint = null;
57 private Size2D internalMaximumSize = null;
58 private Size2D internalMinimumSize = null;
59 private Extents internalMargin = null;
60 private Extents internalPadding = null;
61 private Vector3 internalSizeModeFactor = null;
62 private Vector2 internalCellIndex = null;
63 private Color internalBackgroundColor = null;
64 private Color internalColor = null;
65 private Position internalPivotPoint = null;
66 private Position internalPosition = null;
67 private Position2D internalPosition2D = null;
68 private Vector3 internalScale = null;
69 private Size internalSize = null;
70 private Size2D internalSize2D = null;
71 private int layoutCount = 0;
75 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
76 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
77 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
78 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
80 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
81 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
82 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
83 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
85 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
86 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
87 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
88 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
90 RegisterAccessibilityDelegate();
94 /// Creates a new instance of a view.
96 /// <since_tizen> 3 </since_tizen>
97 public View() : this(Interop.View.New(), true)
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
103 [EditorBrowsable(EditorBrowsableState.Never)]
104 public View(ViewStyle viewStyle) : this(Interop.View.New(), true, viewStyle)
109 /// Create a new instance of a View with setting the status of shown or hidden.
111 /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
112 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
113 [EditorBrowsable(EditorBrowsableState.Never)]
114 public View(bool shown) : this(Interop.View.New(), true)
116 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120 internal View(View uiControl, bool shown = true) : this(Interop.View.NewView(View.getCPtr(uiControl)), true)
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 backgroundExtraData = uiControl.backgroundExtraData == null ? null : new BackgroundExtraData(uiControl.backgroundExtraData);
131 internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
133 InitializeStyle(viewStyle);
136 internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn)
140 PositionUsesPivotPoint = false;
143 onWindowSendEventCallback = SendViewAddedEventToWindow;
144 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(SwigCPtr), false);
145 signal?.Connect(onWindowSendEventCallback);
147 hitTestResultDataCallback = OnHitTestResult;
148 using TouchDataSignal touchDataSignal = new TouchDataSignal(Interop.ActorSignal.ActorHitTestResultSignal(SwigCPtr), false);
149 touchDataSignal?.Connect(hitTestResultDataCallback);
156 GrabTouchAfterLeave = defaultGrabTouchAfterLeave;
159 internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170 /// The event that is triggered when the View's ControlState is changed.
172 [EditorBrowsable(EditorBrowsableState.Never)]
173 public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
175 internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
179 /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
181 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
182 [EditorBrowsable(EditorBrowsableState.Never)]
183 public bool LayoutSet
192 /// Flag to allow Layouting to be disabled for Views.
193 /// Once a View has a Layout set then any children added to Views from then on will receive
194 /// automatic Layouts.
196 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
197 [EditorBrowsable(EditorBrowsableState.Never)]
198 public static bool LayoutingDisabled { get; set; } = true;
201 /// If set to true, the <see cref="GrabTouchAfterLeave"/> property value is set to true when all Views are created.
203 /// <param name="enable">Sets value of GrabTouchAfterLeave property</param>
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 public static void SetDefaultGrabTouchAfterLeave(bool enable)
207 defaultGrabTouchAfterLeave = enable;
211 /// Deprecate. Please do not use this.
212 /// The style instance applied to this view.
213 /// Note that please do not modify the ViewStyle.
214 /// Modifying ViewStyle will affect other views with same ViewStyle.
216 [EditorBrowsable(EditorBrowsableState.Never)]
217 protected ViewStyle ViewStyle
221 if (themeData == null) themeData = new ThemeData();
223 if (themeData.viewStyle == null)
225 ApplyStyle(CreateViewStyle());
227 return themeData.viewStyle;
232 /// Get/Set the control state.
233 /// Note that the ControlState only available for the classes derived from Control.
234 /// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
235 /// please set <see cref="EnableControlState"/> to true.
237 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public ControlState ControlState
243 return themeData == null ? ControlState.Normal : themeData.controlStates;
247 if (ControlState == value)
252 var prevState = ControlState;
254 if (themeData == null) themeData = new ThemeData();
255 themeData.controlStates = value;
257 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
259 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
261 if (themeData.ControlStatePropagation)
263 foreach (View child in Children)
265 child.ControlState = value;
269 OnControlStateChanged(changeInfo);
271 ControlStateChangedEvent?.Invoke(this, changeInfo);
276 /// Gets / Sets the status of whether the view is excluded from its parent's layouting or not.
278 /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
279 [EditorBrowsable(EditorBrowsableState.Never)]
280 public bool ExcludeLayouting
284 return (bool)GetValue(ExcludeLayoutingProperty);
288 SetValue(ExcludeLayoutingProperty, value);
289 NotifyPropertyChanged();
293 private bool InternalExcludeLayouting
297 return excludeLayouting;
301 excludeLayouting = value;
302 if (Layout != null && Layout.SetPositionByLayout == value)
304 Layout.SetPositionByLayout = !value;
305 Layout.RequestLayout();
311 /// The StyleName, type string.
312 /// The value indicates DALi style name defined in json theme file.
314 /// <since_tizen> 3 </since_tizen>
315 public string StyleName
319 return (string)GetValue(StyleNameProperty);
323 SetValue(StyleNameProperty, value);
324 NotifyPropertyChanged();
329 /// The KeyInputFocus, type bool.
331 [EditorBrowsable(EditorBrowsableState.Never)]
332 public bool KeyInputFocus
336 return (bool)GetValue(KeyInputFocusProperty);
340 SetValue(KeyInputFocusProperty, value);
341 NotifyPropertyChanged();
346 /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
350 /// The property cascade chaining set is not recommended.
353 /// Animatable - This property can be animated using <c>Animation</c> class.
355 /// animation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
360 /// This way is recommended for setting the property
362 /// var view = new View();
363 /// view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
365 /// This way to set the property is prohibited
367 /// view.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
370 /// <since_tizen> 3 </since_tizen>
371 public Color BackgroundColor
375 return (Color)GetValue(BackgroundColorProperty);
379 SetValue(BackgroundColorProperty, value);
380 NotifyPropertyChanged();
385 /// The mutually exclusive with "backgroundColor" and "background" type Map.
387 /// <since_tizen> 3 </since_tizen>
388 public string BackgroundImage
392 return (string)GetValue(BackgroundImageProperty);
396 SetValue(BackgroundImageProperty, value);
397 NotifyPropertyChanged();
402 /// Get or set the border of background image.
404 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public Rectangle BackgroundImageBorder
410 return (Rectangle)GetValue(BackgroundImageBorderProperty);
414 SetValue(BackgroundImageBorderProperty, value);
415 NotifyPropertyChanged();
420 /// The background of view.
422 /// <since_tizen> 3 </since_tizen>
423 public Tizen.NUI.PropertyMap Background
427 return (PropertyMap)GetValue(BackgroundProperty);
431 SetValue(BackgroundProperty, value);
432 NotifyPropertyChanged();
437 /// Describes a shadow as an image for a View.
438 /// It is null by default.
441 /// Getter returns copied instance of current shadow.
444 /// The mutually exclusive with "BoxShadow".
448 /// Animatable - This property can be animated using <c>Animation</c> class.
449 /// To animate this property, specify a sub-property with separator ".", for example, "ImageShadow.Offset".
451 /// animation.AnimateTo(view, "ImageShadow.Offset", new Vector2(10, 10));
453 /// Animatable sub-property : Offset.
456 [EditorBrowsable(EditorBrowsableState.Never)]
457 public ImageShadow ImageShadow
461 return (ImageShadow)GetValue(ImageShadowProperty);
465 SetValue(ImageShadowProperty, value);
466 NotifyPropertyChanged();
471 /// Describes a box shaped shadow drawing for a View.
472 /// It is null by default.
475 /// The mutually exclusive with "ImageShadow".
479 /// Animatable - This property can be animated using <c>Animation</c> class.
480 /// To animate this property, specify a sub-property with separator ".", for example, "BoxShadow.BlurRadius".
482 /// animation.AnimateTo(view, "BoxShadow.BlurRadius", 10.0f);
484 /// Animatable sub-property : Offset, Color, BlurRadius.
487 /// <since_tizen> 9 </since_tizen>
488 public Shadow BoxShadow
492 return (Shadow)GetValue(BoxShadowProperty);
496 SetValue(BoxShadowProperty, value);
497 NotifyPropertyChanged();
502 /// The radius for the rounded corners of the View.
503 /// This will rounds background and shadow edges.
504 /// 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).
505 /// Each radius will clamp internally to the half of smaller of the view's width or height.
506 /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
510 /// Animatable - This property can be animated using <c>Animation</c> class.
512 /// animation.AnimateTo(view, "CornerRadius", new Vector4(10, 10, 10, 10));
516 /// <since_tizen> 9 </since_tizen>
517 public Vector4 CornerRadius
521 return (Vector4)GetValue(CornerRadiusProperty);
525 SetValue(CornerRadiusProperty, value);
526 NotifyPropertyChanged();
531 /// Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units).
532 /// It is absolute by default.
533 /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
535 /// <since_tizen> 9 </since_tizen>
536 public VisualTransformPolicyType CornerRadiusPolicy
538 get => (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
539 set => SetValue(CornerRadiusPolicyProperty, value);
543 /// The width for the borderline of the View.
547 /// Animatable - This property can be animated using <c>Animation</c> class.
549 /// animation.AnimateTo(view, "BorderlineWidth", 100.0f);
552 /// Note that, an image background may not have borderline if it uses the Border property.
554 /// <since_tizen> 9 </since_tizen>
555 public float BorderlineWidth
559 return (float)GetValue(BorderlineWidthProperty);
563 SetValue(BorderlineWidthProperty, value);
564 NotifyPropertyChanged();
569 /// The color for the borderline of the View.
570 /// It is Color.Black by default.
574 /// Animatable - This property can be animated using <c>Animation</c> class.
576 /// animation.AnimateTo(view, "BorderlineColor", new Color(r, g, b, a));
580 /// <since_tizen> 9 </since_tizen>
581 public Color BorderlineColor
585 return (Color)GetValue(BorderlineColorProperty);
589 SetValue(BorderlineColorProperty, value);
590 NotifyPropertyChanged();
595 /// The Relative offset for the borderline of the View.
596 /// Recommended range : [-1.0f to 1.0f].
597 /// If -1.0f, draw borderline inside of the View.
598 /// If 1.0f, draw borderline outside of the View.
599 /// If 0.0f, draw borderline half inside and half outside.
600 /// It is 0.0f by default.
604 /// Animatable - This property can be animated using <c>Animation</c> class.
606 /// animation.AnimateTo(view, "BorderlineOffset", -1.0f);
610 /// <since_tizen> 9 </since_tizen>
611 public float BorderlineOffset
615 return (float)GetValue(BorderlineOffsetProperty);
619 SetValue(BorderlineOffsetProperty, value);
620 NotifyPropertyChanged();
625 /// The current state of the view.
627 /// <since_tizen> 3 </since_tizen>
632 return (States)GetValue(StateProperty);
636 SetValue(StateProperty, value);
637 NotifyPropertyChanged();
642 /// The current sub state of the view.
644 /// <since_tizen> 3 </since_tizen>
645 public States SubState
649 return (States)GetValue(SubStateProperty);
653 SetValue(SubStateProperty, value);
654 NotifyPropertyChanged();
659 /// Displays a tooltip
661 /// <since_tizen> 3 </since_tizen>
662 public Tizen.NUI.PropertyMap Tooltip
666 return (PropertyMap)GetValue(TooltipProperty);
670 SetValue(TooltipProperty, value);
671 NotifyPropertyChanged();
676 /// Displays a tooltip as a text.
678 /// <since_tizen> 3 </since_tizen>
679 public string TooltipText
683 return GetValue(TooltipTextProperty) as string;
687 SetValue(TooltipTextProperty, value);
691 private string InternalTooltipText
695 using (var propertyValue = GetProperty(Property.TOOLTIP))
697 if (propertyValue != null && propertyValue.Get(out string retrivedValue))
699 return retrivedValue;
701 NUILog.Error($"[ERROR] Fail to get TooltipText! Return error MSG (error to get TooltipText)!");
702 return "error to get TooltipText";
707 var temp = new Tizen.NUI.PropertyValue(value);
708 SetProperty(View.Property.TOOLTIP, temp);
710 NotifyPropertyChanged();
715 /// The Child property of FlexContainer.<br />
716 /// The proportion of the free space in the container, the flex item will receive.<br />
717 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
719 /// <since_tizen> 3 </since_tizen>
720 [Obsolete("Deprecated in API8, will be removed in API10.")]
725 return (float)GetValue(FlexProperty);
729 SetValue(FlexProperty, value);
730 NotifyPropertyChanged();
735 /// The Child property of FlexContainer.<br />
736 /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
738 /// <since_tizen> 3 </since_tizen>
739 [Obsolete("Deprecated in API8, will be removed in API10.")]
744 return (int)GetValue(AlignSelfProperty);
748 SetValue(AlignSelfProperty, value);
749 NotifyPropertyChanged();
754 /// The Child property of FlexContainer.<br />
755 /// The space around the flex item.<br />
758 /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
760 /// <since_tizen> 3 </since_tizen>
761 [Obsolete("Deprecated in API8, will be removed in API10.")]
762 public Vector4 FlexMargin
766 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
767 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
771 SetValue(FlexMarginProperty, value);
772 NotifyPropertyChanged();
777 /// The top-left cell this child occupies, if not set, the first available cell is used.
780 /// The property cascade chaining set is not recommended.
781 /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
784 /// This way is recommended for setting the property
786 /// var view = new View();
787 /// view.CellIndex = new Vector2(1, 3);
789 /// This way to set the property is prohibited
791 /// view.CellIndex.X = 1; //This does not guarantee a proper operation
794 /// <since_tizen> 3 </since_tizen>
795 public Vector2 CellIndex
799 return (Vector2)GetValue(CellIndexProperty);
803 SetValue(CellIndexProperty, value);
804 NotifyPropertyChanged();
809 /// The number of rows this child occupies, if not set, the default value is 1.
812 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
814 /// <since_tizen> 3 </since_tizen>
819 return (float)GetValue(RowSpanProperty);
823 SetValue(RowSpanProperty, value);
824 NotifyPropertyChanged();
829 /// The number of columns this child occupies, if not set, the default value is 1.
832 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
834 /// <since_tizen> 3 </since_tizen>
835 public float ColumnSpan
839 return (float)GetValue(ColumnSpanProperty);
843 SetValue(ColumnSpanProperty, value);
844 NotifyPropertyChanged();
849 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
852 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
854 /// <since_tizen> 3 </since_tizen>
855 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
859 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
863 SetValue(CellHorizontalAlignmentProperty, value);
864 NotifyPropertyChanged();
869 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
872 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
874 /// <since_tizen> 3 </since_tizen>
875 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
879 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
883 SetValue(CellVerticalAlignmentProperty, value);
884 NotifyPropertyChanged();
889 /// The left focusable view.<br />
890 /// This will return null if not set.<br />
891 /// This will also return null if the specified left focusable view is not on a window.<br />
893 /// <since_tizen> 3 </since_tizen>
894 public View LeftFocusableView
896 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
899 return (View)GetValue(LeftFocusableViewProperty);
903 SetValue(LeftFocusableViewProperty, value);
904 NotifyPropertyChanged();
909 /// The right focusable view.<br />
910 /// This will return null if not set.<br />
911 /// This will also return null if the specified right focusable view is not on a window.<br />
913 /// <since_tizen> 3 </since_tizen>
914 public View RightFocusableView
916 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
919 return (View)GetValue(RightFocusableViewProperty);
923 SetValue(RightFocusableViewProperty, value);
924 NotifyPropertyChanged();
929 /// The up focusable view.<br />
930 /// This will return null if not set.<br />
931 /// This will also return null if the specified up focusable view is not on a window.<br />
933 /// <since_tizen> 3 </since_tizen>
934 public View UpFocusableView
936 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
939 return (View)GetValue(UpFocusableViewProperty);
943 SetValue(UpFocusableViewProperty, value);
944 NotifyPropertyChanged();
949 /// The down focusable view.<br />
950 /// This will return null if not set.<br />
951 /// This will also return null if the specified down focusable view is not on a window.<br />
953 /// <since_tizen> 3 </since_tizen>
954 public View DownFocusableView
956 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
959 return (View)GetValue(DownFocusableViewProperty);
963 SetValue(DownFocusableViewProperty, value);
964 NotifyPropertyChanged();
969 /// The clockwise focusable view by rotary wheel.<br />
970 /// This will return null if not set.<br />
971 /// This will also return null if the specified clockwise focusable view is not on a window.<br />
973 [EditorBrowsable(EditorBrowsableState.Never)]
974 public View ClockwiseFocusableView
976 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
979 return (View)GetValue(ClockwiseFocusableViewProperty);
983 SetValue(ClockwiseFocusableViewProperty, value);
984 NotifyPropertyChanged();
989 /// The counter clockwise focusable view by rotary wheel.<br />
990 /// This will return null if not set.<br />
991 /// This will also return null if the specified counter clockwise focusable view is not on a window.<br />
993 [EditorBrowsable(EditorBrowsableState.Never)]
994 public View CounterClockwiseFocusableView
996 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
999 return (View)GetValue(CounterClockwiseFocusableViewProperty);
1003 SetValue(CounterClockwiseFocusableViewProperty, value);
1004 NotifyPropertyChanged();
1009 /// Whether the view should be focusable by keyboard navigation.
1011 /// <since_tizen> 3 </since_tizen>
1012 public bool Focusable
1016 SetValue(FocusableProperty, value);
1017 NotifyPropertyChanged();
1021 return (bool)GetValue(FocusableProperty);
1026 /// 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.
1027 /// Note : Default value is true.
1029 [EditorBrowsable(EditorBrowsableState.Never)]
1030 public bool FocusableChildren
1034 SetValue(FocusableChildrenProperty, value);
1035 NotifyPropertyChanged();
1039 return (bool)GetValue(FocusableChildrenProperty);
1044 /// Whether this view can focus by touch.
1045 /// If Focusable is false, FocusableInTouch is disabled.
1046 /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
1048 [EditorBrowsable(EditorBrowsableState.Never)]
1049 public bool FocusableInTouch
1053 SetValue(FocusableInTouchProperty, value);
1054 NotifyPropertyChanged();
1058 return (bool)GetValue(FocusableInTouchProperty);
1063 /// Retrieves the position of the view.<br />
1064 /// The coordinates are relative to the view's parent.<br />
1066 /// <since_tizen> 3 </since_tizen>
1067 public Position CurrentPosition
1071 return GetCurrentPosition();
1076 /// Sets the size of a view for the width and the height.<br />
1077 /// Geometry can be scaled to fit within this area.<br />
1078 /// This does not interfere with the view's scale factor.<br />
1079 /// The views default depth is the minimum of width and height.<br />
1082 /// The property cascade chaining set is not recommended.
1085 /// This way is recommended for setting the property
1087 /// var view = new View();
1088 /// view.Size2D = new Size2D(100, 200);
1090 /// This way to set the property is prohibited
1092 /// view.Size2D.Width = 100; //This does not guarantee a proper operation
1095 /// <since_tizen> 3 </since_tizen>
1096 public Size2D Size2D
1100 var temp = (Size2D)GetValue(Size2DProperty);
1102 if (this.Layout == null)
1104 if (temp.Width < 0) { temp.Width = 0; }
1105 if (temp.Height < 0) { temp.Height = 0; }
1112 SetValue(Size2DProperty, value);
1114 NotifyPropertyChanged();
1119 /// Retrieves the size of the view.<br />
1120 /// The coordinates are relative to the view's parent.<br />
1122 /// <since_tizen> 3 </since_tizen>
1123 public Size2D CurrentSize
1127 return GetCurrentSize();
1132 /// Retrieves and sets the view's opacity.<br />
1136 /// Animatable - This property can be animated using <c>Animation</c> class.
1138 /// animation.AnimateTo(view, "Opacity", 0.5f);
1142 /// <since_tizen> 3 </since_tizen>
1143 public float Opacity
1147 return (float)GetValue(OpacityProperty);
1151 SetValue(OpacityProperty, value);
1152 NotifyPropertyChanged();
1157 /// Sets the position of the view for X and Y.<br />
1158 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
1159 /// If the position inheritance is disabled, sets the world position.<br />
1162 /// The property cascade chaining set is not recommended.
1165 /// This way is recommended for setting the property
1167 /// var view = new View();
1168 /// view.Position2D = new Position2D(100, 200);
1170 /// This way to set the property is prohibited
1172 /// view.Position2D.X = 100; //This does not guarantee a proper operation
1175 /// <since_tizen> 3 </since_tizen>
1176 public Position2D Position2D
1180 return (Position2D)GetValue(Position2DProperty);
1184 SetValue(Position2DProperty, value);
1185 NotifyPropertyChanged();
1190 /// Retrieves the screen position of the view.<br />
1192 /// <since_tizen> 3 </since_tizen>
1193 public Vector2 ScreenPosition
1197 Vector2 temp = new Vector2(0.0f, 0.0f);
1198 var pValue = GetProperty(View.Property.ScreenPosition);
1206 /// Determines whether the pivot point should be used to determine the position of the view.
1207 /// This is false by default.
1209 /// <remarks>If false, then the top-left of the view is used for the position.
1210 /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1212 /// <since_tizen> 3 </since_tizen>
1213 public bool PositionUsesPivotPoint
1217 return (bool)GetValue(PositionUsesPivotPointProperty);
1221 SetValue(PositionUsesPivotPointProperty, value);
1222 NotifyPropertyChanged();
1227 /// Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead!
1229 /// <since_tizen> 3 </since_tizen>
1230 [Obsolete("Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead! " +
1232 "View view = new View(); " +
1233 "view.PivotPoint = PivotPoint.Center; " +
1234 "view.PositionUsesPivotPoint = true;" +
1235 " Deprecated in API5: Will be removed in API8")]
1236 [EditorBrowsable(EditorBrowsableState.Never)]
1237 public bool PositionUsesAnchorPoint
1241 return (bool)GetValue(PositionUsesAnchorPointProperty);
1245 SetValue(PositionUsesAnchorPointProperty, value);
1249 private bool InternalPositionUsesAnchorPoint
1254 var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
1255 pValue.Get(out temp);
1261 var temp = new Tizen.NUI.PropertyValue(value);
1262 SetProperty(View.Property.PositionUsesAnchorPoint, temp);
1264 NotifyPropertyChanged();
1269 /// Queries whether the view is connected to the stage.<br />
1270 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1272 /// <since_tizen> 3 </since_tizen>
1273 public bool IsOnWindow
1282 /// Gets the depth in the hierarchy for the view.
1284 /// <since_tizen> 3 </since_tizen>
1285 public int HierarchyDepth
1289 return GetHierarchyDepth();
1294 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1297 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1298 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1299 /// The values set by this property will likely change.
1301 /// <since_tizen> 3 </since_tizen>
1302 public int SiblingOrder
1306 return (int)GetValue(SiblingOrderProperty);
1310 SetValue(SiblingOrderProperty, value);
1312 Layout?.ChangeLayoutSiblingOrder(value);
1314 NotifyPropertyChanged();
1319 /// Returns the natural size of the view.
1322 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1324 /// <since_tizen> 5 </since_tizen>
1325 public Vector3 NaturalSize
1329 Vector3 ret = GetNaturalSize();
1330 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1336 /// Returns the natural size (Size2D) of the view.
1339 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1341 /// <since_tizen> 4 </since_tizen>
1342 public Size2D NaturalSize2D
1346 Vector3 temp = GetNaturalSize();
1347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1349 Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
1356 /// Gets or sets the origin of a view within its parent's area.<br />
1357 /// 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 />
1358 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1359 /// A view's position is the distance between this origin and the view's anchor-point.<br />
1361 /// <pre>The view has been initialized.</pre>
1362 /// <since_tizen> 3 </since_tizen>
1363 public Position ParentOrigin
1367 Position tmp = (Position)GetValue(ParentOriginProperty);
1368 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1372 SetValue(ParentOriginProperty, value);
1373 NotifyPropertyChanged();
1378 /// Gets or sets the anchor-point of a view.<br />
1379 /// 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 />
1380 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1381 /// A view position is the distance between its parent-origin and this anchor-point.<br />
1382 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1383 /// <pre>The view has been initialized.</pre>
1386 /// The property cascade chaining set is not recommended.
1389 /// This way is recommended for setting the property
1391 /// var view = new View();
1392 /// view.PivotPoint = PivotPoint.Center;
1394 /// This way to set the property is prohibited
1396 /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
1399 /// <since_tizen> 3 </since_tizen>
1400 public Position PivotPoint
1404 return (Position)GetValue(PivotPointProperty);
1408 SetValue(PivotPointProperty, value);
1409 NotifyPropertyChanged();
1414 /// Gets or sets the size width of the view.
1418 /// Animatable - This property can be animated using <c>Animation</c> class.
1420 /// animation.AnimateTo(view, "SizeWidth", 500.0f);
1424 /// <since_tizen> 3 </since_tizen>
1425 public float SizeWidth
1429 return (float)GetValue(SizeWidthProperty);
1433 SetValue(SizeWidthProperty, value);
1434 NotifyPropertyChanged();
1439 /// Gets or sets the size height of the view.
1443 /// Animatable - This property can be animated using <c>Animation</c> class.
1446 /// animation.AnimateTo(view, "SizeHeight", 500.0f);
1449 /// <since_tizen> 3 </since_tizen>
1450 public float SizeHeight
1454 return (float)GetValue(SizeHeightProperty);
1458 SetValue(SizeHeightProperty, value);
1459 NotifyPropertyChanged();
1464 /// Gets or sets the position of the view.<br />
1465 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1466 /// If the position inheritance is disabled, sets the world position.<br />
1470 /// Animatable - This property can be animated using <c>Animation</c> class.
1472 /// animation.AnimateTo(view, "Position", new Position(50, 0));
1475 /// The property cascade chaining set is not recommended.
1478 /// This way is recommended for setting the property
1480 /// var view = new View();
1481 /// view.Position = new Position(100, 200.5f, 0);
1483 /// This way to set the property is prohibited
1485 /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
1488 /// <since_tizen> 3 </since_tizen>
1489 public Position Position
1493 return (Position)GetValue(PositionProperty);
1497 SetValue(PositionProperty, value);
1498 NotifyPropertyChanged();
1503 /// Gets or sets the position X of the view.
1507 /// Animatable - This property can be animated using <c>Animation</c> class.
1509 /// animation.AnimateTo(view, "PositionX", 50.0f);
1513 /// <since_tizen> 3 </since_tizen>
1514 public float PositionX
1518 return (float)GetValue(PositionXProperty);
1522 SetValue(PositionXProperty, value);
1523 NotifyPropertyChanged();
1528 /// Gets or sets the position Y of the view.
1532 /// Animatable - This property can be animated using <c>Animation</c> class.
1534 /// animation.AnimateTo(view, "PositionY", 50.0f);
1538 /// <since_tizen> 3 </since_tizen>
1539 public float PositionY
1543 return (float)GetValue(PositionYProperty);
1547 SetValue(PositionYProperty, value);
1548 NotifyPropertyChanged();
1553 /// Gets or sets the position Z of the view.
1557 /// Animatable - This property can be animated using <c>Animation</c> class.
1559 /// animation.AnimateTo(view, "PositionZ", 50.0f);
1563 /// <since_tizen> 3 </since_tizen>
1564 public float PositionZ
1568 return (float)GetValue(PositionZProperty);
1572 SetValue(PositionZProperty, value);
1573 NotifyPropertyChanged();
1578 /// Gets or sets the world position of the view.
1580 /// <since_tizen> 3 </since_tizen>
1581 public Vector3 WorldPosition
1585 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1586 var pValue = GetProperty(View.Property.WorldPosition);
1594 /// Gets or sets the orientation of the view.<br />
1595 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1599 /// This is an asynchronous method.
1602 /// Animatable - This property can be animated using <c>Animation</c> class.
1604 /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
1608 /// <since_tizen> 3 </since_tizen>
1609 public Rotation Orientation
1613 return (Rotation)GetValue(OrientationProperty);
1617 SetValue(OrientationProperty, value);
1618 NotifyPropertyChanged();
1623 /// Gets or sets the world orientation of the view.<br />
1625 /// <since_tizen> 3 </since_tizen>
1626 public Rotation WorldOrientation
1630 Rotation temp = new Rotation();
1631 var pValue = GetProperty(View.Property.WorldOrientation);
1639 /// Gets or sets the scale factor applied to the view.<br />
1643 /// Animatable - This property can be animated using <c>Animation</c> class.
1645 /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
1648 /// The property cascade chaining set is not recommended.
1651 /// This way is recommended for setting the property
1653 /// var view = new View();
1654 /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
1656 /// This way to set the property is prohibited
1658 /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
1661 /// <since_tizen> 3 </since_tizen>
1662 public Vector3 Scale
1666 return (Vector3)GetValue(ScaleProperty);
1670 SetValue(ScaleProperty, value);
1671 NotifyPropertyChanged();
1676 /// Gets or sets the scale X factor applied to the view.
1680 /// Animatable - This property can be animated using <c>Animation</c> class.
1682 /// animation.AnimateTo(view, "ScaleX", 1.5f);
1686 /// <since_tizen> 3 </since_tizen>
1691 return (float)GetValue(ScaleXProperty);
1695 SetValue(ScaleXProperty, value);
1696 NotifyPropertyChanged();
1701 /// Gets or sets the scale Y factor applied to the view.
1705 /// Animatable - This property can be animated using <c>Animation</c> class.
1707 /// animation.AnimateTo(view, "ScaleY", 1.5f);
1711 /// <since_tizen> 3 </since_tizen>
1716 return (float)GetValue(ScaleYProperty);
1720 SetValue(ScaleYProperty, value);
1721 NotifyPropertyChanged();
1726 /// Gets or sets the scale Z factor applied to the view.
1730 /// Animatable - This property can be animated using <c>Animation</c> class.
1732 /// animation.AnimateTo(view, "ScaleZ", 1.5f);
1736 /// <since_tizen> 3 </since_tizen>
1741 return (float)GetValue(ScaleZProperty);
1745 SetValue(ScaleZProperty, value);
1746 NotifyPropertyChanged();
1751 /// Gets the world scale of the view.
1753 /// <since_tizen> 3 </since_tizen>
1754 public Vector3 WorldScale
1758 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1759 var pValue = GetProperty(View.Property.WorldScale);
1767 /// Retrieves the visibility flag of the view.
1771 /// If the view is not visible, then the view and its children will not be rendered.
1772 /// 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.
1775 /// Animatable - This property can be animated using <c>Animation</c> class.
1777 /// animation.AnimateTo(view, "Visibility", false);
1781 /// <since_tizen> 3 </since_tizen>
1782 public bool Visibility
1787 var pValue = GetProperty(View.Property.VISIBLE);
1788 pValue.Get(out temp);
1795 /// Gets the view's world color.
1797 /// <since_tizen> 3 </since_tizen>
1798 public Vector4 WorldColor
1802 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1803 var pValue = GetProperty(View.Property.WorldColor);
1811 /// Gets or sets the view's name.
1813 /// <since_tizen> 3 </since_tizen>
1818 return (string)GetValue(NameProperty);
1822 SetValue(NameProperty, value);
1823 NotifyPropertyChanged();
1828 /// Get the number of children held by the view.
1830 /// <since_tizen> 3 </since_tizen>
1831 public new uint ChildCount
1835 return Convert.ToUInt32(Children.Count);
1840 /// Gets the view's ID.
1843 /// <since_tizen> 3 </since_tizen>
1853 /// Gets or sets the status of whether the view should emit touch or hover signals.
1854 /// If a View is made insensitive, then the View and its children are not hittable.
1856 /// <since_tizen> 3 </since_tizen>
1857 public bool Sensitive
1861 return (bool)GetValue(SensitiveProperty);
1865 SetValue(SensitiveProperty, value);
1866 NotifyPropertyChanged();
1871 /// Gets or sets the status of whether the view should be enabled user interactions.
1872 /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
1874 /// <since_tizen> tizen_next </since_tizen>
1875 [EditorBrowsable(EditorBrowsableState.Never)]
1876 public bool IsEnabled
1880 return (bool)GetValue(IsEnabledProperty);
1884 SetValue(IsEnabledProperty, value);
1885 NotifyPropertyChanged();
1890 /// 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.
1892 /// <since_tizen> 3 </since_tizen>
1893 public bool LeaveRequired
1897 return (bool)GetValue(LeaveRequiredProperty);
1901 SetValue(LeaveRequiredProperty, value);
1902 NotifyPropertyChanged();
1907 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
1909 /// <since_tizen> 3 </since_tizen>
1910 public bool InheritOrientation
1914 return (bool)GetValue(InheritOrientationProperty);
1918 SetValue(InheritOrientationProperty, value);
1919 NotifyPropertyChanged();
1924 /// Gets or sets the status of whether a child view inherits it's parent's scale.
1926 /// <since_tizen> 3 </since_tizen>
1927 public bool InheritScale
1931 return (bool)GetValue(InheritScaleProperty);
1935 SetValue(InheritScaleProperty, value);
1936 NotifyPropertyChanged();
1941 /// Gets or sets the status of how the view and its children should be drawn.<br />
1942 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
1943 /// 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 />
1944 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
1945 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
1946 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
1948 /// <since_tizen> 3 </since_tizen>
1949 public DrawModeType DrawMode
1953 return (DrawModeType)GetValue(DrawModeProperty);
1957 SetValue(DrawModeProperty, value);
1958 NotifyPropertyChanged();
1963 /// Gets or sets the relative to parent size factor of the view.<br />
1964 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
1965 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
1968 /// The property cascade chaining set is not recommended.
1971 /// This way is recommended for setting the property
1973 /// var text = new TextField();
1974 /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
1976 /// This way to set the property is prohibited
1978 /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
1981 /// <since_tizen> 3 </since_tizen>
1982 public Vector3 SizeModeFactor
1986 return (Vector3)GetValue(SizeModeFactorProperty);
1990 SetValue(SizeModeFactorProperty, value);
1991 NotifyPropertyChanged();
1996 /// Gets or sets the width resize policy to be used.
1998 /// <since_tizen> 3 </since_tizen>
1999 public ResizePolicyType WidthResizePolicy
2003 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
2007 SetValue(WidthResizePolicyProperty, value);
2008 NotifyPropertyChanged();
2013 /// Gets or sets the height resize policy to be used.
2015 /// <since_tizen> 3 </since_tizen>
2016 public ResizePolicyType HeightResizePolicy
2020 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
2024 SetValue(HeightResizePolicyProperty, value);
2025 NotifyPropertyChanged();
2030 /// Gets or sets the policy to use when setting size with size negotiation.<br />
2031 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
2033 /// <since_tizen> 3 </since_tizen>
2034 public SizeScalePolicyType SizeScalePolicy
2038 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
2042 SetValue(SizeScalePolicyProperty, value);
2043 NotifyPropertyChanged();
2048 /// Gets or sets the status of whether the width size is dependent on the height size.
2050 /// <since_tizen> 3 </since_tizen>
2051 public bool WidthForHeight
2055 return (bool)GetValue(WidthForHeightProperty);
2059 SetValue(WidthForHeightProperty, value);
2060 NotifyPropertyChanged();
2065 /// Gets or sets the status of whether the height size is dependent on the width size.
2067 /// <since_tizen> 3 </since_tizen>
2068 public bool HeightForWidth
2072 return (bool)GetValue(HeightForWidthProperty);
2076 SetValue(HeightForWidthProperty, value);
2077 NotifyPropertyChanged();
2082 /// Gets or sets the padding for use in layout.
2085 /// The property cascade chaining set is not recommended.
2088 /// This way is recommended for setting the property
2090 /// var view = new View();
2091 /// view.Padding = new Extents(5, 5, 5, 5);
2093 /// This way to set the property is prohibited
2095 /// view.Padding.Start = 5; //This does not guarantee a proper operation
2098 /// <since_tizen> 5 </since_tizen>
2099 public Extents Padding
2103 return (Extents)GetValue(PaddingProperty);
2107 SetValue(PaddingProperty, value);
2108 NotifyPropertyChanged();
2113 /// Gets or sets the minimum size the view can be assigned in size negotiation.
2115 /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2117 /// The property cascade chaining set is not recommended.
2120 /// This way is recommended for setting the property
2122 /// var view = new View();
2123 /// view.MinimumSize = new Size2D(100, 200);
2125 /// This way to set the property is prohibited
2127 /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
2130 /// <since_tizen> 3 </since_tizen>
2131 public Size2D MinimumSize
2135 return (Size2D)GetValue(MinimumSizeProperty);
2141 throw new ArgumentNullException(nameof(value));
2145 // Note: it only works if minimum size is >= than natural size.
2146 // To force the size it should be done through the width&height spec or Size2D.
2147 layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
2148 layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
2149 layout.RequestLayout();
2151 SetValue(MinimumSizeProperty, value);
2152 NotifyPropertyChanged();
2157 /// Gets or sets the maximum size the view can be assigned in size negotiation.
2160 /// This way is recommended for setting the property
2162 /// var view = new View();
2163 /// view.MaximumSize = new Size2D(100, 200);
2165 /// This way to set the property is prohibited
2167 /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
2170 /// <since_tizen> 3 </since_tizen>
2171 public Size2D MaximumSize
2175 return (Size2D)GetValue(MaximumSizeProperty);
2179 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
2180 // MATCH_PARENT spec + parent container size can be used to limit
2183 layout.RequestLayout();
2185 SetValue(MaximumSizeProperty, value);
2186 NotifyPropertyChanged();
2191 /// Gets or sets whether a child view inherits it's parent's position.<br />
2192 /// Default is to inherit.<br />
2193 /// 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 />
2195 /// <since_tizen> 3 </since_tizen>
2196 public bool InheritPosition
2200 return (bool)GetValue(InheritPositionProperty);
2204 SetValue(InheritPositionProperty, value);
2205 NotifyPropertyChanged();
2210 /// Gets or sets the clipping behavior (mode) of it's children.
2212 /// <since_tizen> 3 </since_tizen>
2213 public ClippingModeType ClippingMode
2217 return (ClippingModeType)GetValue(ClippingModeProperty);
2221 SetValue(ClippingModeProperty, value);
2222 NotifyPropertyChanged();
2227 /// Gets the number of renderers held by the view.
2229 /// <since_tizen> 3 </since_tizen>
2230 public uint RendererCount
2234 return GetRendererCount();
2239 /// Deprecated in API5; Will be removed in API8. Please use PivotPoint instead!
2242 /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
2244 /// <since_tizen> 3 </since_tizen>
2245 [Obsolete("Deprecated in API5; Will be removed in API8. Please use PivotPoint instead! " +
2247 "View view = new View(); " +
2248 "view.PivotPoint = PivotPoint.Center; " +
2249 "view.PositionUsesPivotPoint = true;")]
2250 [EditorBrowsable(EditorBrowsableState.Never)]
2251 public Position AnchorPoint
2255 return GetValue(AnchorPointProperty) as Position;
2259 SetValue(AnchorPointProperty, value);
2263 private Position InternalAnchorPoint
2267 Position temp = new Position(0.0f, 0.0f, 0.0f);
2268 var pValue = GetProperty(View.Property.AnchorPoint);
2271 Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
2277 var temp = new Tizen.NUI.PropertyValue(value);
2278 SetProperty(View.Property.AnchorPoint, temp);
2280 NotifyPropertyChanged();
2285 /// Sets the size of a view for the width, the height and the depth.<br />
2286 /// Geometry can be scaled to fit within this area.<br />
2287 /// This does not interfere with the view's scale factor.<br />
2288 /// The views default depth is the minimum of width and height.<br />
2292 /// Animatable - This property can be animated using <c>Animation</c> class.
2294 /// animation.AnimateTo(view, "Size", new Size(100, 100));
2297 /// The property cascade chaining set is not recommended.
2300 /// This way is recommended for setting the property
2302 /// var view = new View();
2303 /// view.Size = new Size(100.5f, 200, 0);
2305 /// This way to set the property is prohibited
2307 /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
2310 /// <since_tizen> 5 </since_tizen>
2315 return (Size)GetValue(SizeProperty);
2319 SetValue(SizeProperty, value);
2320 NotifyPropertyChanged();
2325 /// Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead!
2327 /// <since_tizen> 3 </since_tizen>
2328 [Obsolete("Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead! " +
2330 "Container parent = view.GetParent(); " +
2331 "View view = parent as View;")]
2332 [EditorBrowsable(EditorBrowsableState.Never)]
2333 public new View Parent
2338 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2339 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2340 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2342 if (basehandle is Layer layer)
2344 ret = new View(Layer.getCPtr(layer).Handle, false);
2345 NUILog.Error("This Parent property is deprecated, should do not be used");
2349 ret = basehandle as View;
2352 Interop.BaseHandle.DeleteBaseHandle(CPtr);
2353 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2355 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2361 /// Gets/Sets whether inherit parent's the layout Direction.
2363 /// <since_tizen> 4 </since_tizen>
2364 public bool InheritLayoutDirection
2368 return (bool)GetValue(InheritLayoutDirectionProperty);
2372 SetValue(InheritLayoutDirectionProperty, value);
2373 NotifyPropertyChanged();
2378 /// Gets/Sets the layout Direction.
2380 /// <since_tizen> 4 </since_tizen>
2381 public ViewLayoutDirectionType LayoutDirection
2385 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
2389 SetValue(LayoutDirectionProperty, value);
2390 NotifyPropertyChanged();
2391 layout?.RequestLayout();
2396 /// Gets or sets the Margin for use in layout.
2399 /// Margin property is supported by Layout algorithms and containers.
2400 /// Please Set Layout if you want to use Margin property.
2401 /// The property cascade chaining set is not recommended.
2404 /// This way is recommended for setting the property
2406 /// var view = new View();
2407 /// view.Margin = new Extents(10, 5, 15, 20);
2409 /// This way to set the property is prohibited
2411 /// view.Margin.Top = 15; //This does not guarantee a proper operation
2414 /// <since_tizen> 4 </since_tizen>
2415 public Extents Margin
2419 return (Extents)GetValue(MarginProperty);
2423 SetValue(MarginProperty, value);
2424 NotifyPropertyChanged();
2429 /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2433 /// // matchParentView matches its size to its parent size.
2434 /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2435 /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2437 /// // wrapContentView wraps its children with their desired size.
2438 /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2439 /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2441 /// // exactSizeView shows itself with an exact size.
2442 /// exactSizeView.WidthSpecification = 100;
2443 /// exactSizeView.HeightSpecification = 100;
2446 /// <since_tizen> 6 </since_tizen>
2447 [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2448 public int WidthSpecification
2452 return (int)GetValue(WidthSpecificationProperty);
2456 SetValue(WidthSpecificationProperty, value);
2457 NotifyPropertyChanged();
2461 private int InternalWidthSpecification
2469 if (value == widthPolicy)
2472 widthPolicy = value;
2473 if (widthPolicy >= 0)
2475 if (heightPolicy >= 0) // Policy an exact value
2477 // Create Size2D only both _widthPolicy and _heightPolicy are set.
2478 Size2D = new Size2D(widthPolicy, heightPolicy);
2481 layout?.RequestLayout();
2486 /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2490 /// // matchParentView matches its size to its parent size.
2491 /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2492 /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2494 /// // wrapContentView wraps its children with their desired size.
2495 /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2496 /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2498 /// // exactSizeView shows itself with an exact size.
2499 /// exactSizeView.WidthSpecification = 100;
2500 /// exactSizeView.HeightSpecification = 100;
2503 /// <since_tizen> 6 </since_tizen>
2504 [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2505 public int HeightSpecification
2509 return (int)GetValue(HeightSpecificationProperty);
2513 SetValue(HeightSpecificationProperty, value);
2514 NotifyPropertyChanged();
2518 private int InternalHeightSpecification
2522 return heightPolicy;
2526 if (value == heightPolicy)
2529 heightPolicy = value;
2530 if (heightPolicy >= 0)
2532 if (widthPolicy >= 0) // Policy an exact value
2534 // Create Size2D only both _widthPolicy and _heightPolicy are set.
2535 Size2D = new Size2D(widthPolicy, heightPolicy);
2538 layout?.RequestLayout();
2543 /// Gets the List of transitions for this View.
2545 /// <since_tizen> 6 </since_tizen>
2546 public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2550 if (layoutTransitions == null)
2552 layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2554 return layoutTransitions;
2559 /// Sets a layout transitions for this View.
2561 /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2563 /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2565 /// <since_tizen> 6 </since_tizen>
2566 public LayoutTransition LayoutTransition
2570 return GetValue(LayoutTransitionProperty) as LayoutTransition;
2574 SetValue(LayoutTransitionProperty, value);
2575 NotifyPropertyChanged();
2579 private LayoutTransition InternalLayoutTransition
2583 return layoutTransition;
2589 throw new global::System.ArgumentNullException(nameof(value));
2591 if (layoutTransitions == null)
2593 layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2596 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
2598 AttachTransitionsToChildren(value);
2600 layoutTransition = value;
2605 /// Deprecated in API5; Will be removed in API8. Please use Padding instead.
2608 /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2610 /// <since_tizen> 4 </since_tizen>
2611 [Obsolete("Deprecated in API5; Will be removed in API8. Please use Padding instead.")]
2612 [EditorBrowsable(EditorBrowsableState.Never)]
2613 public Extents PaddingEX
2617 return GetValue(PaddingEXProperty) as Extents;
2621 SetValue(PaddingEXProperty, value);
2625 private Extents InternalPaddingEX
2629 Extents temp = new Extents(0, 0, 0, 0);
2630 var pValue = GetProperty(View.Property.PADDING);
2633 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2639 var temp = new Tizen.NUI.PropertyValue(value);
2640 SetProperty(View.Property.PADDING, temp);
2642 NotifyPropertyChanged();
2643 layout?.RequestLayout();
2648 /// The Color of View. This is an RGBA value.
2652 /// Animatable - This property can be animated using <c>Animation</c> class.
2654 /// The property cascade chaining set is not recommended.
2657 /// This way is recommended for setting the property
2659 /// var view = new View();
2660 /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
2662 /// This way to set the property is prohibited
2664 /// view.Color.A = 0.5f; //This does not guarantee a proper operation
2667 [EditorBrowsable(EditorBrowsableState.Never)]
2672 return (Color)GetValue(ColorProperty);
2676 SetValue(ColorProperty, value);
2677 NotifyPropertyChanged();
2682 /// Set the layout on this View. Replaces any existing Layout.
2685 /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
2687 /// <since_tizen> 6 </since_tizen>
2688 public LayoutItem Layout
2692 return GetValue(LayoutProperty) as LayoutItem;
2696 SetValue(LayoutProperty, value);
2700 private LayoutItem InternalLayout
2708 // Do nothing if layout provided is already set on this View.
2709 if (value == layout)
2714 LayoutingDisabled = false;
2717 // If new layout being set already has a owner then that owner receives a replacement default layout.
2718 // First check if the layout to be set already has a owner.
2719 if (value?.Owner != null)
2721 // Previous owner of the layout gets a default layout as a replacement.
2722 value.Owner.Layout = new AbsoluteLayout()
2724 // Copy Margin and Padding to replacement LayoutGroup.
2725 Margin = value.Margin,
2726 Padding = value.Padding,
2730 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2731 // View if no replacement. Previously margin and padding values would have been moved from
2732 // the View to the layout.
2733 if (layout != null) // Existing layout
2737 // Existing layout being replaced so copy over margin and padding values.
2738 value.Margin = layout.Margin;
2739 value.Padding = layout.Padding;
2740 value.SetPositionByLayout = !excludeLayouting;
2744 // Layout not being replaced so restore margin and padding to View.
2745 SetValue(MarginProperty, layout.Margin);
2746 SetValue(PaddingProperty, layout.Padding);
2747 NotifyPropertyChanged();
2752 // First Layout to be added to the View hence copy
2754 // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2757 Extents margin = Margin;
2758 Extents padding = Padding;
2759 bool setMargin = false;
2760 bool setPadding = false;
2762 if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
2764 // If View already has a margin set then store it in Layout instead.
2765 value.Margin = margin;
2766 SetValue(MarginProperty, new Extents(0, 0, 0, 0));
2770 if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
2772 // If View already has a padding set then store it in Layout instead.
2773 value.Padding = padding;
2774 SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
2778 if (setMargin || setPadding)
2780 NotifyPropertyChanged();
2783 value.SetPositionByLayout = !excludeLayouting;
2787 // Remove existing layout from it's parent layout group.
2790 // Set layout to this view
2796 /// The weight of the View, used to share available space in a layout with siblings.
2798 /// <since_tizen> 6 </since_tizen>
2808 layout?.RequestLayout();
2813 /// Whether to load the BackgroundImage synchronously.
2814 /// If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2815 /// Note: For Normal Quad images only.
2817 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2818 [EditorBrowsable(EditorBrowsableState.Never)]
2819 public bool BackgroundImageSynchronosLoading
2823 return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
2827 SetValue(BackgroundImageSynchronosLoadingProperty, value);
2828 NotifyPropertyChanged();
2832 private bool InternalBackgroundImageSynchronosLoading
2836 return BackgroundImageSynchronousLoading;
2840 BackgroundImageSynchronousLoading = value;
2845 /// Whether to load the BackgroundImage synchronously.
2846 /// If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2847 /// Note: For Normal Quad images only.
2849 /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2850 [EditorBrowsable(EditorBrowsableState.Never)]
2851 public bool BackgroundImageSynchronousLoading
2855 return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
2859 SetValue(BackgroundImageSynchronousLoadingProperty, value);
2860 NotifyPropertyChanged();
2864 private bool InternalBackgroundImageSynchronousLoading
2868 return backgroundImageSynchronousLoading;
2872 backgroundImageSynchronousLoading = value;
2874 string bgUrl = null;
2875 var pValue = Background.Find(ImageVisualProperty.URL);
2876 pValue?.Get(out bgUrl);
2879 if (!string.IsNullOrEmpty(bgUrl))
2881 PropertyMap bgMap = this.Background;
2882 var temp = new PropertyValue(backgroundImageSynchronousLoading);
2883 bgMap[ImageVisualProperty.SynchronousLoading] = temp;
2890 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2891 [EditorBrowsable(EditorBrowsableState.Never)]
2892 public Vector2 UpdateSizeHint
2896 return (Vector2)GetValue(UpdateSizeHintProperty);
2900 SetValue(UpdateSizeHintProperty, value);
2901 NotifyPropertyChanged();
2906 /// Enable/Disable ControlState propagation for children.
2907 /// It is false by default.
2908 /// If the View needs to share ControlState with descendants, please set it true.
2909 /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
2911 [EditorBrowsable(EditorBrowsableState.Never)]
2912 public bool EnableControlStatePropagation
2916 return (bool)GetValue(EnableControlStatePropagationProperty);
2920 SetValue(EnableControlStatePropagationProperty, value);
2921 NotifyPropertyChanged();
2925 private bool InternalEnableControlStatePropagation
2927 get => themeData?.ControlStatePropagation ?? false;
2930 if (InternalEnableControlStatePropagation == value) return;
2932 if (themeData == null) themeData = new ThemeData();
2934 themeData.ControlStatePropagation = value;
2936 foreach (View child in Children)
2938 child.EnableControlStatePropagation = value;
2944 /// By default, it is false in View, true in Control.
2945 /// Note that if the value is true, the View will be a touch receptor.
2947 [EditorBrowsable(EditorBrowsableState.Never)]
2948 public bool EnableControlState
2952 return (bool)GetValue(EnableControlStateProperty);
2956 SetValue(EnableControlStateProperty, value);
2961 /// Whether the actor grab all touches even if touch leaves its boundary.
2963 /// <returns>true, if it grab all touch after start</returns>
2964 [EditorBrowsable(EditorBrowsableState.Never)]
2965 public bool GrabTouchAfterLeave
2969 return (bool)GetValue(GrabTouchAfterLeaveProperty);
2973 SetValue(GrabTouchAfterLeaveProperty, value);
2977 private bool InternalGrabTouchAfterLeave
2982 var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
2983 pValue.Get(out temp);
2989 var temp = new Tizen.NUI.PropertyValue(value);
2990 SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
2992 NotifyPropertyChanged();
2997 /// Determines which blend equation will be used to render renderers of this actor.
2999 /// <returns>blend equation enum currently assigned</returns>
3000 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
3001 [EditorBrowsable(EditorBrowsableState.Never)]
3002 public BlendEquationType BlendEquation
3006 return (BlendEquationType)GetValue(BlendEquationProperty);
3010 SetValue(BlendEquationProperty, value);
3014 private BlendEquationType InternalBlendEquation
3019 var pValue = GetProperty(View.Property.BlendEquation);
3020 pValue.Get(out temp);
3022 return (BlendEquationType)temp;
3026 var temp = new Tizen.NUI.PropertyValue((int)value);
3027 SetProperty(View.Property.BlendEquation, temp);
3029 NotifyPropertyChanged();
3034 /// If the value is true, the View will change its style as the theme changes.
3035 /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
3037 /// <since_tizen> 9 </since_tizen>
3038 public bool ThemeChangeSensitive
3040 get => (bool)GetValue(ThemeChangeSensitiveProperty);
3041 set => SetValue(ThemeChangeSensitiveProperty, value);
3045 /// Create Style, it is abstract function and must be override.
3047 [EditorBrowsable(EditorBrowsableState.Never)]
3048 protected virtual ViewStyle CreateViewStyle()
3050 return new ViewStyle();
3054 /// Called after the View's ControlStates changed.
3056 /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
3057 [EditorBrowsable(EditorBrowsableState.Never)]
3058 protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
3064 [EditorBrowsable(EditorBrowsableState.Never)]
3065 protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
3067 isThemeChanged = true;
3068 if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
3069 else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
3070 isThemeChanged = false;
3074 /// Apply style instance to the view.
3075 /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
3077 /// <since_tizen> 9 </since_tizen>
3078 public virtual void ApplyStyle(ViewStyle viewStyle)
3080 if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
3082 if (themeData == null) themeData = new ThemeData();
3084 themeData.viewStyle = viewStyle;
3086 if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
3092 BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
3094 if (bindablePropertyOfView == null)
3099 var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
3100 viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
3102 foreach (var sourceProperty in dirtyStyleProperties)
3104 var sourceValue = viewStyle.GetValue(sourceProperty);
3106 if (sourceValue == null)
3111 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
3113 // Do not set value again when theme is changed and the value has been set already.
3114 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
3119 if (destinationProperty != null)
3121 if (sourceProperty.PropertyName.Equals("Layout") && (sourceValue is LayoutItem layout))
3123 InternalSetValue(destinationProperty, layout.Clone());
3127 InternalSetValue(destinationProperty, sourceValue);
3134 /// Get whether the View is culled or not.
3135 /// True means that the View is out of the view frustum.
3138 /// Hidden-API (Inhouse-API).
3140 [EditorBrowsable(EditorBrowsableState.Never)]
3146 var pValue = GetProperty(View.Property.Culled);
3147 pValue.Get(out temp);
3154 /// Set or Get TransitionOptions for the page transition.
3155 /// This property is used to define how this view will be transitioned during Page switching.
3157 /// <since_tizen> 9 </since_tizen>
3158 public TransitionOptions TransitionOptions
3162 return GetValue(TransitionOptionsProperty) as TransitionOptions;
3166 SetValue(TransitionOptionsProperty, value);
3167 NotifyPropertyChanged();
3171 private TransitionOptions InternalTransitionOptions
3175 transitionOptions = value;
3179 return transitionOptions;
3184 /// Gets or sets the status of whether the view should emit key event signals.
3185 /// If a View's DispatchKeyEvents is set to false, then it's children will not emit a key event signal either.
3187 [EditorBrowsable(EditorBrowsableState.Never)]
3188 public bool DispatchKeyEvents
3192 return (bool)GetValue(DispatchKeyEventsProperty);
3196 SetValue(DispatchKeyEventsProperty, value);
3197 NotifyPropertyChanged();
3202 /// Called when the view is hit through TouchEvent or GestureEvent.
3203 /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
3204 /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
3205 /// User can override whether hit or not in HitTest.
3206 /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
3207 /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
3209 // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
3210 [EditorBrowsable(EditorBrowsableState.Never)]
3211 protected virtual bool HitTest(Touch touch)