Class Control
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
- API Level:
- 6
The control component is base class of tv nui components. It's abstract class, so can't instantiate and can only be inherited.
C#Copypublic class Control : VisualView, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
- Derived
- Implements
Constructors
Declaration
C#Copypublic Control()
API Level: 6
Declaration
C#Copypublic Control(string styleName)
Parameters
Type | Name | Description |
---|---|---|
String | styleName | The name of style in the current theme to be applied |
API Level: 6
Declaration
C#Copypublic Control(ControlStyle style)
Parameters
Type | Name | Description |
---|---|---|
ControlStyle | style | Create control with style. |
API Level: 6
Fields
Declaration
C#Copypublic static readonly BindableProperty CommandParameterProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty CommandProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty FeedbackProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
Declaration
C#Copypublic ICommand Command { get; set; }
Property Value
Type | Description |
---|---|
ICommand |
Declaration
C#Copypublic object CommandParameter { get; set; }
Property Value
Type | Description |
---|---|
Object |
Declaration
C#Copypublic bool Feedback { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Declaration
C#Copyprotected override ViewStyle CreateViewStyle()
Returns
Type | Description |
---|---|
ViewStyle |
Overrides
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | Dispose type. |
Overrides
API Level: 6
OnFocusGained()
Called when the control gain key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is gained.
Declaration
C#Copypublic override void OnFocusGained()
Overrides
API Level: 6
OnFocusLost()
Called when the control loses key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is lost.
Declaration
C#Copypublic override void OnFocusLost()
Overrides
API Level: 6
Declaration
C#Copypublic override void OnInitialize()
Overrides
Declaration
C#Copypublic override bool OnKey(Key key)
Parameters
Type | Name | Description |
---|---|---|
Key | key | The key event. |
Returns
Type | Description |
---|---|
Boolean | True if the key event should be consumed. |
Overrides
API Level: 6
OnRelayout(Vector2, RelayoutContainer)
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 views differently after certain operations like add or remove views, resize, or after changing specific properties.
As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).
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 views to this container that it is not able to allocate a size for. |
Overrides
API Level: 6
Declaration
C#Copyprotected override void OnThemeChanged(object sender, ThemeChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | |
ThemeChangedEventArgs | e |
Overrides
OnThemeChangedEvent(Object, StyleManager.ThemeChangeEventArgs)
Theme change callback when theme is changed, this callback will be trigger. Note that it is deprecated API.Please use OnThemeChanged instead.
Declaration
C#Copyprotected virtual void OnThemeChangedEvent(object sender, StyleManager.ThemeChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Object | sender | The sender |
StyleManager.ThemeChangeEventArgs | e | The event data |
API Level: 6
Declaration
C#Copyprotected virtual void OnUpdate()
API Level: 6
PassFocusableViewInsideIfNeeded()
when the derived class of Control is used as container and itself is not Focusable, this can be used when calling SetCurrentFocusView() this can return Focusable View inside of itself. this can be utilized when default algorithm is enabled and when the case of setting first key focus in container.
Declaration
C#Copyprotected virtual View PassFocusableViewInsideIfNeeded()
Returns
Type | Description |
---|---|
View | Focusable View inside of container |
Declaration
C#Copypublic static void Preload()