async void TestFinished() { var text = "Passed All"; if (!ItemsSource.All(x => x.Result)) { text = "Failed"; } await PageDialog.DisplayAlertAsync("", text, "OK"); }
private void FilterItem_Changed(object sender, EventArgs e) { if (ItemsSource != null && IsFilterItemChangedFire == true) { if (ItemsSource.All(x => x.IsChecked) && SelectAll != true) { SelectAll = true; } else if (ItemsSource.All(x => x.IsChecked == false) && SelectAll != false) { SelectAll = false; } else if (SelectAll != null) { SelectAll = null; } if (IsSetFilter == true) { Filter = SetFilter(); } } }
private DataGridFilterState SetFilter() { DataGridFilterInfo filterInfo = new DataGridFilterInfo(); filterInfo.FilterType = DataGridFilterType.MultiValue; filterInfo.FilterCombination = DataGridFilterCombination.And; if (ItemsSource.All(t => t.IsChecked)) { filterInfo.FilterOperation = DataGridFilterOperation.All; } else { filterInfo.FilterOperation = DataGridFilterOperation.IsOneOf; filterInfo.Value = ItemsSource.Where(x => x.IsChecked).Select(x => x.Value).ToList(); } List <DataGridFilterInfo> filterInfoList = new List <DataGridFilterInfo>(); if (Filter != null && Filter.FilterInfo != null) { foreach (var item in Filter.FilterInfo) { if (item.FilterType != DataGridFilterType.MultiValue) { filterInfoList.Add(item); } } } filterInfoList.Add(filterInfo); return(new DataGridFilterState { FilterInfo = filterInfoList }); }