iNKORE-NET / UI.WPF.Modern

Modern (Fluent 2) styles and controls for your WPF applications
https://docs.inkore.net/ui-wpf-modern
GNU Lesser General Public License v2.1
332 stars 29 forks source link

Make Single Dll and remove duplicate and useless codes #21

Closed ghost1372 closed 7 months ago

ghost1372 commented 7 months ago

What do you think about making one project instead of two? i mean there is 2 dll, but why we need 2? we can have 1 dll. Also, there seems to be a lot of code that is either unused or duplicated (I guess). For example, in some places there are native codes (p/invoke), and on the other hand, there is a source generator package (CsWin32). I used your project for my wizard template, but I encountered many problems, including various errors related to CsWin32 source generator package. or strong named sign assembly...

image

I ended up having to copy a sample of your code and create a single project, I also removed the source generator package (it was very easy and I wrote the native code myself, The native codes used were very few).

https://github.com/WinUICommunity/WinUICommunity-Templates/tree/main/dev/WinUICommunity_VS_Templates/WizardShell

Therefore, I think it is better to have a review of the structure and written codes and arrange things. There are classes and folders with the same name but different namespace. Anyway, I like what you did.

NotYoojun commented 7 months ago

Hi thank you for using our library and giving us so many useful suggestions. Now please let me reply every idea one by one.

To begin with, the assembly 'iNKORE.UI.WPF.Modern' contains certain styles and definitions for modern styles, however, the 'iNKORE.UI.WPF.Modern.Controls' includes some special controls. They actually have different functions. Also, the first dll is about 5 MB and the second is about 2 MB. For example, If I'm writing a very simple app that just have a few native controls on the window. The program have to be small enough, at this time, the advantage of splitting to two dlls begins to take place. If you're working on a complex project, then this seems nothing helpful to you. However, things are not always like this. So my idea is keeping it as two separated libs.

What's more, there are some unused codes, but I'm not available to clean them up right now. Also, I'm not good at writing these native codes. As for the namespaces, I know that when I'm writing those, I don't have a clear mind. But you know what, I'm just too lazy to organize them (just kidding 😂, I'm actually working on some other projects). If you are available some time and happy to help, a pull request is welcomed at any time.

Thank you again, feel free to ask me.

[EDITED] I'll try my best to re-organize the namespaces and folder structures when I'm available.

NotYoojun commented 7 months ago

Hi @ghost1372, I'm trying to re-organize the files and namespaces. I've made a commit to move the structures in the main lib (iNKORE.UI.WPF.Modern). However I don't think I have time to test it out. Could u pls help me with some tests to see if there's any issue?

ghost1372 commented 7 months ago

@NotYoojun very good please see my new issue #22 and i think will be useful for this