示例#1
0
        /// <summary>
        /// Reloads the component.
        /// </summary>
        /// <returns>The component.</returns>
        /// <param name="pickerColumn">Picker column.</param>
        public void ReloadComponent(IPickerColumn pickerColumn)
        {
            var idx = columns.IndexOf(pickerColumn);

            if (idx >= 0 && PickerView != null)
            {
                PickerView.ReloadComponent(idx);
            }
        }
示例#2
0
 /// <summary>
 /// Removes the column.
 /// </summary>
 /// <returns>The column.</returns>
 /// <param name="column">Column.</param>
 public void RemoveColumn(IPickerColumn column)
 {
     if (Bound)
     {
         throw new InvalidOperationException("Cannot update bound DataSource");
     }
     if (columns.Contains(column))
     {
         columns.Remove(column);
     }
 }
示例#3
0
 /// <summary>
 /// Adds the column.
 /// </summary>
 /// <returns>The column.</returns>
 /// <param name="column">Column.</param>
 /// <param name="index">Index.</param>
 public void AddColumn(IPickerColumn column, int index = -1)
 {
     if (Bound)
     {
         throw new InvalidOperationException("Cannot update bound DataSource");
     }
     if (columns.Contains(column))
     {
         return;
     }
     if (index == -1)
     {
         columns.Add(column);
     }
     else
     {
         columns.Insert(index, column);
     }
 }
示例#4
0
 public static IProperty <int> SelectedIndexProperty(this IPickerColumn column)
 {
     return(column.Property(_ => _.SelectedIndex));
 }