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#Copypublic class VisualView : CustomView, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
-
Tizen.NUI.Binding.BindableObjectTizen.NUI.Binding.ElementVisualView
- Derived
-
Tizen.NUI.Components.Control
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Examples
Example:
CopyVisualView _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
Declaration
C#Copypublic VisualView()
API Level: 3
Properties
Declaration
C#Copypublic int NumberOfVisuals { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
API Level: 3
Methods
Declaration
C#Copypublic 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
AnimateVisual(VisualMap, String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)
Creates a visual animation (transition) with the input parameters.
Declaration
C#Copypublic 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
AnimateVisualAdd(VisualMap, String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)
Adds a group visual animation (transition) map with the input parameters.
Declaration
C#Copypublic 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
AnimateVisualAddFinish()
Finishes to add a visual animation (transition) map and creates a transition animation.
Declaration
C#Copypublic Animation AnimateVisualAddFinish()
Returns
Type | Description |
---|---|
Animation | Animation instance. |
API Level: 3
Declaration
C#Copypublic override void OnInitialize()
Overrides
API Level: 3
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#Copypublic 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
Declaration
C#Copypublic void RemoveAll()
API Level: 3
Declaration
C#Copypublic void RemoveVisual(string visualName)
Parameters
Type | Name | Description |
---|---|---|
System.String | visualName | The name of a visual to remove. |
API Level: 3
Declaration
C#Copypublic Animation VisualAnimate(VisualAnimator visualMap)
Parameters
Type | Name | Description |
---|---|---|
VisualAnimator | visualMap |
Returns
Type | Description |
---|---|
Animation |