|
|
|
@ -96,6 +96,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
@@ -96,6 +96,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
|
|
|
|
|
/// <param name="newName"></param>
|
|
|
|
|
public void FixDesignItemReferencesOnNameChange(string oldName, string newName) |
|
|
|
|
{ |
|
|
|
|
if (!string.IsNullOrEmpty(oldName) && !string.IsNullOrEmpty(newName)) { |
|
|
|
|
var root = GetRootXamlObject(this.XamlObject); |
|
|
|
|
var references = GetAllChildXamlObjects(root).Where(x => x.ElementType == typeof(Reference) && Equals(x.FindOrCreateProperty("Name").ValueOnInstance, oldName)); |
|
|
|
|
foreach (var designItem in references) |
|
|
|
@ -116,6 +117,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
@@ -116,6 +117,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
|
|
|
|
|
property.PropertyValue = propertyValue; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Find's the Root XamlObject (real Root, or Root Object in Namescope)
|
|
|
|
|