Skip to content

Commit c48eda4

Browse files
lukeblevinsyaira2
andauthored
Remove/Reduce Unnecessary Resources in App.xaml (#1350)
Co-authored-by: Yair Aichenbaum <[email protected]>
1 parent 027b87d commit c48eda4

File tree

8 files changed

+377
-357
lines changed

8 files changed

+377
-357
lines changed

Files/App.xaml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,26 @@
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
55
<Application.Resources>
66
<ResourceDictionary>
7-
<FontFamily x:Key="CustomGlyph">/Assets/Custom Glyphs/Custom-Glyphs.ttf#Custom-Glyphs</FontFamily>
8-
<FontFamily x:Key="RecycleBinIcons">/Assets/Custom Glyphs/recyclebin-fabric-glyph.ttf#Fabric MDL2 Assets</FontFamily>
97
<ResourceDictionary.MergedDictionaries>
108
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
11-
<ResourceDictionary Source="/ResourceDictionaries/ToolbarButtonStyle.xaml" />
129
<ResourceDictionary>
1310
<ResourceDictionary.ThemeDictionaries>
1411
<ResourceDictionary x:Key="Light">
15-
<SolidColorBrush x:Key="UnmodifiedSystemPageColor" Color="White" />
16-
<SolidColorBrush x:Key="YourHomeCardBackgroundColor" Color="#f3f1ef" />
17-
<SolidColorBrush x:Key="YourHomeCardBorderColor" Color="#f3f1ef" />
18-
<SolidColorBrush x:Key="TabViewBackground" Color="White" />
19-
<SolidColorBrush x:Key="CustomInputFieldBorderBrush" Color="DarkGray" />
20-
<SolidColorBrush x:Key="RibbonBackgroundColor" Color="White" />
21-
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="RibbonBackgroundColor" />
2212
<SolidColorBrush x:Key="SystemControlPageBackgroundMediumAltMediumBrush" Color="#99000000" />
2313
</ResourceDictionary>
2414
<ResourceDictionary x:Key="Dark">
2515
<SolidColorBrush x:Key="ApplicationPageBackgroundThemeBrush" Color="#191919" />
26-
<SolidColorBrush x:Key="UnmodifiedSystemPageColor" Color="Black" />
27-
<StaticResource x:Key="YourHomeCardBackgroundColor" ResourceKey="TextControlBackground" />
28-
<SolidColorBrush x:Key="YourHomeCardBorderColor" Color="White" />
29-
<SolidColorBrush x:Key="TabViewBackground" Color="Black" />
30-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="#191919" />
31-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="#80191919" />
32-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="#191919" />
33-
<SolidColorBrush x:Key="CustomInputFieldBorderBrush" Color="#FF363636" />
34-
<SolidColorBrush x:Key="RibbonBackgroundColor" Color="#131313" />
35-
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="RibbonBackgroundColor" />
3616
<SolidColorBrush x:Key="SystemControlPageBackgroundMediumAltMediumBrush" Color="#99000000" />
3717
</ResourceDictionary>
3818
<ResourceDictionary x:Key="HighContrast">
3919
<SolidColorBrush x:Key="ApplicationPageBackgroundThemeBrush" Color="#191919" />
40-
<SolidColorBrush x:Key="UnmodifiedSystemPageColor" Color="Black" />
41-
<StaticResource x:Key="YourHomeCardBackgroundColor" ResourceKey="TextControlBackground" />
42-
<SolidColorBrush x:Key="YourHomeCardBorderColor" Color="White" />
43-
<SolidColorBrush x:Key="TabViewBackground" Color="Black" />
44-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="#191919" />
45-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="#80191919" />
46-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="#191919" />
47-
<SolidColorBrush x:Key="CustomInputFieldBorderBrush" Color="#FF363636" />
48-
<SolidColorBrush x:Key="RibbonBackgroundColor" Color="#131313" />
49-
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="RibbonBackgroundColor" />
5020
<SolidColorBrush x:Key="SystemControlPageBackgroundMediumAltMediumBrush" Color="#99000000" />
5121
</ResourceDictionary>
5222
</ResourceDictionary.ThemeDictionaries>
5323
</ResourceDictionary>
5424
</ResourceDictionary.MergedDictionaries>
25+
<FontFamily x:Key="CustomGlyph">/Assets/Custom Glyphs/Custom-Glyphs.ttf#Custom-Glyphs</FontFamily>
26+
<FontFamily x:Key="RecycleBinIcons">/Assets/Custom Glyphs/recyclebin-fabric-glyph.ttf#Fabric MDL2 Assets</FontFamily>
5527
</ResourceDictionary>
5628
</Application.Resources>
5729
</Application>

Files/App.xaml.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,6 @@ public App()
7070

7171
RegisterUncaughtExceptionLogger();
7272

73-
ConsentDialogDisplay = new Dialogs.ConsentDialog();
74-
PropertiesDialogDisplay = new Dialogs.PropertiesDialog();
75-
LayoutDialogDisplay = new Dialogs.LayoutDialog();
76-
AddItemDialogDisplay = new Dialogs.AddItemDialog();
77-
ExceptionDialogDisplay = new Dialogs.ExceptionDialog();
78-
7973
Clipboard.ContentChanged += Clipboard_ContentChanged;
8074
Clipboard_ContentChanged(null, null);
8175

@@ -414,7 +408,7 @@ private void OnSuspending(object sender, SuspendingEventArgs e)
414408
Connection.Dispose();
415409
Connection = null;
416410
}
417-
AppSettings.Dispose();
411+
AppSettings?.Dispose();
418412
deferral.Complete();
419413
}
420414
}

0 commit comments

Comments
 (0)