You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// comment following line and everything works, but having that line in application constructor make themes not working properly
var makebug = ApplicationThemeManager.GetAppTheme();
To Reproduce
to reproduce this just make a new wpf application (use .net-9 and wpf-ui 4.0.0-rc.3) and fill out following files like this:
using System.Configuration;
using System.Data;
using System.Windows;
using Wpf.Ui.Appearance;
namespace BugReportProject
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
public App ()
{
// comment following line and everything works, but having that line in application constructor make themes not working properly
var makebug = ApplicationThemeManager.GetAppTheme();
}
}
}
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wpf.Ui.Appearance;
using Wpf.Ui.Controls;
namespace BugReportProject
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : FluentWindow
{
public MainWindow()
{
InitializeComponent();
changeBtn.Click += (s, e) =>
{
if (ApplicationThemeManager.GetAppTheme() == ApplicationTheme.Dark) ApplicationThemeManager.Apply(ApplicationTheme.Light);
else ApplicationThemeManager.Apply(ApplicationTheme.Dark);
};
}
}
}
Expected behavior
by clicking on changeBtn theme should switch between dark and light, but everything stucks if following line exists in App class constructor: var makebug = ApplicationThemeManager.GetAppTheme();
Screenshots
No response
OS version
Microsoft windows
version 21H2 (OS Build 22000.3260)
.NET version
net9.0-windows
WPF-UI NuGet version
wpf-ui 4.0.0-rc.3
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
// comment following line and everything works, but having that line in application constructor make themes not working properly
var makebug = ApplicationThemeManager.GetAppTheme();
To Reproduce
to reproduce this just make a new wpf application (use .net-9 and wpf-ui 4.0.0-rc.3) and fill out following files like this:
App.xaml:
App.xaml.cs:
MainWindow.xaml:
MainWindow.xaml.cs:
Expected behavior
by clicking on
changeBtn
theme should switch between dark and light, but everything stucks if following line exists in App class constructor:var makebug = ApplicationThemeManager.GetAppTheme();
Screenshots
No response
OS version
Microsoft windows
version 21H2 (OS Build 22000.3260)
.NET version
net9.0-windows
WPF-UI NuGet version
wpf-ui 4.0.0-rc.3
Additional context
No response
The text was updated successfully, but these errors were encountered: