Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Feb 3, 2022
2 parents a16b4c0 + d089d65 commit 60a52c2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WpfDesigner
The WPF Designer from SharpDevelop
The WPF Designer from SharpDevelop, available via [NuGet](https://www.nuget.org/packages/ICSharpCode.WpfDesigner/)

## Overview

Expand All @@ -14,18 +14,14 @@ Branch | Status

## System Requirements

.NET 4.5 or Net Core 3.0
.NET 4.5, or .NET Core 5.0 as well as .NET 6.0

## Libraries and Integrated Tools

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

## Download

[NuGet](https://www.nuget.org/packages/ICSharpCode.WpfDesigner/)

## Sample App
![Sample App](/screenshot.png?raw=true "Sample App")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,20 @@ public void LoadItemsCombobox()

private IEnumerable<Type> GetInheritedClasses(Type type)
{
return AppDomain.CurrentDomain.GetAssemblies().Where(x => !x.IsDynamic).SelectMany(x => x.GetTypes().Where(y => y.IsClass && !y.IsAbstract && y.IsSubclassOf(type)));
return AppDomain.CurrentDomain.GetAssemblies().Where(x => !x.IsDynamic).SelectMany(x => GetLoadableTypes(x).Where(y => y.IsClass && !y.IsAbstract && y.IsSubclassOf(type)));
}

private IEnumerable<Type> GetLoadableTypes(Assembly assembly)
{
if (assembly == null) throw new ArgumentNullException("assembly");
try
{
return assembly.GetTypes();
}
catch (ReflectionTypeLoadException e)
{
return e.Types.Where(t => t != null);
}
}

private void OnAddItemClicked(object sender, RoutedEventArgs e)
Expand Down

0 comments on commit 60a52c2

Please sign in to comment.