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(); }
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(); }
public bool Disabled() => _isDisabled?.Invoke() ?? false;
public void DoIsDisabled(bool disabled) => IsDisabled?.Invoke(disabled);