Esempio n. 1
0
 private void DataSource_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     models = DataSource.Select(x => new TabOption()
     {
         IsClosable = IsClosable?.Invoke(x),
         IsDisabled = IsDisabled?.Invoke(x),
         Name       = Name(x),
         Title      = Title(x),
         Content    = Content(x)
     }).ToList();
 }
Esempio n. 2
0
 protected override void OnInitialized()
 {
     DataSource.CollectionChanged -= DataSource_CollectionChanged;
     DataSource.CollectionChanged += DataSource_CollectionChanged;
     models = DataSource.Select(x => new TabOption()
     {
         IsClosable = IsClosable?.Invoke(x),
         IsDisabled = IsDisabled?.Invoke(x),
         Name       = Name(x),
         Title      = Title(x),
         Content    = Content(x)
     }).ToList();
 }