Browse Source

Fix adding two times the same string in the Designer:

This does not work before:
                            var addItem = page.designSurface.DesignContext.Services.Component.RegisterComponentForDesigner(se.Value);

                            addItem.Key = se.Key;
                            d.Properties["Hardware"].CollectionElements.Add(addItem);

maybe we also need to change for Value Types!
pull/633/head
jkuehner 11 years ago
parent
commit
5aaced89af
  1. 3
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlComponentService.cs

3
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlComponentService.cs

@ -89,7 +89,8 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml @@ -89,7 +89,8 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
}
XamlDesignItem item = new XamlDesignItem(_context.Document.CreateObject(component), _context);
_sites.Add(component, item);
if (!(component is string))
_sites.Add(component, item);
if (ComponentRegistered != null) {
ComponentRegistered(this, new DesignItemEventArgs(item));
}

Loading…
Cancel
Save