Synched Accent transparent at startup
See original GitHub issueI’m using both Fluent.Ribbon
and MahApps
in a small project. In appsettings.json
i have a set of settings to determine both if i will sync the theme with the OS or use a specific theme.
This is what my MetroWindow_Loaded
looks like:
private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
{
TitleBar = this.FindChild<RibbonTitleBar>("RibbonTitleBar");
TitleBar.InvalidateArrange();
TitleBar.UpdateLayout();
ThemeManager.Current.ChangeTheme(this, ThemeManager.Current.DetectTheme(Application.Current));
if (_config.CurrentValue.Theme.SyncWithWindows)
{
ThemeManager.Current.ThemeSyncMode = ThemeSyncMode.SyncAll;
ThemeManager.Current.SyncTheme();
}
else
{
ThemeManager.Current.ChangeTheme(this, (_config.CurrentValue.Theme.DarkAppMode ? "Dark." : "Light.") +
_config.CurrentValue.Theme.Accent + (_config.CurrentValue.Theme.IsColorful ? ".Colorful" : ""));
}
ThemeManager.Current.ThemeChanged += SyncThemes;
}
When i have in my settings to sync with windows, any area that should have the accent is transparent (including the File
button and the sidebar in the backstage
.
When i Have in my settings to use a specific theme, it works fine
I have Managed to get it to work - but only until my next reboot of the machine - by going into Windows Customization Settings -> Color
and making any change there, and then reverting it back to what it was before (like changing the color or from light to dark and back). For some reason after I do that, everytime I run the program it gets the accent from Windows with no issue, until I restart the PC again.
Environment
- Fluent.Ribbon v8.0.3
- MahApps 2.4.7
- Windows 10 21H1
- .NET Core 3.0 & above (including 6.0 preview)
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (8 by maintainers)
Top GitHub Comments
@batzen I’ll do this later today.
Fixed by updating ControlzEx