ICollectionViewLiveShaping 介面

定義

定義可在 CollectionView 上即時啟用排序、群組及篩選的屬性。Defines properties that enables sorting, grouping, and filtering on a CollectionView in real time.

public interface class ICollectionViewLiveShaping
public interface ICollectionViewLiveShaping
type ICollectionViewLiveShaping = interface
Public Interface ICollectionViewLiveShaping
衍生

備註

啟用即時排序、群組或篩選時, CollectionView會在資料修改CollectionView時重新排列中的資料位置。When live sorting, grouping, or filtering is enabled, a CollectionView will rearrange the position of data in the CollectionView when the data is modified. 例如, 假設應用程式使用DataGrid來列出股票市場中的股票, 而股票則依股票值排序。For example, suppose that an application uses a DataGrid to list stocks in a stock market and the stocks are sorted by stock value. 如果在股票CollectionView上啟用即時排序, 當庫存的值變得大於或DataGrid小於另一個股票值時, 中的股票位置就會移動。If live sorting is enabled on the stocks' CollectionView, a stock's position in the DataGrid moves when the value of the stock becomes greater or less than another stock's value.

、和類別會執行ICollectionViewLiveShaping介面。 ItemCollection BindingListCollectionView ListCollectionViewThe ListCollectionView, BindingListCollectionView, and ItemCollection classes implement the ICollectionViewLiveShaping interface. 類別也會執行所ICollectionViewLiveShaping定義的屬性, 以啟用 XAML 中的屬性設定。 CollectionViewSourceThe CollectionViewSource class also implements the properties defined by ICollectionViewLiveShaping to enable setting the properties in XAML.

繼承者注意事項Notes for Inheritors

在您的自訂CollectionView上執行此介面, 以支援即時排序、分組和篩選資料。Implement this interface on your custom CollectionView to support sorting, grouping, and filtering data in real time. CollectionView可以執行排序、群組和篩選作業本身, 也可以將其中一個或多個委派給另一個物件, 例如基礎集合。Your CollectionView can implement the sorting, grouping, and filtering operations itself, or you can delegate one or more of them to another object, such as the underlying collection. 如果您委派成形作業, CollectionView可能就無法控制是否已啟用即時成形。If you delegate the shaping operations, the CollectionView might not have control over whether live shaping is enabled. CollectionView必須接受其所委派之物件的行為。Your CollectionView must accept the behavior of the object to which it delegates. 在此情況下, 請將適當的CanChange* false屬性設定為。In this case, set the appropriate CanChange* properties to false. 如果您CollectionView知道委派物件是否支援即時成形, 它可以將適當IsLive的 * 屬性設定為已知的值。If your CollectionView knows whether the delegate object supports live shaping, it can set the appropriate IsLive* properties to the known value. 否則, CollectionView應該IsLive將 * 屬性設定為nullOtherwise, the CollectionView should set the IsLive* properties to null.

屬性

CanChangeLiveFiltering

取得值,其中該值表示集合檢視是否支援即時開啟或關閉篩選資料。Gets a value that indicates whether the collection view supports turning filtering data in real time on or off.

CanChangeLiveGrouping

取得值,這個值表示這個集合檢視是否支援開啟或關閉即時群組資料功能。Gets a value that indicates whether the collection view supports turning grouping data in real time on or off.

CanChangeLiveSorting

取得值,這個值表示這個集合檢視是否支援開啟或關閉即時排序資料功能。Gets a value that indicates whether the collection view supports turning sorting data in real time on or off.

IsLiveFiltering

取得或設定值,指出是否已啟用即時篩選資料。Gets or sets a value that indicates whether filtering data in real time is enabled.

IsLiveGrouping

取得或設定值,指出是否已啟用即時設定資料群組。Gets or sets a value that indicates whether grouping data in real time is enabled.

IsLiveSorting

取得或設定值,指出是否已啟用即時排序。Gets or sets a value that indicates whether sorting in real time is enabled.

LiveFilteringProperties

取得字串集合,這些字串會指定參與即時篩選資料的屬性。Gets a collection of strings that specify the properties that participate in filtering data in real time.

LiveGroupingProperties

取得字串集合,這些字串會指定參與即時篩群組資料的屬性。Gets a collection of strings that specify the properties that participate in grouping data in real time.

LiveSortingProperties

取得字串集合,這些字串會指定參與即時排序資料的屬性。Gets a collection of strings that specify the properties that participate in sorting data in real time.

適用於