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>();
35 internal BackgroundExtraData backgroundExtraData;
37 private bool layoutSet = false;
38 private LayoutItem layout; // Exclusive layout assigned to this View.
40 // List of transitions paired with the condition that uses the transition.
41 private Dictionary<TransitionCondition, TransitionList> layoutTransitions;
42 private int widthPolicy = LayoutParamPolicies.WrapContent; // Layout width policy
43 private int heightPolicy = LayoutParamPolicies.WrapContent; // Layout height policy
44 private float weight = 0.0f; // Weighting of child View in a Layout
45 private bool backgroundImageSynchronousLoading = false;
46 private bool excludeLayouting = false;
47 private LayoutTransition layoutTransition;
48 private TransitionOptions transitionOptions = null;
49 private ThemeData themeData;
50 private bool isThemeChanged = false;
52 // List of constraints
53 private Constraint widthConstraint = null;
54 private Constraint heightConstraint = null;
56 private Size2D internalMaximumSize = null;
57 private Size2D internalMinimumSize = null;
58 private Extents internalMargin = null;
59 private Extents internalPadding = null;
60 private Vector3 internalSizeModeFactor = null;
61 private Vector2 internalCellIndex = null;
62 private Color internalBackgroundColor = null;
63 private Color internalColor = null;
64 private Position internalPivotPoint = null;
65 private Position internalPosition = null;
66 private Position2D internalPosition2D = null;
67 private Vector3 internalScale = null;
68 private Size internalSize = null;
69 private Size2D internalSize2D = null;
70 private int layoutCount = 0;
74 RegisterPropertyGroup(PositionProperty, positionPropertyGroup);
75 RegisterPropertyGroup(Position2DProperty, positionPropertyGroup);
76 RegisterPropertyGroup(PositionXProperty, positionPropertyGroup);
77 RegisterPropertyGroup(PositionYProperty, positionPropertyGroup);
79 RegisterPropertyGroup(SizeProperty, sizePropertyGroup);
80 RegisterPropertyGroup(Size2DProperty, sizePropertyGroup);
81 RegisterPropertyGroup(SizeWidthProperty, sizePropertyGroup);
82 RegisterPropertyGroup(SizeHeightProperty, sizePropertyGroup);
84 RegisterPropertyGroup(ScaleProperty, scalePropertyGroup);
85 RegisterPropertyGroup(ScaleXProperty, scalePropertyGroup);
86 RegisterPropertyGroup(ScaleYProperty, scalePropertyGroup);
87 RegisterPropertyGroup(ScaleZProperty, scalePropertyGroup);
89 RegisterAccessibilityDelegate();
93 /// Creates a new instance of a view.
95 /// <since_tizen> 3 </since_tizen>
96 public View() : this(Interop.View.New(), true)
98 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
102 [EditorBrowsable(EditorBrowsableState.Never)]
103 public View(ViewStyle viewStyle) : this(Interop.View.New(), true, viewStyle)
108 /// Create a new instance of a View with setting the status of shown or hidden.
110 /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
111 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
112 [EditorBrowsable(EditorBrowsableState.Never)]
113 public View(bool shown) : this(Interop.View.New(), true)
115 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 internal View(View uiControl, bool shown = true) : this(Interop.View.NewView(View.getCPtr(uiControl)), true)
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 backgroundExtraData = uiControl.backgroundExtraData == null ? null : new BackgroundExtraData(uiControl.backgroundExtraData);
130 internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
132 InitializeStyle(viewStyle);
135 internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn)
139 PositionUsesPivotPoint = false;
142 onWindowSendEventCallback = SendViewAddedEventToWindow;
143 using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(SwigCPtr), false);
144 signal?.Connect(onWindowSendEventCallback);
146 hitTestResultDataCallback = OnHitTestResult;
147 using TouchDataSignal touchDataSignal = new TouchDataSignal(Interop.ActorSignal.ActorHitTestResultSignal(SwigCPtr), false);
148 touchDataSignal?.Connect(hitTestResultDataCallback);
157 internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168 /// The event that is triggered when the View's ControlState is changed.
170 [EditorBrowsable(EditorBrowsableState.Never)]
171 public event EventHandler<ControlStateChangedEventArgs> ControlStateChangedEvent;
173 internal event EventHandler<ControlStateChangedEventArgs> ControlStateChangeEventInternal;
177 /// Flag to indicate if layout set explicitly via API call or View was automatically given a Layout.
179 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
180 [EditorBrowsable(EditorBrowsableState.Never)]
181 public bool LayoutSet
190 /// Flag to allow Layouting to be disabled for Views.
191 /// Once a View has a Layout set then any children added to Views from then on will receive
192 /// automatic Layouts.
194 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
195 [EditorBrowsable(EditorBrowsableState.Never)]
196 public static bool LayoutingDisabled { get; set; } = true;
199 /// Deprecate. Please do not use this.
200 /// The style instance applied to this view.
201 /// Note that please do not modify the ViewStyle.
202 /// Modifying ViewStyle will affect other views with same ViewStyle.
204 [EditorBrowsable(EditorBrowsableState.Never)]
205 protected ViewStyle ViewStyle
209 if (themeData == null) themeData = new ThemeData();
211 if (themeData.viewStyle == null)
213 ApplyStyle(CreateViewStyle());
215 return themeData.viewStyle;
220 /// Get/Set the control state.
221 /// Note that the ControlState only available for the classes derived from Control.
222 /// If the classes that are not derived from Control (such as View, ImageView and TextLabel) want to use this system,
223 /// please set <see cref="EnableControlState"/> to true.
225 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
226 [EditorBrowsable(EditorBrowsableState.Never)]
227 public ControlState ControlState
231 return themeData == null ? ControlState.Normal : themeData.controlStates;
235 if (ControlState == value)
240 var prevState = ControlState;
242 if (themeData == null) themeData = new ThemeData();
243 themeData.controlStates = value;
245 var changeInfo = new ControlStateChangedEventArgs(prevState, value);
247 ControlStateChangeEventInternal?.Invoke(this, changeInfo);
249 if (themeData.ControlStatePropagation)
251 foreach (View child in Children)
253 child.ControlState = value;
257 OnControlStateChanged(changeInfo);
259 ControlStateChangedEvent?.Invoke(this, changeInfo);
264 /// Gets / Sets the status of whether the view is excluded from its parent's layouting or not.
266 /// This will be public opened later after ACR done. Before ACR, need to be hidden as inhouse API.
267 [EditorBrowsable(EditorBrowsableState.Never)]
268 public bool ExcludeLayouting
272 return (bool)GetValue(ExcludeLayoutingProperty);
276 SetValue(ExcludeLayoutingProperty, value);
277 NotifyPropertyChanged();
281 private bool InternalExcludeLayouting
285 return excludeLayouting;
289 excludeLayouting = value;
290 if (Layout != null && Layout.SetPositionByLayout == value)
292 Layout.SetPositionByLayout = !value;
293 Layout.RequestLayout();
299 /// The StyleName, type string.
300 /// The value indicates DALi style name defined in json theme file.
302 /// <since_tizen> 3 </since_tizen>
303 public string StyleName
307 return (string)GetValue(StyleNameProperty);
311 SetValue(StyleNameProperty, value);
312 NotifyPropertyChanged();
317 /// The KeyInputFocus, type bool.
319 [EditorBrowsable(EditorBrowsableState.Never)]
320 public bool KeyInputFocus
324 return (bool)GetValue(KeyInputFocusProperty);
328 SetValue(KeyInputFocusProperty, value);
329 NotifyPropertyChanged();
334 /// The mutually exclusive with "backgroundImage" and "background" type Vector4.
338 /// The property cascade chaining set is not recommended.
341 /// Animatable - This property can be animated using <c>Animation</c> class.
343 /// animation.AnimateTo(view, "BackgroundColor", new Color(r, g, b, a));
348 /// This way is recommended for setting the property
350 /// var view = new View();
351 /// view.BackgroundColor = new Color(0.5f, 0.1f, 0, 1);
353 /// This way to set the property is prohibited
355 /// view.BackgroundColor.R = 0.5f; //This does not guarantee a proper operation
358 /// <since_tizen> 3 </since_tizen>
359 public Color BackgroundColor
363 return (Color)GetValue(BackgroundColorProperty);
367 SetValue(BackgroundColorProperty, value);
368 NotifyPropertyChanged();
373 /// The mutually exclusive with "backgroundColor" and "background" type Map.
375 /// <since_tizen> 3 </since_tizen>
376 public string BackgroundImage
380 return (string)GetValue(BackgroundImageProperty);
384 SetValue(BackgroundImageProperty, value);
385 NotifyPropertyChanged();
390 /// Get or set the border of background image.
392 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
393 [EditorBrowsable(EditorBrowsableState.Never)]
394 public Rectangle BackgroundImageBorder
398 return (Rectangle)GetValue(BackgroundImageBorderProperty);
402 SetValue(BackgroundImageBorderProperty, value);
403 NotifyPropertyChanged();
408 /// The background of view.
410 /// <since_tizen> 3 </since_tizen>
411 public Tizen.NUI.PropertyMap Background
415 return (PropertyMap)GetValue(BackgroundProperty);
419 SetValue(BackgroundProperty, value);
420 NotifyPropertyChanged();
425 /// Describes a shadow as an image for a View.
426 /// It is null by default.
429 /// Getter returns copied instance of current shadow.
432 /// The mutually exclusive with "BoxShadow".
436 /// Animatable - This property can be animated using <c>Animation</c> class.
437 /// To animate this property, specify a sub-property with separator ".", for example, "ImageShadow.Offset".
439 /// animation.AnimateTo(view, "ImageShadow.Offset", new Vector2(10, 10));
441 /// Animatable sub-property : Offset.
444 [EditorBrowsable(EditorBrowsableState.Never)]
445 public ImageShadow ImageShadow
449 return (ImageShadow)GetValue(ImageShadowProperty);
453 SetValue(ImageShadowProperty, value);
454 NotifyPropertyChanged();
459 /// Describes a box shaped shadow drawing for a View.
460 /// It is null by default.
463 /// The mutually exclusive with "ImageShadow".
467 /// Animatable - This property can be animated using <c>Animation</c> class.
468 /// To animate this property, specify a sub-property with separator ".", for example, "BoxShadow.BlurRadius".
470 /// animation.AnimateTo(view, "BoxShadow.BlurRadius", 10.0f);
472 /// Animatable sub-property : Offset, Color, BlurRadius.
475 /// <since_tizen> 9 </since_tizen>
476 public Shadow BoxShadow
480 return (Shadow)GetValue(BoxShadowProperty);
484 SetValue(BoxShadowProperty, value);
485 NotifyPropertyChanged();
490 /// The radius for the rounded corners of the View.
491 /// This will rounds background and shadow edges.
492 /// 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).
493 /// Each radius will clamp internally to the half of smaller of the view's width or height.
494 /// Note that, an image background (or shadow) may not have rounded corners if it uses a Border property.
498 /// Animatable - This property can be animated using <c>Animation</c> class.
500 /// animation.AnimateTo(view, "CornerRadius", new Vector4(10, 10, 10, 10));
504 /// <since_tizen> 9 </since_tizen>
505 public Vector4 CornerRadius
509 return (Vector4)GetValue(CornerRadiusProperty);
513 SetValue(CornerRadiusProperty, value);
514 NotifyPropertyChanged();
519 /// Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units).
520 /// It is absolute by default.
521 /// When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
523 /// <since_tizen> 9 </since_tizen>
524 public VisualTransformPolicyType CornerRadiusPolicy
526 get => (VisualTransformPolicyType)GetValue(CornerRadiusPolicyProperty);
527 set => SetValue(CornerRadiusPolicyProperty, value);
531 /// The width for the borderline of the View.
535 /// Animatable - This property can be animated using <c>Animation</c> class.
537 /// animation.AnimateTo(view, "BorderlineWidth", 100.0f);
540 /// Note that, an image background may not have borderline if it uses the Border property.
542 /// <since_tizen> 9 </since_tizen>
543 public float BorderlineWidth
547 return (float)GetValue(BorderlineWidthProperty);
551 SetValue(BorderlineWidthProperty, value);
552 NotifyPropertyChanged();
557 /// The color for the borderline of the View.
558 /// It is Color.Black by default.
562 /// Animatable - This property can be animated using <c>Animation</c> class.
564 /// animation.AnimateTo(view, "BorderlineColor", new Color(r, g, b, a));
568 /// <since_tizen> 9 </since_tizen>
569 public Color BorderlineColor
573 return (Color)GetValue(BorderlineColorProperty);
577 SetValue(BorderlineColorProperty, value);
578 NotifyPropertyChanged();
583 /// The Relative offset for the borderline of the View.
584 /// Recommended range : [-1.0f to 1.0f].
585 /// If -1.0f, draw borderline inside of the View.
586 /// If 1.0f, draw borderline outside of the View.
587 /// If 0.0f, draw borderline half inside and half outside.
588 /// It is 0.0f by default.
592 /// Animatable - This property can be animated using <c>Animation</c> class.
594 /// animation.AnimateTo(view, "BorderlineOffset", -1.0f);
598 /// <since_tizen> 9 </since_tizen>
599 public float BorderlineOffset
603 return (float)GetValue(BorderlineOffsetProperty);
607 SetValue(BorderlineOffsetProperty, value);
608 NotifyPropertyChanged();
613 /// The current state of the view.
615 /// <since_tizen> 3 </since_tizen>
620 return (States)GetValue(StateProperty);
624 SetValue(StateProperty, value);
625 NotifyPropertyChanged();
630 /// The current sub state of the view.
632 /// <since_tizen> 3 </since_tizen>
633 public States SubState
637 return (States)GetValue(SubStateProperty);
641 SetValue(SubStateProperty, value);
642 NotifyPropertyChanged();
647 /// Displays a tooltip
649 /// <since_tizen> 3 </since_tizen>
650 public Tizen.NUI.PropertyMap Tooltip
654 return (PropertyMap)GetValue(TooltipProperty);
658 SetValue(TooltipProperty, value);
659 NotifyPropertyChanged();
664 /// Displays a tooltip as a text.
666 /// <since_tizen> 3 </since_tizen>
667 public string TooltipText
671 return GetValue(TooltipTextProperty) as string;
675 SetValue(TooltipTextProperty, value);
679 private string InternalTooltipText
683 using (var propertyValue = GetProperty(Property.TOOLTIP))
685 if (propertyValue != null && propertyValue.Get(out string retrivedValue))
687 return retrivedValue;
689 NUILog.Error($"[ERROR] Fail to get TooltipText! Return error MSG (error to get TooltipText)!");
690 return "error to get TooltipText";
695 var temp = new Tizen.NUI.PropertyValue(value);
696 SetProperty(View.Property.TOOLTIP, temp);
698 NotifyPropertyChanged();
703 /// The Child property of FlexContainer.<br />
704 /// The proportion of the free space in the container, the flex item will receive.<br />
705 /// If all items in the container set this property, their sizes will be proportional to the specified flex factor.<br />
707 /// <since_tizen> 3 </since_tizen>
708 [Obsolete("Deprecated in API8, will be removed in API10.")]
713 return (float)GetValue(FlexProperty);
717 SetValue(FlexProperty, value);
718 NotifyPropertyChanged();
723 /// The Child property of FlexContainer.<br />
724 /// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.<br />
726 /// <since_tizen> 3 </since_tizen>
727 [Obsolete("Deprecated in API8, will be removed in API10.")]
732 return (int)GetValue(AlignSelfProperty);
736 SetValue(AlignSelfProperty, value);
737 NotifyPropertyChanged();
742 /// The Child property of FlexContainer.<br />
743 /// The space around the flex item.<br />
746 /// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
748 /// <since_tizen> 3 </since_tizen>
749 [Obsolete("Deprecated in API8, will be removed in API10.")]
750 public Vector4 FlexMargin
754 Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
755 return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
759 SetValue(FlexMarginProperty, value);
760 NotifyPropertyChanged();
765 /// The top-left cell this child occupies, if not set, the first available cell is used.
768 /// The property cascade chaining set is not recommended.
769 /// Also, this property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
772 /// This way is recommended for setting the property
774 /// var view = new View();
775 /// view.CellIndex = new Vector2(1, 3);
777 /// This way to set the property is prohibited
779 /// view.CellIndex.X = 1; //This does not guarantee a proper operation
782 /// <since_tizen> 3 </since_tizen>
783 public Vector2 CellIndex
787 return (Vector2)GetValue(CellIndexProperty);
791 SetValue(CellIndexProperty, value);
792 NotifyPropertyChanged();
797 /// The number of rows this child occupies, if not set, the default value is 1.
800 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
802 /// <since_tizen> 3 </since_tizen>
807 return (float)GetValue(RowSpanProperty);
811 SetValue(RowSpanProperty, value);
812 NotifyPropertyChanged();
817 /// The number of columns this child occupies, if not set, the default value is 1.
820 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
822 /// <since_tizen> 3 </since_tizen>
823 public float ColumnSpan
827 return (float)GetValue(ColumnSpanProperty);
831 SetValue(ColumnSpanProperty, value);
832 NotifyPropertyChanged();
837 /// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
840 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
842 /// <since_tizen> 3 </since_tizen>
843 public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
847 return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
851 SetValue(CellHorizontalAlignmentProperty, value);
852 NotifyPropertyChanged();
857 /// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
860 /// This property is for <see cref="TableView"/> class. Please use the property for the child position of <see cref="TableView"/>.
862 /// <since_tizen> 3 </since_tizen>
863 public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
867 return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
871 SetValue(CellVerticalAlignmentProperty, value);
872 NotifyPropertyChanged();
877 /// The left focusable view.<br />
878 /// This will return null if not set.<br />
879 /// This will also return null if the specified left focusable view is not on a window.<br />
881 /// <since_tizen> 3 </since_tizen>
882 public View LeftFocusableView
884 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
887 return (View)GetValue(LeftFocusableViewProperty);
891 SetValue(LeftFocusableViewProperty, value);
892 NotifyPropertyChanged();
897 /// The right focusable view.<br />
898 /// This will return null if not set.<br />
899 /// This will also return null if the specified right focusable view is not on a window.<br />
901 /// <since_tizen> 3 </since_tizen>
902 public View RightFocusableView
904 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
907 return (View)GetValue(RightFocusableViewProperty);
911 SetValue(RightFocusableViewProperty, value);
912 NotifyPropertyChanged();
917 /// The up focusable view.<br />
918 /// This will return null if not set.<br />
919 /// This will also return null if the specified up focusable view is not on a window.<br />
921 /// <since_tizen> 3 </since_tizen>
922 public View UpFocusableView
924 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
927 return (View)GetValue(UpFocusableViewProperty);
931 SetValue(UpFocusableViewProperty, value);
932 NotifyPropertyChanged();
937 /// The down focusable view.<br />
938 /// This will return null if not set.<br />
939 /// This will also return null if the specified down focusable view is not on a window.<br />
941 /// <since_tizen> 3 </since_tizen>
942 public View DownFocusableView
944 // As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
947 return (View)GetValue(DownFocusableViewProperty);
951 SetValue(DownFocusableViewProperty, value);
952 NotifyPropertyChanged();
957 /// Whether the view should be focusable by keyboard navigation.
959 /// <since_tizen> 3 </since_tizen>
960 public bool Focusable
964 SetValue(FocusableProperty, value);
965 NotifyPropertyChanged();
969 return (bool)GetValue(FocusableProperty);
974 /// 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.
975 /// Note : Default value is true.
977 [EditorBrowsable(EditorBrowsableState.Never)]
978 public bool FocusableChildren
982 SetValue(FocusableChildrenProperty, value);
983 NotifyPropertyChanged();
987 return (bool)GetValue(FocusableChildrenProperty);
992 /// Whether this view can focus by touch.
993 /// If Focusable is false, FocusableInTouch is disabled.
994 /// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
996 [EditorBrowsable(EditorBrowsableState.Never)]
997 public bool FocusableInTouch
1001 SetValue(FocusableInTouchProperty, value);
1002 NotifyPropertyChanged();
1006 return (bool)GetValue(FocusableInTouchProperty);
1011 /// Retrieves the position of the view.<br />
1012 /// The coordinates are relative to the view's parent.<br />
1014 /// <since_tizen> 3 </since_tizen>
1015 public Position CurrentPosition
1019 return GetCurrentPosition();
1024 /// Sets the size of a view for the width and the height.<br />
1025 /// Geometry can be scaled to fit within this area.<br />
1026 /// This does not interfere with the view's scale factor.<br />
1027 /// The views default depth is the minimum of width and height.<br />
1030 /// The property cascade chaining set is not recommended.
1033 /// This way is recommended for setting the property
1035 /// var view = new View();
1036 /// view.Size2D = new Size2D(100, 200);
1038 /// This way to set the property is prohibited
1040 /// view.Size2D.Width = 100; //This does not guarantee a proper operation
1043 /// <since_tizen> 3 </since_tizen>
1044 public Size2D Size2D
1048 var temp = (Size2D)GetValue(Size2DProperty);
1050 if (this.Layout == null)
1052 if (temp.Width < 0) { temp.Width = 0; }
1053 if (temp.Height < 0) { temp.Height = 0; }
1060 SetValue(Size2DProperty, value);
1062 NotifyPropertyChanged();
1067 /// Retrieves the size of the view.<br />
1068 /// The coordinates are relative to the view's parent.<br />
1070 /// <since_tizen> 3 </since_tizen>
1071 public Size2D CurrentSize
1075 return GetCurrentSize();
1080 /// Retrieves and sets the view's opacity.<br />
1084 /// Animatable - This property can be animated using <c>Animation</c> class.
1086 /// animation.AnimateTo(view, "Opacity", 0.5f);
1090 /// <since_tizen> 3 </since_tizen>
1091 public float Opacity
1095 return (float)GetValue(OpacityProperty);
1099 SetValue(OpacityProperty, value);
1100 NotifyPropertyChanged();
1105 /// Sets the position of the view for X and Y.<br />
1106 /// By default, sets the position vector between the parent origin and the pivot point (default).<br />
1107 /// If the position inheritance is disabled, sets the world position.<br />
1110 /// The property cascade chaining set is not recommended.
1113 /// This way is recommended for setting the property
1115 /// var view = new View();
1116 /// view.Position2D = new Position2D(100, 200);
1118 /// This way to set the property is prohibited
1120 /// view.Position2D.X = 100; //This does not guarantee a proper operation
1123 /// <since_tizen> 3 </since_tizen>
1124 public Position2D Position2D
1128 return (Position2D)GetValue(Position2DProperty);
1132 SetValue(Position2DProperty, value);
1133 NotifyPropertyChanged();
1138 /// Retrieves the screen position of the view.<br />
1140 /// <since_tizen> 3 </since_tizen>
1141 public Vector2 ScreenPosition
1145 Vector2 temp = new Vector2(0.0f, 0.0f);
1146 var pValue = GetProperty(View.Property.ScreenPosition);
1154 /// Determines whether the pivot point should be used to determine the position of the view.
1155 /// This is false by default.
1157 /// <remarks>If false, then the top-left of the view is used for the position.
1158 /// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
1160 /// <since_tizen> 3 </since_tizen>
1161 public bool PositionUsesPivotPoint
1165 return (bool)GetValue(PositionUsesPivotPointProperty);
1169 SetValue(PositionUsesPivotPointProperty, value);
1170 NotifyPropertyChanged();
1175 /// Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead!
1177 /// <since_tizen> 3 </since_tizen>
1178 [Obsolete("Deprecated in API5; Will be removed in API8. Please use PositionUsesPivotPoint instead! " +
1180 "View view = new View(); " +
1181 "view.PivotPoint = PivotPoint.Center; " +
1182 "view.PositionUsesPivotPoint = true;" +
1183 " Deprecated in API5: Will be removed in API8")]
1184 [EditorBrowsable(EditorBrowsableState.Never)]
1185 public bool PositionUsesAnchorPoint
1189 return (bool)GetValue(PositionUsesAnchorPointProperty);
1193 SetValue(PositionUsesAnchorPointProperty, value);
1197 private bool InternalPositionUsesAnchorPoint
1202 var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
1203 pValue.Get(out temp);
1209 var temp = new Tizen.NUI.PropertyValue(value);
1210 SetProperty(View.Property.PositionUsesAnchorPoint, temp);
1212 NotifyPropertyChanged();
1217 /// Queries whether the view is connected to the stage.<br />
1218 /// When a view is connected, it will be directly or indirectly parented to the root view.<br />
1220 /// <since_tizen> 3 </since_tizen>
1221 public bool IsOnWindow
1230 /// Gets the depth in the hierarchy for the view.
1232 /// <since_tizen> 3 </since_tizen>
1233 public int HierarchyDepth
1237 return GetHierarchyDepth();
1242 /// Sets the sibling order of the view so the depth position can be defined within the same parent.
1245 /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
1246 /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
1247 /// The values set by this property will likely change.
1249 /// <since_tizen> 3 </since_tizen>
1250 public int SiblingOrder
1254 return (int)GetValue(SiblingOrderProperty);
1258 SetValue(SiblingOrderProperty, value);
1260 Layout?.ChangeLayoutSiblingOrder(value);
1262 NotifyPropertyChanged();
1267 /// Returns the natural size of the view.
1270 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1272 /// <since_tizen> 5 </since_tizen>
1273 public Vector3 NaturalSize
1277 Vector3 ret = GetNaturalSize();
1278 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1284 /// Returns the natural size (Size2D) of the view.
1287 /// Deriving classes stipulate the natural size and by default a view has a zero natural size.
1289 /// <since_tizen> 4 </since_tizen>
1290 public Size2D NaturalSize2D
1294 Vector3 temp = GetNaturalSize();
1295 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
1297 Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
1304 /// Gets or sets the origin of a view within its parent's area.<br />
1305 /// 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 />
1306 /// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).<br />
1307 /// A view's position is the distance between this origin and the view's anchor-point.<br />
1309 /// <pre>The view has been initialized.</pre>
1310 /// <since_tizen> 3 </since_tizen>
1311 public Position ParentOrigin
1315 Position tmp = (Position)GetValue(ParentOriginProperty);
1316 return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
1320 SetValue(ParentOriginProperty, value);
1321 NotifyPropertyChanged();
1326 /// Gets or sets the anchor-point of a view.<br />
1327 /// 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 />
1328 /// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).<br />
1329 /// A view position is the distance between its parent-origin and this anchor-point.<br />
1330 /// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.<br />
1331 /// <pre>The view has been initialized.</pre>
1334 /// The property cascade chaining set is not recommended.
1337 /// This way is recommended for setting the property
1339 /// var view = new View();
1340 /// view.PivotPoint = PivotPoint.Center;
1342 /// This way to set the property is prohibited
1344 /// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
1347 /// <since_tizen> 3 </since_tizen>
1348 public Position PivotPoint
1352 return (Position)GetValue(PivotPointProperty);
1356 SetValue(PivotPointProperty, value);
1357 NotifyPropertyChanged();
1362 /// Gets or sets the size width of the view.
1366 /// Animatable - This property can be animated using <c>Animation</c> class.
1368 /// animation.AnimateTo(view, "SizeWidth", 500.0f);
1372 /// <since_tizen> 3 </since_tizen>
1373 public float SizeWidth
1377 return (float)GetValue(SizeWidthProperty);
1381 SetValue(SizeWidthProperty, value);
1382 NotifyPropertyChanged();
1387 /// Gets or sets the size height of the view.
1391 /// Animatable - This property can be animated using <c>Animation</c> class.
1394 /// animation.AnimateTo(view, "SizeHeight", 500.0f);
1397 /// <since_tizen> 3 </since_tizen>
1398 public float SizeHeight
1402 return (float)GetValue(SizeHeightProperty);
1406 SetValue(SizeHeightProperty, value);
1407 NotifyPropertyChanged();
1412 /// Gets or sets the position of the view.<br />
1413 /// By default, sets the position vector between the parent origin and pivot point (default).<br />
1414 /// If the position inheritance is disabled, sets the world position.<br />
1418 /// Animatable - This property can be animated using <c>Animation</c> class.
1420 /// animation.AnimateTo(view, "Position", new Position(50, 0));
1423 /// The property cascade chaining set is not recommended.
1426 /// This way is recommended for setting the property
1428 /// var view = new View();
1429 /// view.Position = new Position(100, 200.5f, 0);
1431 /// This way to set the property is prohibited
1433 /// view.Position.Y = 200.5f; //This does not guarantee a proper operation
1436 /// <since_tizen> 3 </since_tizen>
1437 public Position Position
1441 return (Position)GetValue(PositionProperty);
1445 SetValue(PositionProperty, value);
1446 NotifyPropertyChanged();
1451 /// Gets or sets the position X of the view.
1455 /// Animatable - This property can be animated using <c>Animation</c> class.
1457 /// animation.AnimateTo(view, "PositionX", 50.0f);
1461 /// <since_tizen> 3 </since_tizen>
1462 public float PositionX
1466 return (float)GetValue(PositionXProperty);
1470 SetValue(PositionXProperty, value);
1471 NotifyPropertyChanged();
1476 /// Gets or sets the position Y of the view.
1480 /// Animatable - This property can be animated using <c>Animation</c> class.
1482 /// animation.AnimateTo(view, "PositionY", 50.0f);
1486 /// <since_tizen> 3 </since_tizen>
1487 public float PositionY
1491 return (float)GetValue(PositionYProperty);
1495 SetValue(PositionYProperty, value);
1496 NotifyPropertyChanged();
1501 /// Gets or sets the position Z of the view.
1505 /// Animatable - This property can be animated using <c>Animation</c> class.
1507 /// animation.AnimateTo(view, "PositionZ", 50.0f);
1511 /// <since_tizen> 3 </since_tizen>
1512 public float PositionZ
1516 return (float)GetValue(PositionZProperty);
1520 SetValue(PositionZProperty, value);
1521 NotifyPropertyChanged();
1526 /// Gets or sets the world position of the view.
1528 /// <since_tizen> 3 </since_tizen>
1529 public Vector3 WorldPosition
1533 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1534 var pValue = GetProperty(View.Property.WorldPosition);
1542 /// Gets or sets the orientation of the view.<br />
1543 /// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.<br />
1547 /// This is an asynchronous method.
1550 /// Animatable - This property can be animated using <c>Animation</c> class.
1552 /// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
1556 /// <since_tizen> 3 </since_tizen>
1557 public Rotation Orientation
1561 return (Rotation)GetValue(OrientationProperty);
1565 SetValue(OrientationProperty, value);
1566 NotifyPropertyChanged();
1571 /// Gets or sets the world orientation of the view.<br />
1573 /// <since_tizen> 3 </since_tizen>
1574 public Rotation WorldOrientation
1578 Rotation temp = new Rotation();
1579 var pValue = GetProperty(View.Property.WorldOrientation);
1587 /// Gets or sets the scale factor applied to the view.<br />
1591 /// Animatable - This property can be animated using <c>Animation</c> class.
1593 /// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
1596 /// The property cascade chaining set is not recommended.
1599 /// This way is recommended for setting the property
1601 /// var view = new View();
1602 /// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
1604 /// This way to set the property is prohibited
1606 /// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
1609 /// <since_tizen> 3 </since_tizen>
1610 public Vector3 Scale
1614 return (Vector3)GetValue(ScaleProperty);
1618 SetValue(ScaleProperty, value);
1619 NotifyPropertyChanged();
1624 /// Gets or sets the scale X factor applied to the view.
1628 /// Animatable - This property can be animated using <c>Animation</c> class.
1630 /// animation.AnimateTo(view, "ScaleX", 1.5f);
1634 /// <since_tizen> 3 </since_tizen>
1639 return (float)GetValue(ScaleXProperty);
1643 SetValue(ScaleXProperty, value);
1644 NotifyPropertyChanged();
1649 /// Gets or sets the scale Y factor applied to the view.
1653 /// Animatable - This property can be animated using <c>Animation</c> class.
1655 /// animation.AnimateTo(view, "ScaleY", 1.5f);
1659 /// <since_tizen> 3 </since_tizen>
1664 return (float)GetValue(ScaleYProperty);
1668 SetValue(ScaleYProperty, value);
1669 NotifyPropertyChanged();
1674 /// Gets or sets the scale Z factor applied to the view.
1678 /// Animatable - This property can be animated using <c>Animation</c> class.
1680 /// animation.AnimateTo(view, "ScaleZ", 1.5f);
1684 /// <since_tizen> 3 </since_tizen>
1689 return (float)GetValue(ScaleZProperty);
1693 SetValue(ScaleZProperty, value);
1694 NotifyPropertyChanged();
1699 /// Gets the world scale of the view.
1701 /// <since_tizen> 3 </since_tizen>
1702 public Vector3 WorldScale
1706 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
1707 var pValue = GetProperty(View.Property.WorldScale);
1715 /// Retrieves the visibility flag of the view.
1719 /// If the view is not visible, then the view and its children will not be rendered.
1720 /// 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.
1723 /// Animatable - This property can be animated using <c>Animation</c> class.
1725 /// animation.AnimateTo(view, "Visibility", false);
1729 /// <since_tizen> 3 </since_tizen>
1730 public bool Visibility
1735 var pValue = GetProperty(View.Property.VISIBLE);
1736 pValue.Get(out temp);
1743 /// Gets the view's world color.
1745 /// <since_tizen> 3 </since_tizen>
1746 public Vector4 WorldColor
1750 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
1751 var pValue = GetProperty(View.Property.WorldColor);
1759 /// Gets or sets the view's name.
1761 /// <since_tizen> 3 </since_tizen>
1766 return (string)GetValue(NameProperty);
1770 SetValue(NameProperty, value);
1771 NotifyPropertyChanged();
1776 /// Get the number of children held by the view.
1778 /// <since_tizen> 3 </since_tizen>
1779 public new uint ChildCount
1783 return Convert.ToUInt32(Children.Count);
1788 /// Gets the view's ID.
1791 /// <since_tizen> 3 </since_tizen>
1801 /// Gets or sets the status of whether the view should emit touch or hover signals.
1802 /// If a View is made insensitive, then the View and its children are not hittable.
1804 /// <since_tizen> 3 </since_tizen>
1805 public bool Sensitive
1809 return (bool)GetValue(SensitiveProperty);
1813 SetValue(SensitiveProperty, value);
1814 NotifyPropertyChanged();
1819 /// Gets or sets the status of whether the view should be enabled user interactions.
1820 /// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
1822 /// <since_tizen> tizen_next </since_tizen>
1823 [EditorBrowsable(EditorBrowsableState.Never)]
1824 public bool IsEnabled
1828 return (bool)GetValue(IsEnabledProperty);
1832 SetValue(IsEnabledProperty, value);
1833 NotifyPropertyChanged();
1838 /// 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.
1840 /// <since_tizen> 3 </since_tizen>
1841 public bool LeaveRequired
1845 return (bool)GetValue(LeaveRequiredProperty);
1849 SetValue(LeaveRequiredProperty, value);
1850 NotifyPropertyChanged();
1855 /// Gets or sets the status of whether a child view inherits it's parent's orientation.
1857 /// <since_tizen> 3 </since_tizen>
1858 public bool InheritOrientation
1862 return (bool)GetValue(InheritOrientationProperty);
1866 SetValue(InheritOrientationProperty, value);
1867 NotifyPropertyChanged();
1872 /// Gets or sets the status of whether a child view inherits it's parent's scale.
1874 /// <since_tizen> 3 </since_tizen>
1875 public bool InheritScale
1879 return (bool)GetValue(InheritScaleProperty);
1883 SetValue(InheritScaleProperty, value);
1884 NotifyPropertyChanged();
1889 /// Gets or sets the status of how the view and its children should be drawn.<br />
1890 /// Not all views are renderable, but DrawMode can be inherited from any view.<br />
1891 /// 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 />
1892 /// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.<br />
1893 /// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.<br />
1894 /// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.<br />
1896 /// <since_tizen> 3 </since_tizen>
1897 public DrawModeType DrawMode
1901 return (DrawModeType)GetValue(DrawModeProperty);
1905 SetValue(DrawModeProperty, value);
1906 NotifyPropertyChanged();
1911 /// Gets or sets the relative to parent size factor of the view.<br />
1912 /// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.<br />
1913 /// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.<br />
1916 /// The property cascade chaining set is not recommended.
1919 /// This way is recommended for setting the property
1921 /// var text = new TextField();
1922 /// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
1924 /// This way to set the property is prohibited
1926 /// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
1929 /// <since_tizen> 3 </since_tizen>
1930 public Vector3 SizeModeFactor
1934 return (Vector3)GetValue(SizeModeFactorProperty);
1938 SetValue(SizeModeFactorProperty, value);
1939 NotifyPropertyChanged();
1944 /// Gets or sets the width resize policy to be used.
1946 /// <since_tizen> 3 </since_tizen>
1947 public ResizePolicyType WidthResizePolicy
1951 return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
1955 SetValue(WidthResizePolicyProperty, value);
1956 NotifyPropertyChanged();
1961 /// Gets or sets the height resize policy to be used.
1963 /// <since_tizen> 3 </since_tizen>
1964 public ResizePolicyType HeightResizePolicy
1968 return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
1972 SetValue(HeightResizePolicyProperty, value);
1973 NotifyPropertyChanged();
1978 /// Gets or sets the policy to use when setting size with size negotiation.<br />
1979 /// Defaults to SizeScalePolicyType.UseSizeSet.<br />
1981 /// <since_tizen> 3 </since_tizen>
1982 public SizeScalePolicyType SizeScalePolicy
1986 return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
1990 SetValue(SizeScalePolicyProperty, value);
1991 NotifyPropertyChanged();
1996 /// Gets or sets the status of whether the width size is dependent on the height size.
1998 /// <since_tizen> 3 </since_tizen>
1999 public bool WidthForHeight
2003 return (bool)GetValue(WidthForHeightProperty);
2007 SetValue(WidthForHeightProperty, value);
2008 NotifyPropertyChanged();
2013 /// Gets or sets the status of whether the height size is dependent on the width size.
2015 /// <since_tizen> 3 </since_tizen>
2016 public bool HeightForWidth
2020 return (bool)GetValue(HeightForWidthProperty);
2024 SetValue(HeightForWidthProperty, value);
2025 NotifyPropertyChanged();
2030 /// Gets or sets the padding for use in layout.
2033 /// The property cascade chaining set is not recommended.
2036 /// This way is recommended for setting the property
2038 /// var view = new View();
2039 /// view.Padding = new Extents(5, 5, 5, 5);
2041 /// This way to set the property is prohibited
2043 /// view.Padding.Start = 5; //This does not guarantee a proper operation
2046 /// <since_tizen> 5 </since_tizen>
2047 public Extents Padding
2051 // If View has a Layout then padding in stored in the base Layout class
2054 return Layout.Padding;
2058 return (Extents)GetValue(PaddingProperty);
2060 // Two return points to prevent creating a zeroed Extent native object before assignment
2064 Extents padding = value;
2067 // Layout set so store Padding in LayoutItem instead of in View.
2068 // If View stores the Padding value then Legacy Size Negotiation will overwrite
2069 // the position and sizes measure in the Layouting.
2070 Layout.Padding = value;
2071 // If Layout is a LayoutItem then it could be a View that handles it's own padding.
2072 // Let the View keeps it's padding. Still store Padding in Layout to reduce code paths.
2073 if (typeof(LayoutGroup).IsAssignableFrom(Layout.GetType())) // If a Layout container of some kind.
2075 padding = new Extents(0, 0, 0, 0); // Reset value stored in View.
2079 SetValue(PaddingProperty, padding);
2080 NotifyPropertyChanged();
2085 /// Gets or sets the minimum size the view can be assigned in size negotiation.
2087 /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2089 /// The property cascade chaining set is not recommended.
2092 /// This way is recommended for setting the property
2094 /// var view = new View();
2095 /// view.MinimumSize = new Size2D(100, 200);
2097 /// This way to set the property is prohibited
2099 /// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
2102 /// <since_tizen> 3 </since_tizen>
2103 public Size2D MinimumSize
2107 return (Size2D)GetValue(MinimumSizeProperty);
2113 throw new ArgumentNullException(nameof(value));
2117 // Note: it only works if minimum size is >= than natural size.
2118 // To force the size it should be done through the width&height spec or Size2D.
2119 layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
2120 layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
2121 layout.RequestLayout();
2123 SetValue(MinimumSizeProperty, value);
2124 NotifyPropertyChanged();
2129 /// Gets or sets the maximum size the view can be assigned in size negotiation.
2132 /// This way is recommended for setting the property
2134 /// var view = new View();
2135 /// view.MaximumSize = new Size2D(100, 200);
2137 /// This way to set the property is prohibited
2139 /// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
2142 /// <since_tizen> 3 </since_tizen>
2143 public Size2D MaximumSize
2147 return (Size2D)GetValue(MaximumSizeProperty);
2151 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
2152 // MATCH_PARENT spec + parent container size can be used to limit
2155 layout.RequestLayout();
2157 SetValue(MaximumSizeProperty, value);
2158 NotifyPropertyChanged();
2163 /// Gets or sets whether a child view inherits it's parent's position.<br />
2164 /// Default is to inherit.<br />
2165 /// 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 />
2167 /// <since_tizen> 3 </since_tizen>
2168 public bool InheritPosition
2172 return (bool)GetValue(InheritPositionProperty);
2176 SetValue(InheritPositionProperty, value);
2177 NotifyPropertyChanged();
2182 /// Gets or sets the clipping behavior (mode) of it's children.
2184 /// <since_tizen> 3 </since_tizen>
2185 public ClippingModeType ClippingMode
2189 return (ClippingModeType)GetValue(ClippingModeProperty);
2193 SetValue(ClippingModeProperty, value);
2194 NotifyPropertyChanged();
2199 /// Gets the number of renderers held by the view.
2201 /// <since_tizen> 3 </since_tizen>
2202 public uint RendererCount
2206 return GetRendererCount();
2211 /// Deprecated in API5; Will be removed in API8. Please use PivotPoint instead!
2214 /// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
2216 /// <since_tizen> 3 </since_tizen>
2217 [Obsolete("Deprecated in API5; Will be removed in API8. Please use PivotPoint instead! " +
2219 "View view = new View(); " +
2220 "view.PivotPoint = PivotPoint.Center; " +
2221 "view.PositionUsesPivotPoint = true;")]
2222 [EditorBrowsable(EditorBrowsableState.Never)]
2223 public Position AnchorPoint
2227 return GetValue(AnchorPointProperty) as Position;
2231 SetValue(AnchorPointProperty, value);
2235 private Position InternalAnchorPoint
2239 Position temp = new Position(0.0f, 0.0f, 0.0f);
2240 var pValue = GetProperty(View.Property.AnchorPoint);
2243 Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
2249 var temp = new Tizen.NUI.PropertyValue(value);
2250 SetProperty(View.Property.AnchorPoint, temp);
2252 NotifyPropertyChanged();
2257 /// Sets the size of a view for the width, the height and the depth.<br />
2258 /// Geometry can be scaled to fit within this area.<br />
2259 /// This does not interfere with the view's scale factor.<br />
2260 /// The views default depth is the minimum of width and height.<br />
2264 /// Animatable - This property can be animated using <c>Animation</c> class.
2266 /// animation.AnimateTo(view, "Size", new Size(100, 100));
2269 /// The property cascade chaining set is not recommended.
2272 /// This way is recommended for setting the property
2274 /// var view = new View();
2275 /// view.Size = new Size(100.5f, 200, 0);
2277 /// This way to set the property is prohibited
2279 /// view.Size.Width = 100.5f; //This does not guarantee a proper operation
2282 /// <since_tizen> 5 </since_tizen>
2287 return (Size)GetValue(SizeProperty);
2291 SetValue(SizeProperty, value);
2292 NotifyPropertyChanged();
2297 /// Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead!
2299 /// <since_tizen> 3 </since_tizen>
2300 [Obsolete("Deprecated in API5; Will be removed in API8. Please use 'Container GetParent() for derived class' instead! " +
2302 "Container parent = view.GetParent(); " +
2303 "View view = parent as View;")]
2304 [EditorBrowsable(EditorBrowsableState.Never)]
2305 public new View Parent
2310 IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
2311 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2312 BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
2314 if (basehandle is Layer layer)
2316 ret = new View(Layer.getCPtr(layer).Handle, false);
2317 NUILog.Error("This Parent property is deprecated, should do not be used");
2321 ret = basehandle as View;
2324 Interop.BaseHandle.DeleteBaseHandle(CPtr);
2325 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
2327 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
2333 /// Gets/Sets whether inherit parent's the layout Direction.
2335 /// <since_tizen> 4 </since_tizen>
2336 public bool InheritLayoutDirection
2340 return (bool)GetValue(InheritLayoutDirectionProperty);
2344 SetValue(InheritLayoutDirectionProperty, value);
2345 NotifyPropertyChanged();
2350 /// Gets/Sets the layout Direction.
2352 /// <since_tizen> 4 </since_tizen>
2353 public ViewLayoutDirectionType LayoutDirection
2357 return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
2361 SetValue(LayoutDirectionProperty, value);
2362 NotifyPropertyChanged();
2363 layout?.RequestLayout();
2368 /// Gets or sets the Margin for use in layout.
2371 /// Margin property is supported by Layout algorithms and containers.
2372 /// Please Set Layout if you want to use Margin property.
2373 /// The property cascade chaining set is not recommended.
2376 /// This way is recommended for setting the property
2378 /// var view = new View();
2379 /// view.Margin = new Extents(10, 5, 15, 20);
2381 /// This way to set the property is prohibited
2383 /// view.Margin.Top = 15; //This does not guarantee a proper operation
2386 /// <since_tizen> 4 </since_tizen>
2387 public Extents Margin
2391 // If View has a Layout then margin is stored in Layout.
2394 return Layout.Margin;
2398 // If Layout not set then return margin stored in View.
2399 return (Extents)GetValue(MarginProperty);
2401 // Two return points to prevent creating a zeroed Extent native object before assignment
2407 // Layout set so store Margin in LayoutItem instead of View.
2408 // If View stores the Margin too then the Legacy Size Negotiation will
2409 // overwrite the position and size values measured in the Layouting.
2410 Layout.Margin = value;
2411 SetValue(MarginProperty, new Extents(0, 0, 0, 0));
2412 layout?.RequestLayout();
2416 SetValue(MarginProperty, value);
2418 NotifyPropertyChanged();
2419 layout?.RequestLayout();
2424 /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2428 /// // matchParentView matches its size to its parent size.
2429 /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2430 /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2432 /// // wrapContentView wraps its children with their desired size.
2433 /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2434 /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2436 /// // exactSizeView shows itself with an exact size.
2437 /// exactSizeView.WidthSpecification = 100;
2438 /// exactSizeView.HeightSpecification = 100;
2441 /// <since_tizen> 6 </since_tizen>
2442 [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2443 public int WidthSpecification
2447 return (int)GetValue(WidthSpecificationProperty);
2451 SetValue(WidthSpecificationProperty, value);
2452 NotifyPropertyChanged();
2456 private int InternalWidthSpecification
2464 if (value == widthPolicy)
2467 widthPolicy = value;
2468 if (widthPolicy >= 0)
2470 if (heightPolicy >= 0) // Policy an exact value
2472 // Create Size2D only both _widthPolicy and _heightPolicy are set.
2473 Size2D = new Size2D(widthPolicy, heightPolicy);
2476 layout?.RequestLayout();
2481 /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
2485 /// // matchParentView matches its size to its parent size.
2486 /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
2487 /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
2489 /// // wrapContentView wraps its children with their desired size.
2490 /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
2491 /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
2493 /// // exactSizeView shows itself with an exact size.
2494 /// exactSizeView.WidthSpecification = 100;
2495 /// exactSizeView.HeightSpecification = 100;
2498 /// <since_tizen> 6 </since_tizen>
2499 [Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
2500 public int HeightSpecification
2504 return (int)GetValue(HeightSpecificationProperty);
2508 SetValue(HeightSpecificationProperty, value);
2509 NotifyPropertyChanged();
2513 private int InternalHeightSpecification
2517 return heightPolicy;
2521 if (value == heightPolicy)
2524 heightPolicy = value;
2525 if (heightPolicy >= 0)
2527 if (widthPolicy >= 0) // Policy an exact value
2529 // Create Size2D only both _widthPolicy and _heightPolicy are set.
2530 Size2D = new Size2D(widthPolicy, heightPolicy);
2533 layout?.RequestLayout();
2538 /// Gets the List of transitions for this View.
2540 /// <since_tizen> 6 </since_tizen>
2541 public Dictionary<TransitionCondition, TransitionList> LayoutTransitions
2545 if (layoutTransitions == null)
2547 layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2549 return layoutTransitions;
2554 /// Sets a layout transitions for this View.
2556 /// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
2558 /// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
2560 /// <since_tizen> 6 </since_tizen>
2561 public LayoutTransition LayoutTransition
2565 return GetValue(LayoutTransitionProperty) as LayoutTransition;
2569 SetValue(LayoutTransitionProperty, value);
2570 NotifyPropertyChanged();
2574 private LayoutTransition InternalLayoutTransition
2578 return layoutTransition;
2584 throw new global::System.ArgumentNullException(nameof(value));
2586 if (layoutTransitions == null)
2588 layoutTransitions = new Dictionary<TransitionCondition, TransitionList>();
2591 LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
2593 AttachTransitionsToChildren(value);
2595 layoutTransition = value;
2600 /// Deprecated in API5; Will be removed in API8. Please use Padding instead.
2603 /// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
2605 /// <since_tizen> 4 </since_tizen>
2606 [Obsolete("Deprecated in API5; Will be removed in API8. Please use Padding instead.")]
2607 [EditorBrowsable(EditorBrowsableState.Never)]
2608 public Extents PaddingEX
2612 return GetValue(PaddingEXProperty) as Extents;
2616 SetValue(PaddingEXProperty, value);
2620 private Extents InternalPaddingEX
2624 Extents temp = new Extents(0, 0, 0, 0);
2625 var pValue = GetProperty(View.Property.PADDING);
2628 Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
2634 var temp = new Tizen.NUI.PropertyValue(value);
2635 SetProperty(View.Property.PADDING, temp);
2637 NotifyPropertyChanged();
2638 layout?.RequestLayout();
2643 /// The Color of View. This is an RGBA value.
2647 /// Animatable - This property can be animated using <c>Animation</c> class.
2649 /// The property cascade chaining set is not recommended.
2652 /// This way is recommended for setting the property
2654 /// var view = new View();
2655 /// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
2657 /// This way to set the property is prohibited
2659 /// view.Color.A = 0.5f; //This does not guarantee a proper operation
2662 [EditorBrowsable(EditorBrowsableState.Never)]
2667 return (Color)GetValue(ColorProperty);
2671 SetValue(ColorProperty, value);
2672 NotifyPropertyChanged();
2677 /// Set the layout on this View. Replaces any existing Layout.
2680 /// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
2682 /// <since_tizen> 6 </since_tizen>
2683 public LayoutItem Layout
2687 return GetValue(LayoutProperty) as LayoutItem;
2691 SetValue(LayoutProperty, value);
2695 private LayoutItem InternalLayout
2703 // Do nothing if layout provided is already set on this View.
2704 if (value == layout)
2709 LayoutingDisabled = false;
2712 // If new layout being set already has a owner then that owner receives a replacement default layout.
2713 // First check if the layout to be set already has a owner.
2714 if (value?.Owner != null)
2716 // Previous owner of the layout gets a default layout as a replacement.
2717 value.Owner.Layout = new AbsoluteLayout()
2719 // Copy Margin and Padding to replacement LayoutGroup.
2720 Margin = value.Margin,
2721 Padding = value.Padding,
2725 // Copy Margin and Padding to new layout being set or restore padding and margin back to
2726 // View if no replacement. Previously margin and padding values would have been moved from
2727 // the View to the layout.
2728 if (layout != null) // Existing layout
2732 // Existing layout being replaced so copy over margin and padding values.
2733 value.Margin = layout.Margin;
2734 value.Padding = layout.Padding;
2735 value.SetPositionByLayout = !excludeLayouting;
2739 // Layout not being replaced so restore margin and padding to View.
2740 SetValue(MarginProperty, layout.Margin);
2741 SetValue(PaddingProperty, layout.Padding);
2742 NotifyPropertyChanged();
2747 // First Layout to be added to the View hence copy
2749 // Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
2752 Extents margin = Margin;
2753 Extents padding = Padding;
2754 if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
2756 // If View already has a margin set then store it in Layout instead.
2757 value.Margin = margin;
2758 SetValue(MarginProperty, new Extents(0, 0, 0, 0));
2759 NotifyPropertyChanged();
2762 if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
2764 // If View already has a padding set then store it in Layout instead.
2765 value.Padding = padding;
2767 // If Layout is a LayoutItem then it could be a View that handles it's own padding.
2768 // Let the View keeps it's padding. Still store Padding in Layout to reduce code paths.
2769 if (typeof(LayoutGroup).IsAssignableFrom(value.GetType()))
2771 SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
2772 NotifyPropertyChanged();
2776 value.SetPositionByLayout = !excludeLayouting;
2780 // Remove existing layout from it's parent layout group.
2783 // Set layout to this view
2789 /// The weight of the View, used to share available space in a layout with siblings.
2791 /// <since_tizen> 6 </since_tizen>
2801 layout?.RequestLayout();
2806 /// Whether to load the BackgroundImage synchronously.
2807 /// If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2808 /// Note: For Normal Quad images only.
2810 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
2811 [EditorBrowsable(EditorBrowsableState.Never)]
2812 public bool BackgroundImageSynchronosLoading
2816 return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
2820 SetValue(BackgroundImageSynchronosLoadingProperty, value);
2821 NotifyPropertyChanged();
2825 private bool InternalBackgroundImageSynchronosLoading
2829 return BackgroundImageSynchronousLoading;
2833 BackgroundImageSynchronousLoading = value;
2838 /// Whether to load the BackgroundImage synchronously.
2839 /// If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
2840 /// Note: For Normal Quad images only.
2842 /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2843 [EditorBrowsable(EditorBrowsableState.Never)]
2844 public bool BackgroundImageSynchronousLoading
2848 return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
2852 SetValue(BackgroundImageSynchronousLoadingProperty, value);
2853 NotifyPropertyChanged();
2857 private bool InternalBackgroundImageSynchronousLoading
2861 return backgroundImageSynchronousLoading;
2865 backgroundImageSynchronousLoading = value;
2867 string bgUrl = null;
2868 var pValue = Background.Find(ImageVisualProperty.URL);
2869 pValue?.Get(out bgUrl);
2872 if (!string.IsNullOrEmpty(bgUrl))
2874 PropertyMap bgMap = this.Background;
2875 var temp = new PropertyValue(backgroundImageSynchronousLoading);
2876 bgMap[ImageVisualProperty.SynchronousLoading] = temp;
2883 /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
2884 [EditorBrowsable(EditorBrowsableState.Never)]
2885 public Vector2 UpdateSizeHint
2889 return (Vector2)GetValue(UpdateSizeHintProperty);
2893 SetValue(UpdateSizeHintProperty, value);
2894 NotifyPropertyChanged();
2899 /// Enable/Disable ControlState propagation for children.
2900 /// It is false by default.
2901 /// If the View needs to share ControlState with descendants, please set it true.
2902 /// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
2904 [EditorBrowsable(EditorBrowsableState.Never)]
2905 public bool EnableControlStatePropagation
2909 return (bool)GetValue(EnableControlStatePropagationProperty);
2913 SetValue(EnableControlStatePropagationProperty, value);
2914 NotifyPropertyChanged();
2918 private bool InternalEnableControlStatePropagation
2920 get => themeData?.ControlStatePropagation ?? false;
2923 if (InternalEnableControlStatePropagation == value) return;
2925 if (themeData == null) themeData = new ThemeData();
2927 themeData.ControlStatePropagation = value;
2929 foreach (View child in Children)
2931 child.EnableControlStatePropagation = value;
2937 /// By default, it is false in View, true in Control.
2938 /// Note that if the value is true, the View will be a touch receptor.
2940 [EditorBrowsable(EditorBrowsableState.Never)]
2941 public bool EnableControlState
2945 return (bool)GetValue(EnableControlStateProperty);
2949 SetValue(EnableControlStateProperty, value);
2954 /// Whether the actor grab all touches even if touch leaves its boundary.
2956 /// <returns>true, if it grab all touch after start</returns>
2957 [EditorBrowsable(EditorBrowsableState.Never)]
2958 public bool GrabTouchAfterLeave
2962 return (bool)GetValue(GrabTouchAfterLeaveProperty);
2966 SetValue(GrabTouchAfterLeaveProperty, value);
2970 private bool InternalGrabTouchAfterLeave
2975 var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
2976 pValue.Get(out temp);
2982 var temp = new Tizen.NUI.PropertyValue(value);
2983 SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
2985 NotifyPropertyChanged();
2990 /// Determines which blend equation will be used to render renderers of this actor.
2992 /// <returns>blend equation enum currently assigned</returns>
2993 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
2994 [EditorBrowsable(EditorBrowsableState.Never)]
2995 public BlendEquationType BlendEquation
2999 return (BlendEquationType)GetValue(BlendEquationProperty);
3003 SetValue(BlendEquationProperty, value);
3007 private BlendEquationType InternalBlendEquation
3012 var pValue = GetProperty(View.Property.BlendEquation);
3013 pValue.Get(out temp);
3015 return (BlendEquationType)temp;
3019 var temp = new Tizen.NUI.PropertyValue((int)value);
3020 SetProperty(View.Property.BlendEquation, temp);
3022 NotifyPropertyChanged();
3027 /// If the value is true, the View will change its style as the theme changes.
3028 /// The default value is false in normal case but it can be true when the NUIApplication is created with <see cref="NUIApplication.ThemeOptions.ThemeChangeSensitive"/>.
3030 /// <since_tizen> 9 </since_tizen>
3031 public bool ThemeChangeSensitive
3033 get => (bool)GetValue(ThemeChangeSensitiveProperty);
3034 set => SetValue(ThemeChangeSensitiveProperty, value);
3038 /// Create Style, it is abstract function and must be override.
3040 [EditorBrowsable(EditorBrowsableState.Never)]
3041 protected virtual ViewStyle CreateViewStyle()
3043 return new ViewStyle();
3047 /// Called after the View's ControlStates changed.
3049 /// <param name="controlStateChangedInfo">The information including state changed variables.</param>
3050 [EditorBrowsable(EditorBrowsableState.Never)]
3051 protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
3057 [EditorBrowsable(EditorBrowsableState.Never)]
3058 protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
3060 isThemeChanged = true;
3061 if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
3062 else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
3063 isThemeChanged = false;
3067 /// Apply style instance to the view.
3068 /// Basically it sets the bindable property to the value of the bindable property with same name in the style.
3070 /// <since_tizen> 9 </since_tizen>
3071 public virtual void ApplyStyle(ViewStyle viewStyle)
3073 if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
3075 if (themeData == null) themeData = new ThemeData();
3077 themeData.viewStyle = viewStyle;
3079 if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
3085 BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
3087 if (bindablePropertyOfView == null)
3092 var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
3093 viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
3095 foreach (var sourceProperty in dirtyStyleProperties)
3097 var sourceValue = viewStyle.GetValue(sourceProperty);
3099 if (sourceValue == null)
3104 bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
3106 // Do not set value again when theme is changed and the value has been set already.
3107 if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
3112 if (destinationProperty != null)
3114 InternalSetValue(destinationProperty, sourceValue);
3120 /// Get whether the View is culled or not.
3121 /// True means that the View is out of the view frustum.
3124 /// Hidden-API (Inhouse-API).
3126 [EditorBrowsable(EditorBrowsableState.Never)]
3132 var pValue = GetProperty(View.Property.Culled);
3133 pValue.Get(out temp);
3140 /// Set or Get TransitionOptions for the page transition.
3141 /// This property is used to define how this view will be transitioned during Page switching.
3143 /// <since_tizen> 9 </since_tizen>
3144 public TransitionOptions TransitionOptions
3148 return GetValue(TransitionOptionsProperty) as TransitionOptions;
3152 SetValue(TransitionOptionsProperty, value);
3153 NotifyPropertyChanged();
3157 private TransitionOptions InternalTransitionOptions
3161 transitionOptions = value;
3165 return transitionOptions;
3170 /// Gets or sets the status of whether the view should emit key event signals.
3171 /// If a View's DispatchKeyEvents is set to false, then it's children will not emit a key event signal either.
3173 [EditorBrowsable(EditorBrowsableState.Never)]
3174 public bool DispatchKeyEvents
3178 return (bool)GetValue(DispatchKeyEventsProperty);
3182 SetValue(DispatchKeyEventsProperty, value);
3183 NotifyPropertyChanged();
3188 /// Called when the view is hit through TouchEvent or GestureEvent.
3189 /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
3190 /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
3191 /// User can override whether hit or not in HitTest.
3192 /// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
3193 /// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
3195 // <param name="touch"><see cref="Tizen.NUI.Touch"/>The touch data</param>
3196 [EditorBrowsable(EditorBrowsableState.Never)]
3197 protected virtual bool HitTest(Touch touch)