namespace Tizen.Xamarin.Forms.Extension
{
+ /// <summary>
+ /// The DropdownList class
+ /// </summary>
+ /// <example>
+ /// <code>
+ /// var dropdownList = new DropdownList()
+ /// dropdownList.ItemSelected += (s, e) =>
+ /// {
+ /// Debug.WriteLine("e.Selected Item: " + e.SelectedItem);
+ /// };
+ ///
+ /// ObservableCollection<string> ItemsList = new ObservableCollection<string>()
+ /// {
+ /// "item5", "item6", "item7", "item8"
+ /// };
+ ///
+ /// dropdownList.ItemsSource = ItemsList;
+ /// </code>
+ /// </example>
public class DropdownList : View
{
public static readonly BindableProperty SelectedItemProperty = BindableProperty.Create("SelectedItem", typeof(object), typeof(DropdownList), default(object), BindingMode.TwoWay, coerceValue: OnCoerceSelectedItem, propertyChanged: OnSelectedItemChanged);
{
}
+ /// <summary>
+ /// Gets or sets the currently selected item from the DropdownList.ItemsSource.
+ /// </summary>
public object SelectedItem
{
get { return (object)GetValue(SelectedItemProperty); }
set { SetValue(SelectedItemProperty, value); }
}
+ /// <summary>
+ /// Gets or sets the DropdownList to expand horizontally.
+ /// </summary>
public bool IsHorizontal
{
get { return (bool)GetValue(IsHorizontalProperty); }
set { SetValue(IsHorizontalProperty, value); }
}
+ /// <summary>
+ /// Triggers or dismisses the DropdownList popup from code,
+ /// the same as if the user had clicked the button or clicked outside the DropdownList.
+ /// </summary>
public bool IsExpanded
{
get { return (bool)GetValue(IsExpandedProperty); }
set { SetValue(IsExpandedProperty, value); }
}
+ /// <summary>
+ /// Gets or sets the source of items to template and display.
+ /// </summary>
public IEnumerable ItemsSource
{
get { return (IEnumerable)GetValue(ItemsSourceProperty); }
set { SetValue(ItemsSourceProperty, value); }
}
+ /// <summary>
+ /// Gets or sets a member path to a value on the ItemsSource.
+ /// </summary>
public string DisplayMemberPath
{
get { return (string)GetValue(DisplayMemberPathProperty); }