protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); CategoriesListView.DataSource = Categories; CategoriesListView.DataBind(); }
public CategoriesModel(object context) { Views[0] = new AddOrEditCategory(); Views[1] = new CategoriesListView(); DataContexts[0] = ((AddOrEditCategory)Views[0]).DataContext; DataContexts[1] = ((CategoriesListView)Views[1]).DataContext; DataContexts[2] = context; }
private void FilterItem(string filter) { CategoriesListView.BeginRefresh(); if (string.IsNullOrWhiteSpace(filter)) { CategoriesListView.ItemsSource = Items; } else { CategoriesListView.ItemsSource = Items.Where(x => x.Text.ToLower().Contains(filter.ToLower())); } CategoriesListView.EndRefresh(); }
private void AddCommandDialogView_Loaded(object sender, RoutedEventArgs e) { CategoriesListView.Focus(); }