MossbauerLab / UnivemMSAggr

A simple aggregation tool for fast data aggregtion from couple of UNIVEM MS files into one simple text or doc files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GUI Stilization

EvilLord666 opened this issue · comments

We should use styles for achieving a good looking UI. Perhaps we should take it from one of the themes

We should select theme in settings (we should add a button for changes)
Styles and resources for themes should be described in app resources file

ok, working on it

deal! 👍

Mike, let's choose one of the methods are able in WPF for skin loading.


The first method: using Loose XAML

  • Loose skin mechanism is based on loose XAML files which are actually resource dictionaries.

Here are
Pros

  • Loose XAML files are dynamic, thus can be edited online and offline (whether the application is running or not), without compiling or parsing.

Cons

  • Slow load time since each loose XAML file should be parsed and tokenized at runtime.
  • Not safe since it can be edited without any build/compile action.

The second method: Compiled

  • Compiled skin mechanism is based on resource dictionaries inside XAML files, which are parsed, serialized (baml) and packed into the governed assembly.

Pros

  • Fast load time.
  • Safe since being parsed, tokenized and serialized.
  • Custom types are usually compiled into the same assembly.
  • Can be shared by placing the assembly in the GAC.

Cons

  • Must be loaded into the running application (AppDomain) to take effect.
  • Once loaded can't be unloaded until restarting the application. This consumes a lot of memory depending on the assembly size and the amount of skins.
  • Static, and should be parsed, serialized (baml) and packed into the governed assembly.
  • Can't be loaded unless referenced (add reference to assembly) at design time.

If we plan to have only two skins in this app I guess it wouldn't be so bad to use "Compiled" variant, isn't it?

What about https://github.com/MahApps/MahApps.Metro This project have net4.0 project, we could possibly use it via nuget or via github dependent project

Yeah, I looked at it, it isn't really bad!
We can adopt it.

The point is there are two almost similar ways to switch between the themes of an app (I don't speak about themes from dll variant now):
it is necessary to add xaml files in project, Do smth like merge resource dictionaries and apply this or that style from xaml but they have to be loaded in pre-compile stage!
I started doing the same thing as in mentioned nuget package.
Currently there are some issues with stylization of some controls but using this package might be helpful.
Need to consider it in detail.