/// <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); } }
/// <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); } }
/// <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); } }
public static IProperty <int> SelectedIndexProperty(this IPickerColumn column) { return(column.Property(_ => _.SelectedIndex)); }