Ejemplo n.º 1
0
        public void RemoveNotifyCollectionChangedHandler(object value, IHandleNotifyCollectionChanged handler)
        {
            var notifyCollectionChanged = value as INotifyCollectionChanged;

            if (notifyCollectionChanged != null && handler != null)
            {
                notifyCollectionChanged.CollectionChanged -= handler.HandleNotifyCollectionChanged;
            }
        }
Ejemplo n.º 2
0
		public void AddNotifyCollectionChangedHandler(object value, IHandleNotifyCollectionChanged handler)
		{
			RemoveNotifyCollectionChangedHandler(value, handler);
			var notifyCollectionChanged = value as INotifyCollectionChanged;
			if (notifyCollectionChanged != null && handler != null)
			{
				notifyCollectionChanged.CollectionChanged += handler.HandleNotifyCollectionChanged;
			}
		}