private static void DeselectAll(RecordFieldMultiSelectFieldViewModel filteringAttributesField)
        {
            var mainForminContent = filteringAttributesField.GetRecordForm();

            if (mainForminContent is GridRowViewModel)
            {
                mainForminContent = mainForminContent.ParentForm;
            }

            filteringAttributesField.EditAction();
            //multiselection is done in a child form so select several and invoke save
            Assert.IsTrue(mainForminContent.ChildForms.Any());
            var filteringAttributesEntry = mainForminContent.ChildForms.First() as MultiSelectDialogViewModel <RecordField>;

            foreach (var item in filteringAttributesEntry.ItemsSource)
            {
                item.Select = false;
            }
            filteringAttributesEntry.ApplyButtonViewModel.Invoke();
            Assert.IsFalse(mainForminContent.ChildForms.Any());
        }
        private static void SelectItems(RecordFieldMultiSelectFieldViewModel multiSelectField, params int[] indexes)
        {
            var mainForminContent = multiSelectField.GetRecordForm();

            if (mainForminContent is GridRowViewModel)
            {
                mainForminContent = mainForminContent.ParentForm;
            }

            multiSelectField.EditAction();
            //multiselection is done in a child form so select several and invoke save
            Assert.IsTrue(mainForminContent.ChildForms.Any());
            var multiSelectEntry = mainForminContent.ChildForms.First() as MultiSelectDialogViewModel <RecordField>;

            foreach (var index in indexes)
            {
                multiSelectEntry.ItemsSource.ElementAt(index).Select = true;
            }
            multiSelectEntry.ApplyButtonViewModel.Invoke();

            Assert.IsFalse(mainForminContent.ChildForms.Any());
        }