)GetValue(BorderlineColorSelectorProperty);
}
set
{
SetValue(BorderlineColorSelectorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Relative offset for the borderline of the View.
/// Recommended range : [-1.0f to 1.0f].
/// If -1.0f, draw borderline inside of the View.
/// If 1.0f, draw borderline outside of the View.
/// If 0.0f, draw borderline half inside and half outside.
/// It is 0.0f by default.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "BorderlineOffset", -1.0f);
///
///
///
/// 9
public float BorderlineOffset
{
get
{
return (float)GetValue(BorderlineOffsetProperty);
}
set
{
SetValue(BorderlineOffsetProperty, value);
NotifyPropertyChanged();
}
}
///
/// The current state of the view.
///
/// 3
public States State
{
get
{
return (States)GetValue(StateProperty);
}
set
{
SetValue(StateProperty, value);
NotifyPropertyChanged();
}
}
///
/// The current sub state of the view.
///
/// 3
public States SubState
{
get
{
return (States)GetValue(SubStateProperty);
}
set
{
SetValue(SubStateProperty, value);
NotifyPropertyChanged();
}
}
///
/// Displays a tooltip
///
/// 3
public Tizen.NUI.PropertyMap Tooltip
{
get
{
return (PropertyMap)GetValue(TooltipProperty);
}
set
{
SetValue(TooltipProperty, value);
NotifyPropertyChanged();
}
}
///
/// Displays a tooltip as a text.
///
/// 3
public string TooltipText
{
get
{
return GetValue(TooltipTextProperty) as string;
}
set
{
SetValue(TooltipTextProperty, value);
}
}
private string InternalTooltipText
{
get
{
using (var propertyValue = GetProperty(Property.TOOLTIP))
{
if (propertyValue != null && propertyValue.Get(out string retrivedValue))
{
return retrivedValue;
}
NUILog.Error($"[ERROR] Fail to get TooltipText! Return error MSG (error to get TooltipText)!");
return "error to get TooltipText";
}
}
set
{
var temp = new Tizen.NUI.PropertyValue(value);
SetProperty(View.Property.TOOLTIP, temp);
temp.Dispose();
NotifyPropertyChanged();
}
}
///
/// The Child property of FlexContainer.
/// The proportion of the free space in the container, the flex item will receive.
/// If all items in the container set this property, their sizes will be proportional to the specified flex factor.
///
/// 3
[Obsolete("Deprecated in API8, will be removed in API10.")]
public float Flex
{
get
{
return (float)GetValue(FlexProperty);
}
set
{
SetValue(FlexProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Child property of FlexContainer.
/// The alignment of the flex item along the cross axis, which, if set, overrides the default alignment for all items in the container.
///
/// 3
[Obsolete("Deprecated in API8, will be removed in API10.")]
public int AlignSelf
{
get
{
return (int)GetValue(AlignSelfProperty);
}
set
{
SetValue(AlignSelfProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Child property of FlexContainer.
/// The space around the flex item.
///
///
/// The property cascade chaining set is possible. For example, this (view.FlexMargin.X = 0.1f;) is possible.
///
/// 3
[Obsolete("Deprecated in API8, will be removed in API10.")]
public Vector4 FlexMargin
{
get
{
Vector4 temp = (Vector4)GetValue(FlexMarginProperty);
return new Vector4(OnFlexMarginChanged, temp.X, temp.Y, temp.Z, temp.W);
}
set
{
SetValue(FlexMarginProperty, value);
NotifyPropertyChanged();
}
}
///
/// The top-left cell this child occupies, if not set, the first available cell is used.
///
///
/// The property cascade chaining set is not recommended.
/// Also, this property is for class. Please use the property for the child position of .
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.CellIndex = new Vector2(1, 3);
///
/// This way to set the property is prohibited
///
/// view.CellIndex.X = 1; //This does not guarantee a proper operation
///
///
/// 3
public Vector2 CellIndex
{
get
{
return (Vector2)GetValue(CellIndexProperty);
}
set
{
SetValue(CellIndexProperty, value);
NotifyPropertyChanged();
}
}
///
/// The number of rows this child occupies, if not set, the default value is 1.
///
///
/// This property is for class. Use the property for the child position of .
///
/// 3
public float RowSpan
{
get
{
return (float)GetValue(RowSpanProperty);
}
set
{
SetValue(RowSpanProperty, value);
NotifyPropertyChanged();
}
}
///
/// The number of columns this child occupies, if not set, the default value is 1.
///
///
/// This property is for class. Use the property for the child position of .
///
/// 3
public float ColumnSpan
{
get
{
return (float)GetValue(ColumnSpanProperty);
}
set
{
SetValue(ColumnSpanProperty, value);
NotifyPropertyChanged();
}
}
///
/// The horizontal alignment of this child inside the cells, if not set, the default value is 'left'.
///
///
/// This property is for class. Use the property for the child position of .
///
/// 3
public Tizen.NUI.HorizontalAlignmentType CellHorizontalAlignment
{
get
{
return (HorizontalAlignmentType)GetValue(CellHorizontalAlignmentProperty);
}
set
{
SetValue(CellHorizontalAlignmentProperty, value);
NotifyPropertyChanged();
}
}
///
/// The vertical alignment of this child inside the cells, if not set, the default value is 'top'.
///
///
/// This property is for class. Use the property for the child position of .
///
/// 3
public Tizen.NUI.VerticalAlignmentType CellVerticalAlignment
{
get
{
return (VerticalAlignmentType)GetValue(CellVerticalAlignmentProperty);
}
set
{
SetValue(CellVerticalAlignmentProperty, value);
NotifyPropertyChanged();
}
}
///
/// The left focusable view.
/// This will return null if not set.
/// This will also return null if the specified left focusable view is not on a window.
///
/// 3
public View LeftFocusableView
{
// As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
get
{
return (View)GetValue(LeftFocusableViewProperty);
}
set
{
SetValue(LeftFocusableViewProperty, value);
NotifyPropertyChanged();
}
}
///
/// The right focusable view.
/// This will return null if not set.
/// This will also return null if the specified right focusable view is not on a window.
///
/// 3
public View RightFocusableView
{
// As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
get
{
return (View)GetValue(RightFocusableViewProperty);
}
set
{
SetValue(RightFocusableViewProperty, value);
NotifyPropertyChanged();
}
}
///
/// The up focusable view.
/// This will return null if not set.
/// This will also return null if the specified up focusable view is not on a window.
///
/// 3
public View UpFocusableView
{
// As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
get
{
return (View)GetValue(UpFocusableViewProperty);
}
set
{
SetValue(UpFocusableViewProperty, value);
NotifyPropertyChanged();
}
}
///
/// The down focusable view.
/// This will return null if not set.
/// This will also return null if the specified down focusable view is not on a window.
///
/// 3
public View DownFocusableView
{
// As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
get
{
return (View)GetValue(DownFocusableViewProperty);
}
set
{
SetValue(DownFocusableViewProperty, value);
NotifyPropertyChanged();
}
}
///
/// The clockwise focusable view by rotary wheel.
/// This will return null if not set.
/// This will also return null if the specified clockwise focusable view is not on a window.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public View ClockwiseFocusableView
{
// As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
get
{
return (View)GetValue(ClockwiseFocusableViewProperty);
}
set
{
SetValue(ClockwiseFocusableViewProperty, value);
NotifyPropertyChanged();
}
}
///
/// The counter clockwise focusable view by rotary wheel.
/// This will return null if not set.
/// This will also return null if the specified counter clockwise focusable view is not on a window.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public View CounterClockwiseFocusableView
{
// As native side will be only storing IDs so need a logic to convert View to ID and vice-versa.
get
{
return (View)GetValue(CounterClockwiseFocusableViewProperty);
}
set
{
SetValue(CounterClockwiseFocusableViewProperty, value);
NotifyPropertyChanged();
}
}
///
/// Whether the view should be focusable by keyboard navigation.
///
/// 3
public bool Focusable
{
set
{
SetValue(FocusableProperty, value);
NotifyPropertyChanged();
}
get
{
return (bool)GetValue(FocusableProperty);
}
}
///
/// 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.
/// Note : Default value is true.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool FocusableChildren
{
set
{
SetValue(FocusableChildrenProperty, value);
NotifyPropertyChanged();
}
get
{
return (bool)GetValue(FocusableChildrenProperty);
}
}
///
/// Whether this view can focus by touch.
/// If Focusable is false, FocusableInTouch is disabled.
/// If you want to have focus on touch, you need to set both Focusable and FocusableInTouch settings to true.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool FocusableInTouch
{
set
{
SetValue(FocusableInTouchProperty, value);
NotifyPropertyChanged();
}
get
{
return (bool)GetValue(FocusableInTouchProperty);
}
}
///
/// Retrieves the position of the view.
/// The coordinates are relative to the view's parent.
///
///
/// The , , , and properties are set in the main thread.
/// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
/// However, , , , and properties are updated in real time,
/// and users can get the current actual values through them.
///
/// 3
public Position CurrentPosition
{
get
{
return GetCurrentPosition();
}
}
///
/// Sets the size of a view for the width and the height.
/// Geometry can be scaled to fit within this area.
/// This does not interfere with the view's scale factor.
/// The views default depth is the minimum of width and height.
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Size2D = new Size2D(100, 200);
///
/// This way to set the property is prohibited
///
/// view.Size2D.Width = 100; //This does not guarantee a proper operation
///
///
/// 3
public Size2D Size2D
{
get
{
var temp = (Size2D)GetValue(Size2DProperty);
if (this.Layout == null)
{
if (temp.Width < 0) { temp.Width = 0; }
if (temp.Height < 0) { temp.Height = 0; }
}
return temp;
}
set
{
SetValue(Size2DProperty, value);
NotifyPropertyChanged();
}
}
///
/// Retrieves the size of the view.
/// The coordinates are relative to the view's parent.
///
///
/// The , , , and properties are set in the main thread.
/// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
/// However, , , , and properties are updated in real time,
/// and users can get the current actual values through them.
///
/// 3
public Size2D CurrentSize
{
get
{
return GetCurrentSize();
}
}
///
/// Retrieves and sets the view's opacity.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "Opacity", 0.5f);
///
///
///
/// 3
public float Opacity
{
get
{
return (float)GetValue(OpacityProperty);
}
set
{
SetValue(OpacityProperty, value);
NotifyPropertyChanged();
}
}
///
/// Sets the position of the view for X and Y.
/// By default, sets the position vector between the parent origin and the pivot point (default).
/// If the position inheritance is disabled, sets the world position.
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Position2D = new Position2D(100, 200);
///
/// This way to set the property is prohibited
///
/// view.Position2D.X = 100; //This does not guarantee a proper operation
///
///
/// 3
public Position2D Position2D
{
get
{
return (Position2D)GetValue(Position2DProperty);
}
set
{
SetValue(Position2DProperty, value);
NotifyPropertyChanged();
}
}
///
/// Retrieves the screen position of the view.
///
/// 3
public Vector2 ScreenPosition
{
get
{
return GetCurrentScreenPosition();
}
}
///
/// Determines whether the pivot point should be used to determine the position of the view.
/// This is false by default.
///
/// If false, then the top-left of the view is used for the position.
/// Setting this to false will allow scaling or rotation around the pivot point without affecting the view's position.
///
/// 3
public bool PositionUsesPivotPoint
{
get
{
return (bool)GetValue(PositionUsesPivotPointProperty);
}
set
{
SetValue(PositionUsesPivotPointProperty, value);
NotifyPropertyChanged();
}
}
///
/// This has been deprecated in API5 and Will be removed in API8. Use PositionUsesPivotPoint instead.
///
/// 3
[Obsolete("This has been deprecated in API5 and will be removed in API8. Use PositionUsesPivotPoint instead. " +
"Like: " +
"View view = new View(); " +
"view.PivotPoint = PivotPoint.Center; " +
"view.PositionUsesPivotPoint = true;" +
" This has been deprecated in API5 and will be removed in API8")]
[EditorBrowsable(EditorBrowsableState.Never)]
public bool PositionUsesAnchorPoint
{
get
{
return (bool)GetValue(PositionUsesAnchorPointProperty);
}
set
{
SetValue(PositionUsesAnchorPointProperty, value);
}
}
private bool InternalPositionUsesAnchorPoint
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint);
#else
bool temp = false;
var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
pValue.Get(out temp);
pValue.Dispose();
return temp;
#endif
}
set
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value);
#else
var temp = new Tizen.NUI.PropertyValue(value);
SetProperty(View.Property.PositionUsesAnchorPoint, temp);
temp.Dispose();
#endif
NotifyPropertyChanged();
}
}
///
/// Queries whether the view is connected to the stage.
/// When a view is connected, it will be directly or indirectly parented to the root view.
///
/// 3
public bool IsOnWindow
{
get
{
return OnWindow();
}
}
///
/// Gets the depth in the hierarchy for the view.
///
/// 3
public int HierarchyDepth
{
get
{
return GetHierarchyDepth();
}
}
///
/// Sets the sibling order of the view so the depth position can be defined within the same parent.
///
///
/// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
/// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
/// The values set by this property will likely change.
///
/// 3
public int SiblingOrder
{
get
{
return (int)GetValue(SiblingOrderProperty);
}
set
{
SetValue(SiblingOrderProperty, value);
Layout?.ChangeLayoutSiblingOrder(value);
NotifyPropertyChanged();
}
}
///
/// Returns the natural size of the view.
///
///
/// Deriving classes stipulate the natural size and by default a view has a zero natural size.
///
/// 5
public Vector3 NaturalSize
{
get
{
Vector3 ret = GetNaturalSize();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// Returns the natural size (Size2D) of the view.
///
///
/// Deriving classes stipulate the natural size and by default a view has a zero natural size.
///
/// 4
public Size2D NaturalSize2D
{
get
{
Vector3 temp = GetNaturalSize();
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
temp.Dispose();
return sz;
}
}
///
/// Gets or sets the origin of a view within its parent's area.
/// 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.
/// The default parent-origin is ParentOrigin.TopLeft (0.0, 0.0, 0.5).
/// A view's position is the distance between this origin and the view's anchor-point.
///
/// The view has been initialized.
/// 3
public Position ParentOrigin
{
get
{
Position tmp = (Position)GetValue(ParentOriginProperty);
return new Position(OnParentOriginChanged, tmp.X, tmp.Y, tmp.Z);
}
set
{
SetValue(ParentOriginProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the anchor-point of a view.
/// 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.
/// The default pivot point is PivotPoint.Center (0.5, 0.5, 0.5).
/// A view position is the distance between its parent-origin and this anchor-point.
/// A view's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.
/// The view has been initialized.
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.PivotPoint = PivotPoint.Center;
///
/// This way to set the property is prohibited
///
/// view.PivotPoint.X = 0.5f; //This does not guarantee a proper operation
///
///
/// 3
public Position PivotPoint
{
get
{
return (Position)GetValue(PivotPointProperty);
}
set
{
SetValue(PivotPointProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the size width of the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "SizeWidth", 500.0f);
///
///
///
/// 3
public float SizeWidth
{
get
{
return (float)GetValue(SizeWidthProperty);
}
set
{
SetValue(SizeWidthProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the size height of the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
///
/// animation.AnimateTo(view, "SizeHeight", 500.0f);
///
///
/// 3
public float SizeHeight
{
get
{
return (float)GetValue(SizeHeightProperty);
}
set
{
SetValue(SizeHeightProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the position of the view.
/// By default, sets the position vector between the parent origin and pivot point (default).
/// If the position inheritance is disabled, sets the world position.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "Position", new Position(50, 0));
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Position = new Position(100, 200.5f, 0);
///
/// This way to set the property is prohibited
///
/// view.Position.Y = 200.5f; //This does not guarantee a proper operation
///
///
/// 3
public Position Position
{
get
{
return (Position)GetValue(PositionProperty);
}
set
{
SetValue(PositionProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the position X of the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "PositionX", 50.0f);
///
///
///
/// 3
public float PositionX
{
get
{
return (float)GetValue(PositionXProperty);
}
set
{
SetValue(PositionXProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the position Y of the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "PositionY", 50.0f);
///
///
///
/// 3
public float PositionY
{
get
{
return (float)GetValue(PositionYProperty);
}
set
{
SetValue(PositionYProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the position Z of the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "PositionZ", 50.0f);
///
///
///
/// 3
public float PositionZ
{
get
{
return (float)GetValue(PositionZProperty);
}
set
{
SetValue(PositionZProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the world position of the view.
///
/// 3
public Vector3 WorldPosition
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return GetCurrentWorldPosition();
#else
Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
var pValue = GetProperty(View.Property.WorldPosition);
pValue.Get(temp);
pValue.Dispose();
return temp;
#endif
}
}
///
/// Gets or sets the orientation of the view.
/// The view's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
///
///
///
/// This is an asynchronous method.
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "Orientation", new Rotation(new Radian((float)Math.PI), Vector3.XAxis));
///
///
///
/// 3
public Rotation Orientation
{
get
{
return (Rotation)GetValue(OrientationProperty);
}
set
{
SetValue(OrientationProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the world orientation of the view.
///
/// 3
public Rotation WorldOrientation
{
get
{
Rotation temp = new Rotation();
var pValue = GetProperty(View.Property.WorldOrientation);
pValue.Get(temp);
pValue.Dispose();
return temp;
}
}
///
/// Gets or sets the scale factor applied to the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "Scale", new Vector3(1.5f, 1.5f, 1.0f));
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Scale = new Vector3(1.5f, 2.0f, 1.0f);
///
/// This way to set the property is prohibited
///
/// view.Scale.Width = 1.5f; //This does not guarantee a proper operation
///
///
/// 3
public Vector3 Scale
{
get
{
return (Vector3)GetValue(ScaleProperty);
}
set
{
SetValue(ScaleProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the scale X factor applied to the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "ScaleX", 1.5f);
///
///
///
/// 3
public float ScaleX
{
get
{
return (float)GetValue(ScaleXProperty);
}
set
{
SetValue(ScaleXProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the scale Y factor applied to the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "ScaleY", 1.5f);
///
///
///
/// 3
public float ScaleY
{
get
{
return (float)GetValue(ScaleYProperty);
}
set
{
SetValue(ScaleYProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the scale Z factor applied to the view.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "ScaleZ", 1.5f);
///
///
///
/// 3
public float ScaleZ
{
get
{
return (float)GetValue(ScaleZProperty);
}
set
{
SetValue(ScaleZProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets the world scale of the view.
///
/// 3
public Vector3 WorldScale
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return GetCurrentWorldScale();
#else
Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
var pValue = GetProperty(View.Property.WorldScale);
pValue.Get(temp);
pValue.Dispose();
return temp;
#endif
}
}
///
/// Retrieves the visibility flag of the view.
///
///
///
/// If the view is not visible, then the view and its children will not be rendered.
/// 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.
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "Visibility", false);
///
///
///
/// 3
public bool Visibility
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE);
#else
bool temp = false;
var pValue = GetProperty(View.Property.VISIBLE);
pValue.Get(out temp);
pValue.Dispose();
return temp;
#endif
}
}
///
/// Gets the view's world color.
///
/// 3
public Vector4 WorldColor
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return GetCurrentWorldColor();
#else
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
var pValue = GetProperty(View.Property.WorldColor);
pValue.Get(temp);
pValue.Dispose();
return temp;
#endif
}
}
///
/// Gets or sets the view's name.
///
/// 3
public string Name
{
get
{
return (string)GetValue(NameProperty);
}
set
{
SetValue(NameProperty, value);
NotifyPropertyChanged();
}
}
///
/// Get the number of children held by the view.
///
/// 3
public new uint ChildCount
{
get
{
return Convert.ToUInt32(Children.Count);
}
}
///
/// Gets the view's ID.
/// Read-only
///
/// 3
public uint ID
{
get
{
return GetId();
}
}
///
/// Gets or sets the status of whether the view should emit touch or hover signals.
/// If a View is made insensitive, then the View and its children are not hittable.
///
/// 3
public bool Sensitive
{
get
{
return (bool)GetValue(SensitiveProperty);
}
set
{
SetValue(SensitiveProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of whether the view should be enabled user interactions.
/// If a View is made disabled, then user interactions including touch, focus, and actiavation is disabled.
///
/// tizen_next
[EditorBrowsable(EditorBrowsableState.Never)]
public bool IsEnabled
{
get
{
return (bool)GetValue(IsEnabledProperty);
}
set
{
SetValue(IsEnabledProperty, value);
NotifyPropertyChanged();
}
}
///
/// 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.
///
/// 3
public bool LeaveRequired
{
get
{
return (bool)GetValue(LeaveRequiredProperty);
}
set
{
SetValue(LeaveRequiredProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of whether a child view inherits it's parent's orientation.
///
/// 3
public bool InheritOrientation
{
get
{
return (bool)GetValue(InheritOrientationProperty);
}
set
{
SetValue(InheritOrientationProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of whether a child view inherits it's parent's scale.
///
/// 3
public bool InheritScale
{
get
{
return (bool)GetValue(InheritScaleProperty);
}
set
{
SetValue(InheritScaleProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of how the view and its children should be drawn.
/// Not all views are renderable, but DrawMode can be inherited from any view.
/// 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.
/// If DrawMode.Overlay2D is used, the view and its children will be drawn as a 2D overlay.
/// Overlay views are drawn in a separate pass, after all non-overlay views within the layer.
/// For overlay views, the drawing order is with respect to tree levels of views, and depth-testing will not be used.
///
/// 3
public DrawModeType DrawMode
{
get
{
return (DrawModeType)GetValue(DrawModeProperty);
}
set
{
SetValue(DrawModeProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the relative to parent size factor of the view.
/// This factor is only used when ResizePolicyType is set to either: ResizePolicyType.SizeRelativeToParent or ResizePolicyType.SizeFixedOffsetFromParent.
/// This view's size is set to the view's size multiplied by or added to this factor, depending on ResizePolicyType.
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var text = new TextField();
/// text.SizeModeFactor = new Vector3(1.0f, 0.45f, 1.0f);
///
/// This way to set the property is prohibited
///
/// text.SizeModeFactor.Width = 1.0f; //This does not guarantee a proper operation
///
///
/// 3
public Vector3 SizeModeFactor
{
get
{
return (Vector3)GetValue(SizeModeFactorProperty);
}
set
{
SetValue(SizeModeFactorProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the width resize policy to be used.
///
/// 3
public ResizePolicyType WidthResizePolicy
{
get
{
return (ResizePolicyType)GetValue(WidthResizePolicyProperty);
}
set
{
SetValue(WidthResizePolicyProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the height resize policy to be used.
///
/// 3
public ResizePolicyType HeightResizePolicy
{
get
{
return (ResizePolicyType)GetValue(HeightResizePolicyProperty);
}
set
{
SetValue(HeightResizePolicyProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the policy to use when setting size with size negotiation.
/// Defaults to SizeScalePolicyType.UseSizeSet.
///
/// 3
public SizeScalePolicyType SizeScalePolicy
{
get
{
return (SizeScalePolicyType)GetValue(SizeScalePolicyProperty);
}
set
{
SetValue(SizeScalePolicyProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of whether the width size is dependent on the height size.
///
/// 3
public bool WidthForHeight
{
get
{
return (bool)GetValue(WidthForHeightProperty);
}
set
{
SetValue(WidthForHeightProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of whether the height size is dependent on the width size.
///
/// 3
public bool HeightForWidth
{
get
{
return (bool)GetValue(HeightForWidthProperty);
}
set
{
SetValue(HeightForWidthProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the padding for use in layout.
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Padding = new Extents(5, 5, 5, 5);
///
/// This way to set the property is prohibited
///
/// view.Padding.Start = 5; //This does not guarantee a proper operation
///
///
/// 5
public Extents Padding
{
get
{
return (Extents)GetValue(PaddingProperty);
}
set
{
SetValue(PaddingProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the minimum size the view can be assigned in size negotiation.
///
/// Thrown when value is null.
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.MinimumSize = new Size2D(100, 200);
///
/// This way to set the property is prohibited
///
/// view.MinimumSize.Width = 100; //This does not guarantee a proper operation
///
///
/// 3
public Size2D MinimumSize
{
get
{
return (Size2D)GetValue(MinimumSizeProperty);
}
set
{
if (value == null)
{
throw new ArgumentNullException(nameof(value));
}
if (layout != null)
{
// Note: it only works if minimum size is >= than natural size.
// To force the size it should be done through the width&height spec or Size2D.
layout.MinimumWidth = new Tizen.NUI.LayoutLength(value.Width);
layout.MinimumHeight = new Tizen.NUI.LayoutLength(value.Height);
layout.RequestLayout();
}
SetValue(MinimumSizeProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the maximum size the view can be assigned in size negotiation.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.MaximumSize = new Size2D(100, 200);
///
/// This way to set the property is prohibited
///
/// view.MaximumSize.Height = 200; //This does not guarantee a proper operation
///
///
/// 3
public Size2D MaximumSize
{
get
{
return (Size2D)GetValue(MaximumSizeProperty);
}
set
{
// We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
// MATCH_PARENT spec + parent container size can be used to limit
if (layout != null)
{
layout.RequestLayout();
}
SetValue(MaximumSizeProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets whether a child view inherits it's parent's position.
/// Default is to inherit.
/// 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.
///
/// 3
public bool InheritPosition
{
get
{
return (bool)GetValue(InheritPositionProperty);
}
set
{
SetValue(InheritPositionProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the clipping behavior (mode) of it's children.
///
/// 3
public ClippingModeType ClippingMode
{
get
{
return (ClippingModeType)GetValue(ClippingModeProperty);
}
set
{
SetValue(ClippingModeProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets the number of renderers held by the view.
///
/// 3
public uint RendererCount
{
get
{
return GetRendererCount();
}
}
///
/// This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead.
///
///
/// The property cascade chaining set is possible. For example, this (view.AnchorPoint.X = 0.1f;) is possible.
///
/// 3
[Obsolete("This has been deprecated in API5 and will be removed in API8. Use PivotPoint instead. " +
"Like: " +
"View view = new View(); " +
"view.PivotPoint = PivotPoint.Center; " +
"view.PositionUsesPivotPoint = true;")]
[EditorBrowsable(EditorBrowsableState.Never)]
public Position AnchorPoint
{
get
{
return GetValue(AnchorPointProperty) as Position;
}
set
{
SetValue(AnchorPointProperty, value);
}
}
private Position InternalAnchorPoint
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return GetCurrentAnchorPoint();
#else
Position temp = new Position(0.0f, 0.0f, 0.0f);
var pValue = GetProperty(View.Property.AnchorPoint);
pValue.Get(temp);
pValue.Dispose();
Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
temp.Dispose();
return ret;
#endif
}
set
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
SetAnchorPoint(value);
#else
var temp = new Tizen.NUI.PropertyValue(value);
SetProperty(View.Property.AnchorPoint, temp);
temp.Dispose();
#endif
NotifyPropertyChanged();
}
}
///
/// Sets the size of a view for the width, the height and the depth.
/// Geometry can be scaled to fit within this area.
/// This does not interfere with the view's scale factor.
/// The views default depth is the minimum of width and height.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// animation.AnimateTo(view, "Size", new Size(100, 100));
///
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Size = new Size(100.5f, 200, 0);
///
/// This way to set the property is prohibited
///
/// view.Size.Width = 100.5f; //This does not guarantee a proper operation
///
///
/// 5
public Size Size
{
get
{
return (Size)GetValue(SizeProperty);
}
set
{
SetValue(SizeProperty, value);
NotifyPropertyChanged();
}
}
///
/// This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead.
///
/// 3
[Obsolete("This has been deprecated in API5 and will be removed in API8. Use 'Container GetParent() for derived class' instead. " +
"Like: " +
"Container parent = view.GetParent(); " +
"View view = parent as View;")]
[EditorBrowsable(EditorBrowsableState.Never)]
public new View Parent
{
get
{
View ret;
IntPtr cPtr = Interop.Actor.GetParent(SwigCPtr);
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
if (basehandle is Layer layer)
{
ret = new View(Layer.getCPtr(layer).Handle, false);
NUILog.Error("This Parent property is deprecated, should do not be used");
}
else
{
ret = basehandle as View;
}
Interop.BaseHandle.DeleteBaseHandle(CPtr);
CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// Gets/Sets whether inherit parent's the layout Direction.
///
/// 4
public bool InheritLayoutDirection
{
get
{
return (bool)GetValue(InheritLayoutDirectionProperty);
}
set
{
SetValue(InheritLayoutDirectionProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets/Sets the layout Direction.
///
/// 4
public ViewLayoutDirectionType LayoutDirection
{
get
{
return (ViewLayoutDirectionType)GetValue(LayoutDirectionProperty);
}
set
{
SetValue(LayoutDirectionProperty, value);
NotifyPropertyChanged();
layout?.RequestLayout();
}
}
///
/// Gets or sets the Margin for use in layout.
///
///
/// Margin property is supported by Layout algorithms and containers.
/// Please Set Layout if you want to use Margin property.
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Margin = new Extents(10, 5, 15, 20);
///
/// This way to set the property is prohibited
///
/// view.Margin.Top = 15; //This does not guarantee a proper operation
///
///
/// 4
public Extents Margin
{
get
{
return (Extents)GetValue(MarginProperty);
}
set
{
SetValue(MarginProperty, value);
NotifyPropertyChanged();
}
}
///
/// The required policy for this dimension, values or exact value.
///
///
///
/// // matchParentView matches its size to its parent size.
/// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
/// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
///
/// // wrapContentView wraps its children with their desired size.
/// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
/// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
///
/// // exactSizeView shows itself with an exact size.
/// exactSizeView.WidthSpecification = 100;
/// exactSizeView.HeightSpecification = 100;
///
///
/// 6
[Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
public int WidthSpecification
{
get
{
return (int)GetValue(WidthSpecificationProperty);
}
set
{
SetValue(WidthSpecificationProperty, value);
NotifyPropertyChanged();
}
}
private int InternalWidthSpecification
{
get
{
return widthPolicy;
}
set
{
if (value == widthPolicy)
return;
widthPolicy = value;
if (widthPolicy >= 0)
{
if (heightPolicy >= 0) // Policy an exact value
{
// Create Size2D only both _widthPolicy and _heightPolicy are set.
Size2D = new Size2D(widthPolicy, heightPolicy);
}
}
layout?.RequestLayout();
}
}
///
/// The required policy for this dimension, values or exact value.
///
///
///
/// // matchParentView matches its size to its parent size.
/// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
/// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
///
/// // wrapContentView wraps its children with their desired size.
/// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
/// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
///
/// // exactSizeView shows itself with an exact size.
/// exactSizeView.WidthSpecification = 100;
/// exactSizeView.HeightSpecification = 100;
///
///
/// 6
[Binding.TypeConverter(typeof(IntGraphicsTypeConverter))]
public int HeightSpecification
{
get
{
return (int)GetValue(HeightSpecificationProperty);
}
set
{
SetValue(HeightSpecificationProperty, value);
NotifyPropertyChanged();
}
}
private int InternalHeightSpecification
{
get
{
return heightPolicy;
}
set
{
if (value == heightPolicy)
return;
heightPolicy = value;
if (heightPolicy >= 0)
{
if (widthPolicy >= 0) // Policy an exact value
{
// Create Size2D only both _widthPolicy and _heightPolicy are set.
Size2D = new Size2D(widthPolicy, heightPolicy);
}
}
layout?.RequestLayout();
}
}
///
/// Gets the List of transitions for this View.
///
/// 6
public Dictionary LayoutTransitions
{
get
{
if (layoutTransitions == null)
{
layoutTransitions = new Dictionary();
}
return layoutTransitions;
}
}
///
/// Sets a layout transitions for this View.
///
/// Thrown when value is null.
///
/// Use LayoutTransitions to receive a collection of LayoutTransitions set on the View.
///
/// 6
public LayoutTransition LayoutTransition
{
get
{
return GetValue(LayoutTransitionProperty) as LayoutTransition;
}
set
{
SetValue(LayoutTransitionProperty, value);
NotifyPropertyChanged();
}
}
private LayoutTransition InternalLayoutTransition
{
get
{
return layoutTransition;
}
set
{
if (value == null)
{
throw new global::System.ArgumentNullException(nameof(value));
}
if (layoutTransitions == null)
{
layoutTransitions = new Dictionary();
}
LayoutTransitionsHelper.AddTransitionForCondition(layoutTransitions, value.Condition, value, true);
AttachTransitionsToChildren(value);
layoutTransition = value;
}
}
///
/// This has been deprecated in API5 and will be removed in API8. Use Padding instead.
///
///
/// The property cascade chaining set is possible. For example, this (view.DecorationBoundingBox.X = 0.1f;) is possible.
///
/// 4
[Obsolete("This has been deprecated in API5 and will be removed in API8. Use Padding instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public Extents PaddingEX
{
get
{
return GetValue(PaddingEXProperty) as Extents;
}
set
{
SetValue(PaddingEXProperty, value);
}
}
private Extents InternalPaddingEX
{
get
{
Extents temp = new Extents(0, 0, 0, 0);
var pValue = GetProperty(View.Property.PADDING);
pValue.Get(temp);
pValue.Dispose();
Extents ret = new Extents(OnPaddingEXChanged, temp.Start, temp.End, temp.Top, temp.Bottom);
temp.Dispose();
return ret;
}
set
{
var temp = new Tizen.NUI.PropertyValue(value);
SetProperty(View.Property.PADDING, temp);
temp.Dispose();
NotifyPropertyChanged();
layout?.RequestLayout();
}
}
///
/// The Color of View. This is an RGBA value.
/// Each RGBA components match as , , , and .
/// This property will multiply the final color of this view. (BackgroundColor, BorderlineColor, BackgroundImage, etc).
/// For example, if view.BackgroundColor = Color.Yellow and view.Color = Color.Purple, this view will shown as Red.
/// Inherient of color value depend on .
///
///
///
/// Animatable - This property can be animated using Animation class.
///
/// The property cascade chaining set is not recommended.
///
///
/// This way is recommended for setting the property
///
/// var view = new View();
/// view.Color = new Color(0.5f, 0.2f, 0.1f, 0.5f);
///
/// This way to set the property is prohibited
///
/// view.Color.A = 0.5f; //This does not guarantee a proper operation
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
public Color Color
{
get
{
return (Color)GetValue(ColorProperty);
}
set
{
SetValue(ColorProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Red component of View.Color.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
public float ColorRed
{
get
{
return (float)GetValue(ColorRedProperty);
}
set
{
SetValue(ColorRedProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Green component of View.Color.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
public float ColorGreen
{
get
{
return (float)GetValue(ColorGreenProperty);
}
set
{
SetValue(ColorGreenProperty, value);
NotifyPropertyChanged();
}
}
///
/// The Blue component of View.Color.
///
///
///
/// Animatable - This property can be animated using Animation class.
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
public float ColorBlue
{
get
{
return (float)GetValue(ColorBlueProperty);
}
set
{
SetValue(ColorBlueProperty, value);
NotifyPropertyChanged();
}
}
///
/// Set the layout on this View. Replaces any existing Layout.
///
///
/// If this Layout is set as null explicitly, it means this View itself and it's child Views will not use Layout anymore.
///
/// 6
public LayoutItem Layout
{
get
{
return GetValue(LayoutProperty) as LayoutItem;
}
set
{
SetValue(LayoutProperty, value);
}
}
private LayoutItem InternalLayout
{
get
{
return layout;
}
set
{
// Do nothing if layout provided is already set on this View.
if (value == layout)
{
return;
}
LayoutingDisabled = false;
layoutSet = true;
// If new layout being set already has a owner then that owner receives a replacement default layout.
// First check if the layout to be set already has a owner.
if (value?.Owner != null)
{
// Previous owner of the layout gets a default layout as a replacement.
value.Owner.Layout = new AbsoluteLayout()
{
// Copy Margin and Padding to replacement LayoutGroup.
Margin = value.Margin,
Padding = value.Padding,
};
}
// Copy Margin and Padding to new layout being set or restore padding and margin back to
// View if no replacement. Previously margin and padding values would have been moved from
// the View to the layout.
if (layout != null) // Existing layout
{
if (value != null)
{
// Existing layout being replaced so copy over margin and padding values.
value.Margin = layout.Margin;
value.Padding = layout.Padding;
value.SetPositionByLayout = !excludeLayouting;
}
else
{
// Layout not being replaced so restore margin and padding to View.
SetValue(MarginProperty, layout.Margin);
SetValue(PaddingProperty, layout.Padding);
NotifyPropertyChanged();
}
}
else
{
// First Layout to be added to the View hence copy
// Do not try to set Margins or Padding on a null Layout (when a layout is being removed from a View)
if (value != null)
{
Extents margin = Margin;
Extents padding = Padding;
bool setMargin = false;
bool setPadding = false;
if (margin.Top != 0 || margin.Bottom != 0 || margin.Start != 0 || margin.End != 0)
{
// If View already has a margin set then store it in Layout instead.
value.Margin = margin;
SetValue(MarginProperty, new Extents(0, 0, 0, 0));
setMargin = true;
}
if (padding.Top != 0 || padding.Bottom != 0 || padding.Start != 0 || padding.End != 0)
{
// If View already has a padding set then store it in Layout instead.
value.Padding = padding;
SetValue(PaddingProperty, new Extents(0, 0, 0, 0));
setPadding = true;
}
if (setMargin || setPadding)
{
NotifyPropertyChanged();
}
value.SetPositionByLayout = !excludeLayouting;
}
}
// Remove existing layout from it's parent layout group.
layout?.Unparent();
// Set layout to this view
SetLayout(value);
}
}
///
/// The weight of the View, used to share available space in a layout with siblings.
///
/// 6
public float Weight
{
get
{
return weight;
}
set
{
weight = value;
layout?.RequestLayout();
}
}
///
/// Whether to load the BackgroundImage synchronously.
/// If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
/// Note: For Normal Quad images only.
///
/// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool BackgroundImageSynchronosLoading
{
get
{
return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
}
set
{
SetValue(BackgroundImageSynchronosLoadingProperty, value);
NotifyPropertyChanged();
}
}
private bool InternalBackgroundImageSynchronosLoading
{
get
{
return BackgroundImageSynchronousLoading;
}
set
{
BackgroundImageSynchronousLoading = value;
}
}
///
/// Whether to load the BackgroundImage synchronously.
/// If not specified, the default is false, i.e. the BackgroundImage is loaded asynchronously.
/// Note: For Normal Quad images only.
///
/// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool BackgroundImageSynchronousLoading
{
get
{
return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
}
set
{
SetValue(BackgroundImageSynchronousLoadingProperty, value);
NotifyPropertyChanged();
}
}
private bool InternalBackgroundImageSynchronousLoading
{
get
{
return backgroundImageSynchronousLoading;
}
set
{
backgroundImageSynchronousLoading = value;
#if NUI_VISUAL_PROPERTY_CHANGE_1
if (!string.IsNullOrEmpty(BackgroundImage))
#else
string bgUrl = null;
var pValue = Background.Find(ImageVisualProperty.URL);
pValue?.Get(out bgUrl);
pValue?.Dispose();
if (!string.IsNullOrEmpty(bgUrl))
#endif
{
PropertyMap bgMap = this.Background;
var temp = new PropertyValue(backgroundImageSynchronousLoading);
bgMap[ImageVisualProperty.SynchronousLoading] = temp;
temp.Dispose();
Background = bgMap;
}
}
}
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public Vector4 UpdateAreaHint
{
get
{
return (Vector4)GetValue(UpdateAreaHintProperty);
}
set
{
SetValue(UpdateAreaHintProperty, value);
NotifyPropertyChanged();
}
}
///
/// Enable/Disable ControlState propagation for children.
/// It is false by default.
/// If the View needs to share ControlState with descendants, please set it true.
/// Please note that, changing the value will also changes children's EnableControlStatePropagation value recursively.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool EnableControlStatePropagation
{
get
{
return (bool)GetValue(EnableControlStatePropagationProperty);
}
set
{
SetValue(EnableControlStatePropagationProperty, value);
NotifyPropertyChanged();
}
}
private bool InternalEnableControlStatePropagation
{
get => themeData?.ControlStatePropagation ?? false;
set
{
if (InternalEnableControlStatePropagation == value) return;
if (themeData == null) themeData = new ThemeData();
themeData.ControlStatePropagation = value;
foreach (View child in Children)
{
child.EnableControlStatePropagation = value;
}
}
}
///
/// The ControlStates can propagate from the parent.
/// Listed ControlStates will be accepted propagation of the parent ControlState changes
/// if parent view EnableControlState is true.
/// .
/// Default is ControlState.All, so every ControlStates will be propagated from the parent.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public ControlState PropagatableControlStates
{
get
{
return (ControlState)GetValue(PropagatableControlStatesProperty);
}
set
{
SetValue(PropagatableControlStatesProperty, value);
NotifyPropertyChanged();
}
}
private ControlState InternalPropagatableControlStates
{
get => propagatableControlStates;
set => propagatableControlStates = value;
}
///
/// By default, it is false in View, true in Control.
/// Note that if the value is true, the View will be a touch receptor.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool EnableControlState
{
get
{
return (bool)GetValue(EnableControlStateProperty);
}
set
{
SetValue(EnableControlStateProperty, value);
}
}
///
/// Whether the actor grab all touches even if touch leaves its boundary.
///
/// true, if it grab all touch after start
[EditorBrowsable(EditorBrowsableState.Never)]
public bool GrabTouchAfterLeave
{
get
{
return (bool)GetValue(GrabTouchAfterLeaveProperty);
}
set
{
SetValue(GrabTouchAfterLeaveProperty, value);
}
}
private bool InternalGrabTouchAfterLeave
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart);
#else
bool temp = false;
var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
pValue.Get(out temp);
pValue.Dispose();
return temp;
#endif
}
set
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value);
#else
var temp = new Tizen.NUI.PropertyValue(value);
SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
temp.Dispose();
#endif
NotifyPropertyChanged();
}
}
///
/// Whether the view will only receive own touch.
///
/// true, if it only receives touches that started from itself.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool AllowOnlyOwnTouch
{
get
{
return (bool)GetValue(AllowOnlyOwnTouchProperty);
}
set
{
SetValue(AllowOnlyOwnTouchProperty, value);
}
}
private bool InternalAllowOnlyOwnTouch
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch);
#else
bool temp = false;
var pValue = GetProperty(View.Property.AllowOnlyOwnTouch);
pValue.Get(out temp);
pValue.Dispose();
return temp;
#endif
}
set
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value);
#else
var temp = new Tizen.NUI.PropertyValue(value);
SetProperty(View.Property.AllowOnlyOwnTouch, temp);
temp.Dispose();
#endif
NotifyPropertyChanged();
}
}
///
/// Determines which blend equation will be used to render renderers of this actor.
///
/// blend equation enum currently assigned
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public BlendEquationType BlendEquation
{
get
{
return (BlendEquationType)GetValue(BlendEquationProperty);
}
set
{
SetValue(BlendEquationProperty, value);
}
}
private BlendEquationType InternalBlendEquation
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation);
#else
int temp = 0;
var pValue = GetProperty(View.Property.BlendEquation);
pValue.Get(out temp);
pValue.Dispose();
return (BlendEquationType)temp;
#endif
}
set
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value);
#else
var temp = new Tizen.NUI.PropertyValue((int)value);
SetProperty(View.Property.BlendEquation, temp);
temp.Dispose();
#endif
NotifyPropertyChanged();
}
}
///
/// If the value is true, the View will change its style as the theme changes.
/// The default value is false in normal case but it can be true when the NUIApplication is created with .
///
/// 9
public bool ThemeChangeSensitive
{
get => (bool)GetValue(ThemeChangeSensitiveProperty);
set => SetValue(ThemeChangeSensitiveProperty, value);
}
///
/// Create Style, it is abstract function and must be override.
///
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual ViewStyle CreateViewStyle()
{
return new ViewStyle();
}
///
/// Called after the View's ControlStates changed.
///
/// The information including state changed variables.
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual void OnControlStateChanged(ControlStateChangedEventArgs controlStateChangedInfo)
{
}
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual void OnThemeChanged(object sender, ThemeChangedEventArgs e)
{
isThemeChanged = true;
if (string.IsNullOrEmpty(styleName)) ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(GetType()));
else ApplyStyle(ThemeManager.GetUpdateStyleWithoutClone(styleName));
isThemeChanged = false;
}
///
/// Apply style instance to the view.
/// Basically it sets the bindable property to the value of the bindable property with same name in the style.
///
/// 9
public virtual void ApplyStyle(ViewStyle viewStyle)
{
if (viewStyle == null || themeData?.viewStyle == viewStyle) return;
if (themeData == null) themeData = new ThemeData();
themeData.viewStyle = viewStyle;
if (viewStyle.DirtyProperties == null || viewStyle.DirtyProperties.Count == 0)
{
// Nothing to apply
return;
}
BindableProperty.GetBindablePropertysOfType(GetType(), out var bindablePropertyOfView);
if (bindablePropertyOfView == null)
{
return;
}
var dirtyStyleProperties = new BindableProperty[viewStyle.DirtyProperties.Count];
viewStyle.DirtyProperties.CopyTo(dirtyStyleProperties);
foreach (var sourceProperty in dirtyStyleProperties)
{
var sourceValue = viewStyle.GetValue(sourceProperty);
if (sourceValue == null)
{
continue;
}
bindablePropertyOfView.TryGetValue(sourceProperty.PropertyName, out var destinationProperty);
// Do not set value again when theme is changed and the value has been set already.
if (isThemeChanged && ChangedPropertiesSetExcludingStyle.Contains(destinationProperty))
{
continue;
}
if (destinationProperty != null)
{
InternalSetValue(destinationProperty, sourceValue);
}
}
}
///
/// Get whether the View is culled or not.
/// True means that the View is out of the view frustum.
///
///
/// Hidden-API (Inhouse-API).
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool Culled
{
get
{
#if NUI_VISUAL_PROPERTY_CHANGE_1
return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled);
#else
bool temp = false;
var pValue = GetProperty(View.Property.Culled);
pValue.Get(out temp);
pValue.Dispose();
return temp;
#endif
}
}
///
/// Set or Get TransitionOptions for the page transition.
/// This property is used to define how this view will be transitioned during Page switching.
///
/// 9
public TransitionOptions TransitionOptions
{
get
{
return GetValue(TransitionOptionsProperty) as TransitionOptions;
}
set
{
SetValue(TransitionOptionsProperty, value);
NotifyPropertyChanged();
}
}
private TransitionOptions InternalTransitionOptions
{
set
{
transitionOptions = value;
}
get
{
return transitionOptions;
}
}
///
/// Gets or sets the status of whether the view should emit key event signals.
/// If a View's DispatchKeyEvents is set to false, then itself and parents will not receive key event signals.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool DispatchKeyEvents
{
get
{
return (bool)GetValue(DispatchKeyEventsProperty);
}
set
{
SetValue(DispatchKeyEventsProperty, value);
NotifyPropertyChanged();
}
}
///
/// Gets or sets the status of whether touch events can be dispatched.
/// If a View's DispatchTouchEvents is set to false, then it's can not will receive touch and parents will not receive a touch event signal either.
/// This works without adding a TouchEvent callback in the View.
///
/// If the is a property that determines whether or not to be hittable, then this property prevents the propagation of the hit touch event.
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool DispatchTouchEvents
{
get
{
return dispatchTouchEvents;
}
set
{
if (dispatchTouchEvents != value)
{
dispatchTouchEvents = value;
if (dispatchTouchEvents == false)
{
TouchEvent += OnDispatchTouchEvent;
}
else
{
TouchEvent -= OnDispatchTouchEvent;
}
}
}
}
private bool OnDispatchTouchEvent(object source, View.TouchEventArgs e)
{
return true;
}
///
/// Gets or sets the status of whether the view should emit Gesture event signals.
/// If a View's DispatchGestureEvents is set to false, then itself and parents will not receive all gesture event signals.
/// The itself and parents does not receive tap, pinch, pan, rotation, or longpress gestures.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool DispatchGestureEvents
{
get
{
return dispatchGestureEvents;
}
set
{
if (dispatchGestureEvents != value)
{
dispatchGestureEvents = value;
ConfigGestureDetector(dispatchGestureEvents);
}
}
}
///
/// Gets or sets the status of whether the view should emit Gesture event signals.
/// If a View's DispatchParentGestureEvents is set to false, then parents will not receive all gesture event signals.
/// The parents does not receive tap, pinch, pan, rotation, or longpress gestures.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public bool DispatchParentGestureEvents
{
get
{
return dispatchParentGestureEvents;
}
set
{
if (dispatchParentGestureEvents != value)
{
dispatchParentGestureEvents = value;
ConfigGestureDetector(dispatchParentGestureEvents);
}
}
}
private void ConfigGestureDetector(bool dispatch)
{
if (panGestureDetector == null) panGestureDetector = new PanGestureDetector();
if (longGestureDetector == null) longGestureDetector = new LongPressGestureDetector();
if (pinchGestureDetector == null) pinchGestureDetector = new PinchGestureDetector();
if (tapGestureDetector == null) tapGestureDetector = new TapGestureDetector();
if (rotationGestureDetector == null) rotationGestureDetector = new RotationGestureDetector();
if (dispatch == true)
{
configGestureCount = configGestureCount > 0 ? configGestureCount-- : 0;
if (configGestureCount == 0)
{
panGestureDetector.Detach(this);
longGestureDetector.Detach(this);
pinchGestureDetector.Detach(this);
tapGestureDetector.Detach(this);
rotationGestureDetector.Detach(this);
panGestureDetector.Detected -= OnGestureDetected;
longGestureDetector.Detected -= OnGestureDetected;
pinchGestureDetector.Detected -= OnGestureDetected;
tapGestureDetector.Detected -= OnGestureDetected;
rotationGestureDetector.Detected -= OnGestureDetected;
panGestureDetector = null;
longGestureDetector = null;
pinchGestureDetector = null;
tapGestureDetector = null;
rotationGestureDetector = null;
}
}
else
{
if (configGestureCount == 0)
{
panGestureDetector.Attach(this);
longGestureDetector.Attach(this);
pinchGestureDetector.Attach(this);
tapGestureDetector.Attach(this);
rotationGestureDetector.Attach(this);
panGestureDetector.Detected += OnGestureDetected;
longGestureDetector.Detected += OnGestureDetected;
pinchGestureDetector.Detected += OnGestureDetected;
tapGestureDetector.Detected += OnGestureDetected;
rotationGestureDetector.Detected += OnGestureDetected;
}
configGestureCount++;
}
}
private void OnGestureDetected(object source, EventArgs e)
{
// Does notting. This is to consume the gesture.
}
///
/// Called when the view is hit through TouchEvent or GestureEvent.
/// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
/// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
/// User can override whether hit or not in HitTest.
/// You can get the coordinates relative to tthe top-left of the hit view by touch.GetLocalPosition(0).
/// or you can get the coordinates relative to the top-left of the screen by touch.GetScreenPosition(0).
///
// The touch data
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual bool HitTest(Touch touch)
{
return true;
}
///
/// Retrieve the View's current Color.
///
///
/// The , , , and properties are set in the main thread.
/// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
/// However, , , , and properties are updated in real time,
/// and users can get the current actual values through them.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public Color CurrentColor => GetCurrentColor();
///
/// Retrieve the current scale factor applied to the View.
///
///
/// The , , , and properties are set in the main thread.
/// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
/// However, , , , and properties are updated in real time,
/// and users can get the current actual values through them.
///
[EditorBrowsable(EditorBrowsableState.Never)]
public Vector3 CurrentScale => GetCurrentScale();
}
}