Class DataGridSource<T>
- Namespace
- Forma
- Assembly
- Forma.dll
public sealed class DataGridSource<T> : IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable, INotifyCollectionChanged, IDataGridSource, IDisposable
Type Parameters
T
- Inheritance
-
DataGridSource<T>
- Implements
-
- Inherited Members
-
Constructors
public DataGridSource(IEnumerable<T> roots, Func<T, IEnumerable<T>> children, Func<T, bool> hasChildren = null, Func<T, bool> getExpanded = null, Action<T, bool> setExpanded = null)
Parameters
roots IEnumerable<T>
children Func<T, IEnumerable<T>>
hasChildren Func<T, bool>
getExpanded Func<T, bool>
setExpanded Action<T, bool>
Properties
public int Count { get; }
Property Value
- int
public Predicate<T> Filter { get; set; }
Property Value
- Predicate<T>
public DataGridFilterMode FilterMode { get; set; }
Property Value
- DataGridFilterMode
public bool IsFixedSize { get; }
Property Value
- bool
public bool IsReadOnly { get; }
Property Value
- bool
public bool IsSynchronized { get; }
Property Value
- bool
public T this[int index] { get; }
Parameters
index int
Property Value
- T
public long ProjectionVisitCount { get; }
Property Value
- long
public ObservableCollection<DataGridSortDescription<T>> SortDescriptions { get; }
Property Value
- ObservableCollection<DataGridSortDescription<T>>
public object SyncRoot { get; }
Property Value
- object
Methods
public int Add(object value)
Parameters
value object
Returns
- int
public bool Collapse(IndexPath path)
Parameters
path IndexPath
Returns
- bool
public int CollapseAll(Func<T, bool> predicate = null)
Parameters
predicate Func<T, bool>
Returns
- int
public bool Contains(object value)
Parameters
value object
Returns
- bool
public void CopyTo(Array array, int index)
Parameters
array Array
index int
public bool Expand(IndexPath path)
Parameters
path IndexPath
Returns
- bool
public int ExpandAll(Func<T, bool> predicate = null)
Parameters
predicate Func<T, bool>
Returns
- int
public IEnumerator<T> GetEnumerator()
Returns
- IEnumerator<T>
public IndexPath GetPath(int visibleIndex)
Parameters
visibleIndex int
Returns
- IndexPath
public bool HasChildren(IndexPath path)
Parameters
path IndexPath
Returns
- bool
public int IndexOf(object value)
Parameters
value object
Returns
- int
public int IndexOfPath(IndexPath path)
Parameters
path IndexPath
Returns
- int
public void Insert(int index, object value)
Parameters
index int
value object
public bool IsExpanded(IndexPath path)
Parameters
path IndexPath
Returns
- bool
public void RefreshFilter()
public void RefreshSort()
public void Remove(object value)
Parameters
value object
public void RemoveAt(int index)
Parameters
index int
public bool Toggle(IndexPath path)
Parameters
path IndexPath
Returns
- bool
Events
public event EventHandler<DataGridExpansionChangedEventArgs<T>> Collapsed
Event Type
- EventHandler<DataGridExpansionChangedEventArgs<T>>
public event EventHandler<DataGridExpansionChangingEventArgs<T>> Collapsing
Event Type
- EventHandler<DataGridExpansionChangingEventArgs<T>>
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
- NotifyCollectionChangedEventHandler
public event EventHandler<DataGridExpansionChangedEventArgs<T>> Expanded
Event Type
- EventHandler<DataGridExpansionChangedEventArgs<T>>
public event EventHandler<DataGridExpansionChangingEventArgs<T>> Expanding
Event Type
- EventHandler<DataGridExpansionChangingEventArgs<T>>