public FilterAlertsPopup(AlertsViewModel ViewModel)
        {
            InitializeComponent();

            BindingContext = ViewModel;

            if (ViewModel != null)
            {
                TableSectionAlertLevels.Clear();

                TableSectionAlertLevels.Add(new CommonCategoryCell
                {
                    BindingContext = ViewModel.AllCategory
                });

                foreach (var item in ViewModel.AlertsLevelCategories)
                {
                    var AlertCategoryCell = new AlertCategoryCell
                    {
                        BindingContext = item
                    };

                    TableSectionAlertLevels.Add(AlertCategoryCell);
                }
            }
        }
Пример #2
0
        void ViewModel_OnAlertsCategoriesLoaded(Object sender, List <AlertCategoryModel> AlertsCategories)
        {
            TableSectionCategories.Clear();

            TableSectionCategories.Add(new CommonCategoryCell
            {
                BindingContext = ViewModel.AllCategory
            });

            foreach (var item in AlertsCategories)
            {
                var AlertCategoryCell = new AlertCategoryCell
                {
                    BindingContext = item
                };

                TableSectionCategories.Add(AlertCategoryCell);
            }
        }