Skip to content

Commit

Permalink
WIP on MahApps shell fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Dec 12, 2024
1 parent 8569e47 commit 6ec9728
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions src/Orchestra.Examples.MahApps/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,20 @@
/// </summary>
public partial class App : Application
{
#region Constants
private static readonly ILog Log = LogManager.GetCurrentClassLogger();
#endregion

#region Fields
private readonly DateTime _start;
private readonly Stopwatch _stopwatch;
private DateTime _end;
#endregion

#region Constructors
public App()
{
_stopwatch = new Stopwatch();
_stopwatch.Start();
_start = DateTime.Now;
}
#endregion

#region Methods
protected override void OnStartup(StartupEventArgs e)
protected override async void OnStartup(StartupEventArgs e)
{
#if DEBUG
LogManager.AddDebugListener(true);
Expand All @@ -51,14 +44,13 @@ protected override void OnStartup(StartupEventArgs e)

var serviceLocator = ServiceLocator.Default;
var shellService = serviceLocator.ResolveType<IShellService>();
shellService.CreateAsync<ShellWindow>();
await shellService.CreateAsync<ShellWindow>();

_end = DateTime.Now;
_stopwatch.Stop();

Log.Info("Elapsed startup stopwatch time: {0}", _stopwatch.Elapsed);
Log.Info("Elapsed startup time: {0}", _end - _start);
}
#endregion
}
}
2 changes: 1 addition & 1 deletion src/Orchestra.Examples.MahApps/Themes/MaterialDesign.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"/>

<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/Generic.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Defaults.xaml"/>

<materialDesignMahApps:MahAppsCustomColorTheme BaseTheme="Dark" PrimaryColor="Orange" SecondaryColor="Gray" />
Expand Down

0 comments on commit 6ec9728

Please sign in to comment.