Class GridViewColumnSorter
A helper class used to sort an System.Windows.Controls.ItemsControl when the column headers are clicked.
Inheritance
System.Object
GridViewColumnSorter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Controls
Assembly: Phoenix.Controls.dll
Syntax
public class GridViewColumnSorter
Properties
View SourceCustomBindings
Gets a mapping from column header to a binding for sorting.
Declaration
public IDictionary<string, string> CustomBindings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
CustomComparers
Gets a mapping from column header to an instance of System.Collections.IComparer.
Declaration
public IDictionary<string, IComparer> CustomComparers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Collections.IComparer> |
Ignored
Gets the set of column headers for which sorting is disabled.
Declaration
public ISet<string> Ignored { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ISet<System.String> |
Methods
View SourceAddComparer(String, ListSortDirection, IComparer)
Associates the System.Collections.IComparer instance with the given column header and sort direction.
Declaration
public void AddComparer(string header, ListSortDirection dir, IComparer comparer)
Parameters
Type | Name | Description |
---|---|---|
System.String | header | The column header. |
System.ComponentModel.ListSortDirection | dir | The comparer. |
System.Collections.IComparer | comparer | The sort direction. |
AddComparers<T>(String)
Constructs ascending and descending instances of ListViewItemComparer and associates them with the given column header.
Declaration
public void AddComparers<T>(string header)
where T : ListViewItemComparer
Parameters
Type | Name | Description |
---|---|---|
System.String | header | The column header. |
Type Parameters
Name | Description |
---|---|
T | The subclass type of ListViewItemComparer. |
Click(ItemsControl, RoutedEventArgs)
Applies sorting and adds adorner arrows when a column header is clicked.
Declaration
public void Click(ItemsControl control, RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.ItemsControl | control | The list control. |
System.Windows.RoutedEventArgs | e | The click event. |