title: Binding Inherited List for AutoComplete Control
body: <p>So I created a custom control for AutoComplete and everything works except my List won't bind. I set the list as a list of an Interface type so that I could use various objects that all inherit from that type.</p>
  <pre><code>public static readonly BindableProperty DataListProperty =
    BindableProperty.Create(nameof(DataList), typeof(List&lt;IAutoCompleteModel&gt;), typeof(AutoCompleteT),
      default(List&lt;IAutoCompleteModel&gt;), propertyChanged: DataListPropertyChanged);
  
  public List&lt;IAutoCompleteModel&gt; DataList
  {
    get { return (List&lt;IAutoCompleteModel&gt;)GetValue(DataListProperty); }
    set { SetValue(DataListProperty, value); }
  }
  
  private static void DataListPropertyChanged(BindableObject bindable, object oldValue, object newValue)
  {
    AutoCompleteT control = (AutoCompleteT)bindable;
    List&lt;IAutoCompleteModel&gt; temp = (List&lt;IAutoCompleteModel&gt;)newValue;
  
    control.Data.Clear();
  
    foreach (IAutoCompleteModel model in temp.OrderBy(prop =&gt; prop.Title))
      control.Data.Add(model.Title);
  }
  </code></pre>
  <p>The Interface</p>
  <pre><code>  public interface IAutoCompleteModel
    {
      public Guid Id { get; set; }
      public string Title { get; set; }
    }
  </code></pre>