Browse Source

Bugfix that "<TextBlock>aaa</TextBlock>" could be shown in the Designer

pull/586/head
jogibear9988 12 years ago
parent
commit
b8045d294d
  1. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlModelCollectionElementsCollection.cs

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlModelCollectionElementsCollection.cs

@ -107,7 +107,9 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
public IEnumerator<DesignItem> GetEnumerator() public IEnumerator<DesignItem> GetEnumerator()
{ {
foreach (XamlPropertyValue val in property.CollectionElements) { foreach (XamlPropertyValue val in property.CollectionElements) {
yield return GetItem(val); var item = GetItem(val);
if (item != null)
yield return item;
} }
} }
@ -121,7 +123,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
if (val is XamlObject) { if (val is XamlObject) {
return context._componentService.GetDesignItem( ((XamlObject)val).Instance ); return context._componentService.GetDesignItem( ((XamlObject)val).Instance );
} else { } else {
throw new NotImplementedException(); return null; // throw new NotImplementedException();
} }
} }

Loading…
Cancel
Save