Comments (6)
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
from univemmsaggr.
ok, working on it
from univemmsaggr.
deal!
from univemmsaggr.
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?
from univemmsaggr.
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
from univemmsaggr.
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.
from univemmsaggr.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from univemmsaggr.