Class ViewStyle
Definition
- Namespace:
- Tizen.NUI.BaseComponents
- Assembly:
- Tizen.NUI.dll
The base class of style attributes for a view.
public class ViewStyle : BindableObject, INotifyPropertyChanged, IDisposable
- Inheritance
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
View SourceViewStyle()
Create an empty style instance.
Declaration
public ViewStyle()
Properties
View SourceBackgroundColor
Gets or sets the color of the background of view. The mutually exclusive with "BackgroundImage". Setting it overwrites existing "BackgroundImage".
Declaration
public Selector<Color> BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Selector<Color> |
BackgroundImage
Gets or sets the image resource url of the background of view. The mutually exclusive with "BackgroundColor". Setting it overwrites existing "BackgroundColor".
Declaration
public Selector<string> BackgroundImage { get; set; }
Property Value
Type | Description |
---|---|
Selector<string> |
BorderlineColor
The color for the borderline of the View.
Declaration
public Color BorderlineColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
BorderlineOffset
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.
Declaration
public float? BorderlineOffset { get; set; }
Property Value
Type | Description |
---|---|
float? |
BorderlineWidth
The width for the borderline of the View.
Declaration
public float? BorderlineWidth { get; set; }
Property Value
Type | Description |
---|---|
float? |
BoxShadow
Describes a box shaped shadow drawing for a View.
Declaration
public Selector<Shadow> BoxShadow { get; set; }
Property Value
Type | Description |
---|---|
Selector<Shadow> |
CornerRadius
The radius for the rounded corners of the View. 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). Each radius will clamp internally to the half of smaller of the view's width or height.
Declaration
public Vector4 CornerRadius { get; set; }
Property Value
Type | Description |
---|---|
Vector4 |
CornerRadiusPolicy
Whether the CornerRadius property value is relative (percentage [0.0f to 0.5f] of the view size) or absolute (in world units). It is absolute by default. When the policy is relative, the corner radius is relative to the smaller of the view's width and height.
Declaration
public VisualTransformPolicyType? CornerRadiusPolicy { get; set; }
Property Value
Type | Description |
---|---|
VisualTransformPolicyType? |
HeightResizePolicy
Gets or sets the height resize policy to be used.
Declaration
public ResizePolicyType? HeightResizePolicy { get; set; }
Property Value
Type | Description |
---|---|
ResizePolicyType? |
Margin
Gets or sets the Margin for use in layout.
Declaration
public Extents Margin { get; set; }
Property Value
Type | Description |
---|---|
Extents |
MaximumSize
Gets or sets the maximum size the view can be assigned in size negotiation.
Declaration
public Size2D MaximumSize { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
MinimumSize
Gets or sets the minimum size the view can be assigned in size negotiation.
Declaration
public Size2D MinimumSize { get; set; }
Property Value
Type | Description |
---|---|
Size2D |
Opacity
Defines view's opacity value.
Declaration
public Selector<float?> Opacity { get; set; }
Property Value
Type | Description |
---|---|
Selector<float?> |
Padding
Gets or sets the padding for use in layout.
Declaration
public Extents Padding { get; set; }
Property Value
Type | Description |
---|---|
Extents |
ParentOrigin
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.
Declaration
public Position ParentOrigin { get; set; }
Property Value
Type | Description |
---|---|
Position |
PivotPoint
Gets or sets the pivot 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 pivot point.
A view's orientation is the rotation from its default orientation, the rotation is centered around its pivot point.
Declaration
public Position PivotPoint { get; set; }
Property Value
Type | Description |
---|---|
Position |
Position
Gets or sets the position of the view.
Declaration
public Position Position { get; set; }
Property Value
Type | Description |
---|---|
Position |
PositionUsesPivotPoint
Determines whether the pivot point should be used to determine the position of the view.
Declaration
public bool? PositionUsesPivotPoint { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Size
Sets the size of a view for the width, the height, and the depth.
Declaration
public Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size |
SizeHeight
Gets or sets the height of the view.
Declaration
public float? SizeHeight { get; set; }
Property Value
Type | Description |
---|---|
float? |
SizeModeFactor
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.
Declaration
public Vector3 SizeModeFactor { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
SizeWidth
Gets or sets the width of the view.
Declaration
public float? SizeWidth { get; set; }
Property Value
Type | Description |
---|---|
float? |
WidthResizePolicy
Gets or sets the width resize policy to be used.
Declaration
public ResizePolicyType? WidthResizePolicy { get; set; }
Property Value
Type | Description |
---|---|
ResizePolicyType? |
Methods
View SourceDispose()
Release instance.
Declaration
public void Dispose()
Dispose(bool)
Release instance.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | If it true, the method has been called by a user's code. Otherwise the method has been called by the finalizer. |