Пример #1
0
        public void RemoveColumn(TableViewColumnBase value)
        {
            value.ThrowIfNull();

            if (_columnDefinitions.Remove(value))
            {
                value.PropertyChanged -= OnColumnPropertyChanged;
                ColumnChanged?.Invoke(value, EventArgs.Empty);
            }
        }
Пример #2
0
        public void AddColumn(TableViewColumnBase value)
        {
            value.ThrowIfNull();

            if (!_columnDefinitions.Add(value))
            {
                throw new ApplicationException($"Passed column '{value.GetType().FullName}' was already defined. Ensure each column gets defined only once.");
            }

            value.PropertyChanged += OnColumnPropertyChanged;
            ColumnChanged?.Invoke(value, EventArgs.Empty);
        }
Пример #3
0
 private void OnColumnPropertyChanged(object?sender, PropertyChangedEventArgs args)
 {
     ColumnChanged?.Invoke(sender, EventArgs.Empty);
 }