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.
public class VisualView : CustomView, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
-
Tizen.NUI.Binding.BindableObjectTizen.NUI.Binding.ElementVisualView
- Implements
Examples
Example:
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 SourceVisualView()
Constructor.
Declaration
public VisualView()
API Level: 3
Properties
View SourceNumberOfVisuals
Gets the total number of visuals which are added by users.
Declaration
public int NumberOfVisuals { get; }
Property Value
Type | Description |
---|---|
Int32 |
API Level: 3
Methods
View SourceAddVisual(String, VisualMap)
Adds or updates a visual to visual view.
Declaration
public void AddVisual(string visualName, VisualMap visualMap)
Parameters
Type | Name | Description |
---|---|---|
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 SourceAnimateVisual(VisualMap, String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)
Creates a visual animation (transition) with the input parameters.
Declaration
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. |
String | property | The property of visual to animation. |
Object | destinationValue | The destination value of property after animation. |
Int32 | startTime | The start time of visual animation. |
Int32 | endTime | The end time of visual animation. |
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 SourceAnimateVisualAdd(VisualMap, String, Object, Int32, Int32, Nullable<AlphaFunction.BuiltinFunctions>, Object)
Adds a group visual animation (transition) map with the input parameters.
Declaration
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. |
String | property | The property of visual to animation. |
Object | destinationValue | The destination value of property after animation. |
Int32 | startTime | The start time of visual animation. |
Int32 | endTime | The end time of visual animation. |
Nullable<AlphaFunction.BuiltinFunctions> | alphaFunction | The alpha function of visual animation. |
Object | initialValue | The initial property value of visual animation. |
API Level: 3
View SourceAnimateVisualAddFinish()
Finishes to add a visual animation (transition) map and creates a transition animation.
Declaration
public Animation AnimateVisualAddFinish()
Returns
Type | Description |
---|---|
Animation | Animation instance. |
API Level: 3
View SourceOnInitialize()
Overrides the parent method.
Declaration
public override void OnInitialize()
Overrides
API Level: 3
View SourceOnRelayout(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
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 SourceRemoveAll()
Removes all visuals of the visual view.
Declaration
public void RemoveAll()
API Level: 3
View SourceRemoveVisual(String)
Removes a visual by name.
Declaration
public void RemoveVisual(string visualName)
Parameters
Type | Name | Description |
---|---|---|
String | visualName | The name of a visual to remove. |
API Level: 3
View SourceVisualAnimate(VisualAnimator)
temporary fix to pass TCT.
Declaration
public Animation VisualAnimate(VisualAnimator visualMap)
Parameters
Type | Name | Description |
---|---|---|
VisualAnimator | visualMap |
Returns
Type | Description |
---|---|
Animation |