Example #1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            CategoriesListView.DataSource = Categories;
            CategoriesListView.DataBind();
        }
Example #2
0
 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;
 }
Example #3
0
 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();
 }
Example #4
0
 private void AddCommandDialogView_Loaded(object sender, RoutedEventArgs e)
 {
     CategoriesListView.Focus();
 }