Exemple #1
0
        public void RemoveColumn(TableViewColumnBase value)
        {
            value.ThrowIfNull();

            if (_columnDefinitions.Remove(value))
            {
                value.PropertyChanged -= OnColumnPropertyChanged;
                ColumnChanged?.Invoke(value, EventArgs.Empty);
            }
        }
Exemple #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);
        }
 private async Task UpdateColumnAsync(int value)
 {
     if (ActualColumn == value)
     {
         return;
     }
     ActualColumn = value;
     if (ColumnChanged.HasDelegate)
     {
         await ColumnChanged.InvokeAsync(value);
     }
     else
     {
         Column = value;
     }
 }
Exemple #4
0
 private void OnColumnPropertyChanged(object?sender, PropertyChangedEventArgs args)
 {
     ColumnChanged?.Invoke(sender, EventArgs.Empty);
 }