Class VisualView

Definition

Namespace:
Tizen.NUI.BaseComponents
Assembly:
Tizen.NUI.dll
API Level:
3

A visual view control if a user adds any visual to it.

C#
Copy
public class VisualView : CustomView, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
Inheritance
Tizen.NUI.Binding.BindableObject
Tizen.NUI.Binding.Element
VisualView
Derived
Tizen.NUI.Components.Control
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable
Examples

Example:

Copy
VisualView _visualView = new VisualView(); ImageVisualMap imageVisualMap1 = new ImageVisualMap(); imageVisualMap1.URL = "./NUISample/res/images/image-1.jpg"; imageVisualMap1.VisualSize = new Vector2( 300.0f, 300.0f ); imageVisualMap1.Offset = new Vector2( 50.0f, 50.0f ); imageVisualMap1.OffsetSizeMode = new Vector4( 1.0f, 1.0f, 1.0f, 1.0f ); imageVisualMap1.Origin = AlignType.TOP_BEGIN; imageVisualMap1.AnchorPoint = AlignType.TOP_BEGIN; _visualView.AddVisual("imageVisual1", imageVisualMap1);

Constructors

View Source

VisualView()

Constructor.

Declaration
C#
Copy
public VisualView()
API Level: 3

Properties

View Source

NumberOfVisuals

Gets the total number of visuals which are added by users.

Declaration
C#
Copy
public int NumberOfVisuals { get; }
Property Value
Type Description
System.Int32
API Level: 3

Methods

View Source

AddVisual(String, VisualMap)

Adds or updates a visual to visual view.

Declaration
C#
Copy
public void AddVisual(string visualName, VisualMap visualMap)
Parameters
Type Name Description
System.String visualName

The name of a visual to add. If a name is added to an existing visual name, the visual will be replaced.

VisualMap visualMap

The property map of a visual to create.

API Level: 3
View Source

AnimateVisual(VisualMap, String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)

Creates a visual animation (transition) with the input parameters.

Declaration
C#
Copy
public Animation AnimateVisual(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = default(AlphaFunction.BuiltinFunctions? ), object initialValue = null)
Parameters
Type Name Description
VisualMap target

The visual map to animation.

System.String property

The property of visual to animation.

Object destinationValue

The destination value of property after animation.

System.Int32 startTime

The start time of visual animation.

System.Int32 endTime

The end time of visual animation.

System.Nullable<AlphaFunction.BuiltinFunctions> alphaFunction

The alpha function of visual animation.

Object initialValue

The initial property value of visual animation.

Returns
Type Description
Animation

Animation instance

API Level: 3
View Source

AnimateVisualAdd(VisualMap, String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)

Adds a group visual animation (transition) map with the input parameters.

Declaration
C#
Copy
public void AnimateVisualAdd(VisualMap target, string property, object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = default(AlphaFunction.BuiltinFunctions? ), object initialValue = null)
Parameters
Type Name Description
VisualMap target

The visual map to animation.

System.String property

The property of visual to animation.

Object destinationValue

The destination value of property after animation.

System.Int32 startTime

The start time of visual animation.

System.Int32 endTime

The end time of visual animation.

System.Nullable<AlphaFunction.BuiltinFunctions> alphaFunction

The alpha function of visual animation.

Object initialValue

The initial property value of visual animation.

API Level: 3
View Source

AnimateVisualAddFinish()

Finishes to add a visual animation (transition) map and creates a transition animation.

Declaration
C#
Copy
public Animation AnimateVisualAddFinish()
Returns
Type Description
Animation

Animation instance.

API Level: 3
View Source

OnInitialize()

Overrides the parent method.

Declaration
C#
Copy
public override void OnInitialize()
Overrides
API Level: 3
View Source

OnRelayout(Vector2, RelayoutContainer)

Overrides the method of OnRelayout() for CustomView class.
Called after the size negotiation has been finished for this control.
The control is expected to assign this given size to itself or its children.
Should be overridden by derived classes if they need to layout actors differently after certain operations like add or remove actors, resize, or after changing specific properties.

Declaration
C#
Copy
public override void OnRelayout(Vector2 size, RelayoutContainer container)
Parameters
Type Name Description
Vector2 size

The allocated size.

RelayoutContainer container

The control should add actors to this container that it is not able to allocate a size for.

Overrides
Remarks

As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).

API Level: 3
View Source

RemoveAll()

Removes all visuals of the visual view.

Declaration
C#
Copy
public void RemoveAll()
API Level: 3
View Source

RemoveVisual(String)

Removes a visual by name.

Declaration
C#
Copy
public void RemoveVisual(string visualName)
Parameters
Type Name Description
System.String visualName

The name of a visual to remove.

API Level: 3
View Source

VisualAnimate(VisualAnimator)

temporary fix to pass TCT.

Declaration
C#
Copy
public Animation VisualAnimate(VisualAnimator visualMap)
Parameters
Type Name Description
VisualAnimator visualMap
Returns
Type Description
Animation
API Level: 3

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable