Skip to content

Commit 60a52c2

Browse files
committed
2 parents a16b4c0 + d089d65 commit 60a52c2

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# WpfDesigner
2-
The WPF Designer from SharpDevelop
2+
The WPF Designer from SharpDevelop, available via [NuGet](https://www.nuget.org/packages/ICSharpCode.WpfDesigner/)
33

44
## Overview
55

@@ -14,18 +14,14 @@ Branch | Status
1414

1515
## System Requirements
1616

17-
.NET 4.5 or Net Core 3.0
17+
.NET 4.5, or .NET Core 5.0 as well as .NET 6.0
1818

1919
## Libraries and Integrated Tools
2020

2121
Only the sample app has dependencies:
2222
* [Avalon Dock](http://avalondock.codeplex.com/)
2323
* [Avalon Edit](https://github.com/icsharpcode/AvalonEdit)
2424

25-
## Download
26-
27-
[NuGet](https://www.nuget.org/packages/ICSharpCode.WpfDesigner/)
28-
2925
## Sample App
3026
![Sample App](/screenshot.png?raw=true "Sample App")
3127

WpfDesign.Designer/Project/PropertyGrid/Editors/FlatCollectionEditor.xaml.cs

+14-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,20 @@ public void LoadItemsCombobox()
116116

117117
private IEnumerable<Type> GetInheritedClasses(Type type)
118118
{
119-
return AppDomain.CurrentDomain.GetAssemblies().Where(x => !x.IsDynamic).SelectMany(x => x.GetTypes().Where(y => y.IsClass && !y.IsAbstract && y.IsSubclassOf(type)));
119+
return AppDomain.CurrentDomain.GetAssemblies().Where(x => !x.IsDynamic).SelectMany(x => GetLoadableTypes(x).Where(y => y.IsClass && !y.IsAbstract && y.IsSubclassOf(type)));
120+
}
121+
122+
private IEnumerable<Type> GetLoadableTypes(Assembly assembly)
123+
{
124+
if (assembly == null) throw new ArgumentNullException("assembly");
125+
try
126+
{
127+
return assembly.GetTypes();
128+
}
129+
catch (ReflectionTypeLoadException e)
130+
{
131+
return e.Types.Where(t => t != null);
132+
}
120133
}
121134

122135
private void OnAddItemClicked(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)