void OnSelectionChanged(SelectionChangedArgs selectionChangedArgs) { var dataSourceListView = DataSourceListView((IModelListView)selectionChangedArgs.DashboardViewItemModel.View); if (dataSourceListView != null) { var dashboardViewItems = View.Items.OfType <DashboardViewItem>(); foreach (var dashboardViewItem in dashboardViewItems) { var modelDashboardViewItemEx = (IModelDashboardViewItemEx)dashboardViewItem.GetModel(View); if (modelDashboardViewItemEx.Filter.DataSourceView == dataSourceListView.Model) { var listViewFiltering = new ListViewFilteringArgs(dashboardViewItem, modelDashboardViewItemEx, dataSourceListView); OnListViewFiltering(listViewFiltering); if (!listViewFiltering.Handled) { var filterListView = FilteredListView(dataSourceListView, dashboardViewItem, modelDashboardViewItemEx); if (filterListView != null) { OnListViewFiltered(new ListViewFilteredArgs(filterListView)); } } } } } NotifyControllers(selectionChangedArgs.ListView); }
void OnListViewFiltering(ListViewFilteringArgs e) { EventHandler <ListViewFilteringArgs> handler = ListViewFiltering; if (handler != null) { handler(this, e); } }
void OnListViewFiltering(ListViewFilteringArgs e) { EventHandler <ListViewFilteringArgs> handler = ListViewFiltering; handler?.Invoke(this, e); }