FlexGrid for WPF
検索とフィルタ処理
株価情報サンプル > 検索とフィルタ処理

このサンプルでは、前述のミュージックライブラリサンプルと同様に SearchBox コントロールを再利用して、簡単な方法で検索を行います。ユーザーは、特定の銘柄を選択する代わりに、検索ボックスに「銀行」、「保険」などを入力してデータをフィルタ処理します。

コードのコピー
FinancialDataList list = FinancialData.GetFinancialData();
var view = new MyCollectionView(list);
_flexFinancial.ItemsSource = view;
//「検索」ボックスを設定します。
_srchCompanies.View = view;
var props = _srchCompanies.FilterProperties;
props.Add(typeof(FinancialData).GetProperty("Name"));
props.Add(typeof(FinancialData).GetProperty("Symbol"));
関連トピック