Definition
- Namespace:
- Tizen.NUI.UIComponents
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
The Button class is a base class for different kinds of buttons.
This class provides the disabled property and the clicked signal.
The clicked event handler is emitted when the button is touched, and the touch point doesn't leave the boundary of the button.
When the disabled property is set to true, no signal is emitted.
The 'Visual' describes not just traditional images like PNG and BMP, but also refers to whatever is used to show the button. It could be a color, gradient, or some other kind of renderer.
The button's appearance can be modified by setting properties for the various visuals or images.
It is not mandatory to set all the visuals. A button could be defined only by setting its background visual, or by setting its background and selected visuals.
The button visual is shown over the background visual.
When pressed, the unselected visuals are replaced by the selected visuals.
The text label is always placed on the top of all images.
When the button is disabled, the background button and the selected visuals are replaced by their disabled visuals.
public class Button : View, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
-
Tizen.NUI.Binding.BindableObject
Tizen.NUI.Binding.Element
Button
- Derived
-
- Implements
-
System.IDisposable
Constructors
View Source
Creates an uninitialized button.
Only the derived versions can be instantiated.
Declaration
API Level: 3
Properties
View Source
If the autorepeating property is set to true, then the togglable property is set to false.
Declaration
public bool AutoRepeating { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the disabled while selected background button visual.
Declaration
public PropertyMap DisabledSelectedBackgroundVisual { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the disabled selected state foreground or icon button visual.
Declaration
public PropertyMap DisabledSelectedVisual { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the disabled while unselected background button visual.
Declaration
public PropertyMap DisabledUnselectedBackgroundVisual { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the disabled unselected state foreground or icon visual.
Declaration
public PropertyMap DisabledUnselectedVisual { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the padding around the foreground visual.
Declaration
public Vector4 ForegroundVisualPadding { get; set; }
Property Value
API Level: 3
View Source
By default, this value is set to 0.15 seconds.
Declaration
public float InitialAutoRepeatingDelay { get; set; }
Property Value
API Level: 3
Declaration
public PropertyMap Label { get; set; }
Property Value
API Level: 3
Declaration
public Vector4 LabelPadding { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the position of the the label in relation to the foreground or icon, if both present.
Declaration
public Button.Align LabelRelativeAlignment { get; set; }
Property Value
API Level: 3
View Source
LabelText
Gets or sets the text of the label.
Declaration
public string LabelText { get; set; }
Property Value
Type |
Description |
System.String |
|
API Level: 3
View Source
By default, this value is set to 0.05 seconds.
Declaration
public float NextAutoRepeatingDelay { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the togglable button as either selected or unselected, togglable property must be set to true.
Declaration
public bool Selected { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the selected background button visual.
Declaration
public PropertyMap SelectedBackgroundVisual { get; set; }
Property Value
API Level: 3
Declaration
public Color SelectedColor { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the selected button foreground or icon visual.
Declaration
public PropertyMap SelectedVisual { get; set; }
Property Value
API Level: 3
View Source
If the togglable property is set to true, then the autorepeating property is set to false.
Declaration
public bool Togglable { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the disabled unselected state background button visual.
Declaration
public PropertyMap UnselectedBackgroundVisual { get; set; }
Property Value
API Level: 3
Declaration
public Color UnselectedColor { get; set; }
Property Value
API Level: 3
View Source
Gets or sets the unselected button foreground or icon visual.
Declaration
public PropertyMap UnselectedVisual { get; set; }
Property Value
API Level: 3
Methods
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Overrides
API Level: 3
Events
View Source
The Clicked event will be triggered when the button is touched and the touch point doesn't leave the boundary of the button.
Declaration
public event EventHandlerWithReturnType<object, EventArgs, bool> Clicked
Event Type
API Level: 3
View Source
The Pressed event will be triggered when the button is touched.
Declaration
public event EventHandlerWithReturnType<object, EventArgs, bool> Pressed
Event Type
API Level: 3
View Source
The Released event will be triggered when the button is touched and the touch point leaves the boundary of the button.
Declaration
public event EventHandlerWithReturnType<object, EventArgs, bool> Released
Event Type
API Level: 3
View Source
The StateChanged event will be triggered when the button's state is changed.
Declaration
public event EventHandlerWithReturnType<object, EventArgs, bool> StateChanged
Event Type
API Level: 3
Implements
System.IDisposable