|
|
|
@ -5,6 +5,7 @@ using System;
@@ -5,6 +5,7 @@ using System;
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
|
using System.Windows.Markup; |
|
|
|
|
using System.Windows; |
|
|
|
|
|
|
|
|
|
using ICSharpCode.WpfDesign.XamlDom; |
|
|
|
|
|
|
|
|
@ -87,6 +88,14 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
@@ -87,6 +88,14 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
|
|
|
|
|
if (ComponentRegistered != null) { |
|
|
|
|
ComponentRegistered(this, new DesignItemEventArgs(site)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_context.RootItem != null && !string.IsNullOrEmpty(site.Name)) { |
|
|
|
|
var nameScope = _context.RootItem.Component as INameScope; |
|
|
|
|
nameScope = NameScope.GetNameScope((DependencyObject) _context.RootItem.Component); |
|
|
|
|
var fnd = nameScope.FindName(site.Name); |
|
|
|
|
if (fnd != null) |
|
|
|
|
site.Name = null; |
|
|
|
|
} |
|
|
|
|
return site; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|