From 175f95ebcd59885285b1181b76a4602db9d60e6e Mon Sep 17 00:00:00 2001 From: jkuehner Date: Wed, 12 Nov 2014 09:32:14 +0100 Subject: [PATCH] Fix Problems with Namescopes --- .../Project/Xaml/XamlModelCollectionElementsCollection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlModelCollectionElementsCollection.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlModelCollectionElementsCollection.cs index 05ac5433e7..d3b1b163cf 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlModelCollectionElementsCollection.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlModelCollectionElementsCollection.cs @@ -175,13 +175,13 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml void RemoveInternal(int index, XamlDesignItem item) { + NameScopeHelper.NameChanged(item.XamlObject, item.Name, null); + Debug.Assert(property.CollectionElements[index] == item.XamlObject); property.CollectionElements.RemoveAt(index); if (CollectionChanged != null) CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index)); - - NameScopeHelper.NameChanged(item.XamlObject, item.Name, null); } void InsertInternal(int index, XamlDesignItem item)