Class Switch
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
- API Level:
- 6
Switch is one kind of common component, it can be used as selector. User can handle Navigation by adding/inserting/deleting NavigationItem.
public class Switch : Button, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
-
Tizen.NUI.Binding.BindableObjectTizen.NUI.Binding.ElementTizen.NUI.Components.ControlSwitch
- Implements
Constructors
View SourceSwitch()
Creates a new instance of a Switch.
Declaration
public Switch()
API Level: 6
View SourceSwitch(String)
Creates a new instance of a Switch with style.
Declaration
public Switch(string style)
Parameters
Type | Name | Description |
---|---|---|
String | style | Create Switch by special style defined in UX. |
API Level: 8
View SourceSwitch(SwitchStyle)
Creates a new instance of a Switch with style.
Declaration
public Switch(SwitchStyle switchStyle)
Parameters
Type | Name | Description |
---|---|---|
SwitchStyle | switchStyle | Create Switch by style customized by user. |
API Level: 8
Properties
View SourceStyle
Return a copied Style instance of Switch
Declaration
public SwitchStyle Style { get; }
Property Value
Type | Description |
---|---|
SwitchStyle |
Remarks
It returns copied Style instance and changing it does not effect to the Switch. Style setting is possible by using constructor or the function of ApplyStyle(ViewStyle viewStyle)
API Level: 8
View SourceSwitchBackgroundImageURLSelector
Background image's resource url selector in Switch.
Declaration
public StringSelector SwitchBackgroundImageURLSelector { get; set; }
Property Value
Type | Description |
---|---|
Tizen.NUI.Components.StringSelector |
API Level: 6
View SourceSwitchHandlerImageSize
Handler image's size in Switch.
Declaration
public Size SwitchHandlerImageSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
API Level: 6
View SourceSwitchHandlerImageURL
Handler image's resource url in Switch.
Declaration
public string SwitchHandlerImageURL { get; set; }
Property Value
Type | Description |
---|---|
String |
API Level: 6
View SourceSwitchHandlerImageURLSelector
Handler image's resource url selector in Switch. Getter returns copied selector value if exist, null otherwise.
Declaration
public StringSelector SwitchHandlerImageURLSelector { get; set; }
Property Value
Type | Description |
---|---|
Tizen.NUI.Components.StringSelector |
API Level: 6
View SourceThumb
Switch's thumb part.
Declaration
public ImageView Thumb { get; }
Property Value
Type | Description |
---|---|
ImageView |
API Level: 8
View SourceTrack
Switch's track part.
Declaration
public ImageView Track { get; }
Property Value
Type | Description |
---|---|
ImageView |
API Level: 8
Methods
View SourceCreateViewStyle()
Get Switch style.
Declaration
protected override ViewStyle CreateViewStyle()
Returns
Type | Description |
---|---|
Tizen.NUI.BaseComponents.ViewStyle | The default switch style. |
Overrides
API Level: 8
View SourceDispose(DisposeTypes)
Dispose Switch and all children on it.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | Dispose type. |
Overrides
API Level: 6
View SourceOnKey(Key)
Called after a key event is received by the view that has had its focus set.
Declaration
public 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: 8
View SourceOnTouch(Touch)
Called after a touch event is received by the owning view.
CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
Declaration
[Obsolete("Deprecated in API8; Will be removed in API10. Please use OnClicked instead.")]
public override bool OnTouch(Touch touch)
Parameters
Type | Name | Description |
---|---|---|
Touch | touch | The touch event. |
Returns
Type | Description |
---|---|
Boolean | True if the event should be consumed. |
Overrides
API Level: 8
Events
View SourceSelectedChanged
An event for the item selected signal which can be used to subscribe or unsubscribe the event handler provided by the user.
Declaration
public event EventHandler<SelectedChangedEventArgs> SelectedChanged
Event Type
Type | Description |
---|---|
EventHandler<SelectedChangedEventArgs> |
API Level: 8
View SourceSelectedEvent
An event for the item selected signal which can be used to subscribe or unsubscribe the event handler provided by the user.
Declaration
[Obsolete("Deprecated in API8; Will be removed in API10. Please use SelectedChanged event instead.")]
public event EventHandler<Switch.SelectEventArgs> SelectedEvent
Event Type
Type | Description |
---|---|
EventHandler<Switch.SelectEventArgs> |