Пример #1
0
 protected bool Equals(MaterialModel other) => Id == other.Id;
Пример #2
0
        private void RemoveEvents(MaterialModel materialModel)
        {
            PropertyChangedEventManager.RemoveHandler(materialModel, MaterialModel_PropertyChanged, "");
            if (CanManipulateLogos)
            {
                PropertyChangedEventManager.RemoveHandler(materialModel.LogoModel, MaterialChild_IsSelectedChanged,
                   nameof(MaterialModel.LogoModel.IsSelected));
            }
            if (CanManipulateTexts)
            {
                foreach (var materialField in materialModel.MaterialFields)
                {
                    PropertyChangedEventManager.RemoveHandler(materialField, MaterialChild_IsSelectedChanged,
                         nameof(materialField.IsSelected));
                }

                CollectionChangedEventManager.RemoveHandler(materialModel.MaterialFields,
                    MaterialFields_CollectionChanged);
            }
        }