Comments (2)
I looked at your repository and found the issue.
In your App.xaml
you have the following:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Light.xaml" />
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml" />
<ResourceDictionary Source="/DataTemplates/ContentTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
Change this to:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml" />
<ResourceDictionary Source="/DataTemplates/ContentTemplates.xaml" />
</ResourceDictionary.MergedDictionaries>
... and you're done.
Explanation
The way the color schemes work is that they both define colors and brushes with identical x:Key
values. Each style e.g. for the menu items references the colors using those keys. When you switch the color scheme, the colors of the old scheme are removed and the colors of the new scheme are added instead. You should always include only one color scheme file. If you include both, the latter overwrites the former.
In your app this is not visible at first because you call ChangeTheme()
on startup which calls ResourceLocator.SetColorScheme()
. If you look at this method you can see that it searches for the first occurence of one of those color scheme files in you App.Resources
in order to replace it with the other one. But because you included both files at the same time one remains in the resources and overrides the other.
from adonis-ui.
Ah, I get it. That fixed it !
Thank you for your great explanation. :)
from adonis-ui.
Related Issues (20)
- Ribbon control
- RippleHost causing MemoryLeaks HOT 1
- About the select page
- Change accent color at runtime
- center window don't work HOT 1
- MessageBox result closes application HOT 3
- Remove red border around button content when using data validation HOT 4
- AdonisWindow // Hide all buttons property
- Text wrapping for watermark
- AdonisWindow not getting garbage collected HOT 2
- Adonis UI alternative for Avalonia? HOT 1
- Questions HOT 2
- Extend style of control styled with Classic Theme? (.NET 7) HOT 1
- Setting ResizeMode "CanResizeWithGrip" on the window removes Adonis title bar
- Resource not found; ResourceKey='TargetType=AdonisUI.Brushes ID=Layer0BorderBrush'
- visual studio 2022 xaml designer not showing adonisControls:AdonisWindow HOT 2
- Cannot add AdonisUI Custom Components from Toolbox or it's not seen xaml code?
- Add Expander control style HOT 1
- [Support request] AdonisUI styling not applying to codebehind-generated control? HOT 1
- Memory leak to AdonisWindow from HandleTitleBarActualHeightChanged
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 adonis-ui.