FluentWPF icon indicating copy to clipboard operation
FluentWPF copied to clipboard

Fix get icon

Open svr333 opened this issue 4 years ago • 0 comments

Description

In larger applications with multiple assemblies, entry assembly may be null. This will cause issues when trying to display an AcrylicWindow for example, which uses the AppIcon. (Even when AcrylicWindowStyle is set to NoIcon / None)

The reason I used Assembly#GetExecutingAssembly over Assembly#GetCallingAssembly can be found here.
It does not matter in my case but it may in someone elses.

The fix is also written in a way that will not affect other programs, only if the EntryAssembly returns null, it will get the ExecutingAssembly.

Related Issue

Resolves #87

Extra

I also removed the using statements that were not in use.

svr333 avatar Nov 20 '21 13:11 svr333