Binding collection to ModernTab.Links

Apr 13, 2013 at 9:07 PM
Hi

Is there a way of binding a collection of items to ModernTab.Links ?

Cheers

Mark H
Coordinator
Apr 13, 2013 at 9:18 PM
Edited Apr 13, 2013 at 9:19 PM
Yes, if you add a property of type LinkCollection to your view model, you can use bindings
public class MyViewModel : NotifyPropertyChanged
{
  private LinkCollection items = new LinkCollection();
  public LinkCollection Items
  {
    get { return this.items; }
    set {
      if (this.items != value) {
        this.items = value;
        OnPropertyChanged("Items");
      }
    }
  }
}
And in XAML:
<mui:ModernTab Links="{Binding Links}" />