Picker
Picker is a class which provides a function that allows the user to select scrolling motion by expressing the specified value as a list.
Add namespace
To implement Picker, include Tizen.NUI.Components
and namespace in your application:
avrasm
Copy
xmlns:comp="clr-namespace:Tizen.NUI.Components;assembly=Tizen.NUI.Components"
Create with property
To create a Picker, follow these steps:
-
Create Picker in XAML:
groovyCopy<comp:Picker x:Name="picker"/>
-
Set the Picker property:
routerosCopy<comp:Picker x:Name="picker" MinValue="0" MaxValue="100" CurrentValue="10"/>
-
Define Picker element manually:
xmlCopy<comp:Picker x:Name="picker"> <Picker.Items> <x:String>0</x:String> <x:String>1</x:String> <x:String>2</x:String> <x:String>3</x:String> <x:String>4</x:String> </Picker.Items> </Picker>
The following output is generated when the Picker is created using property:
Respond to value changed event
When you touch or pan a Picker, the Picker instance receives a value changed event. You can declare the value changed event handler as follows:
routeros
Copy
<comp:Picker x:Name="picker" ValueChanged="OnValueChanged"/>
C#
Copy
private void OnValueChanged(object sender, ValueChangedEventArgs args)
{
// Do something in response to Picker click
}
Related information
- Dependencies
- Tizen 6.5 and Higher
Submit your feedback to GitHub