瀏覽代碼

Don't use reflection to get title

Daniel Chalmers 3 年之前
父節點
當前提交
d40dc93cbb
共有 2 個文件被更改,包括 1 次插入4 次删除
  1. 0 3
      DesktopClock/App.xaml.cs
  2. 1 1
      DesktopClock/MainWindow.xaml

+ 0 - 3
DesktopClock/App.xaml.cs

@@ -10,9 +10,6 @@ namespace DesktopClock;
 /// </summary>
 public partial class App : Application
 {
-    public static Assembly Assembly { get; } = Assembly.GetExecutingAssembly();
-    public static string Title { get; } = Assembly.GetCustomAttribute<AssemblyTitleAttribute>().Title;
-
     // https://www.materialui.co/colors
     public static IReadOnlyList<Theme> Themes { get; } = new Theme[]
     {

+ 1 - 1
DesktopClock/MainWindow.xaml

@@ -7,7 +7,7 @@
         xmlns:p="clr-namespace:DesktopClock.Properties"
         xmlns:wp="clr-namespace:WpfWindowPlacement;assembly=WpfWindowPlacement"
         mc:Ignorable="d"
-        Title="{x:Static local:App.Title}"
+        Title="DesktopClock"
         AllowsTransparency="True"
         Background="Transparent"
         FontFamily="{Binding FontFamily, Source={x:Static p:Settings.Default}, Mode=OneWay}"