diff --git a/CHANGELIST.md b/CHANGELIST.md
index 554f85aa..891ebb6b 100644
--- a/CHANGELIST.md
+++ b/CHANGELIST.md
@@ -36,6 +36,7 @@
- Support .NET Framework 3.5 in UI.Core
- Get UI building with Framework 4.0
- Temporarily remove .NET Framework 4.0 from UI
+- Get UI building with Framework 4.0 again
### 3.0.0 (2023-11-14)
diff --git a/MPF.Core/Utilities/Tools.cs b/MPF.Core/Utilities/Tools.cs
index 79d72f36..033a7d6b 100644
--- a/MPF.Core/Utilities/Tools.cs
+++ b/MPF.Core/Utilities/Tools.cs
@@ -190,7 +190,7 @@ namespace MPF.Core.Utilities
// Get the latest tag from GitHub
var (tag, url) = GetRemoteVersionAndUrl();
- bool different = version != tag;
+ bool different = version != tag && tag != null;
string message = $"Local version: {version}"
+ $"{Environment.NewLine}Remote version: {tag}"
diff --git a/MPF.UI.Core/Windows/MainWindow.xaml.cs b/MPF.UI.Core/Windows/MainWindow.xaml.cs
index 08cccd80..f46ff606 100644
--- a/MPF.UI.Core/Windows/MainWindow.xaml.cs
+++ b/MPF.UI.Core/Windows/MainWindow.xaml.cs
@@ -150,7 +150,7 @@ namespace MPF.UI.Core.Windows
(bool different, string message, var url) = MainViewModel.CheckForUpdates();
// If we have a new version, put it in the clipboard
- if (different)
+ if (different && !string.IsNullOrEmpty(url))
Clipboard.SetText(url);
if (showIfSame || different)
diff --git a/MPF/App.xaml b/MPF/App.xaml
index 1eb131b4..2ebb32e2 100644
--- a/MPF/App.xaml
+++ b/MPF/App.xaml
@@ -219,7 +219,7 @@
-
+
@@ -264,7 +264,7 @@
-
+
diff --git a/MPF/App.xaml.cs b/MPF/App.xaml.cs
index 7799d1aa..cd2ccbe2 100644
--- a/MPF/App.xaml.cs
+++ b/MPF/App.xaml.cs
@@ -1,5 +1,4 @@
-using System.Linq;
-using System.Windows;
+using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
@@ -23,11 +22,6 @@ namespace MPF
AddDropShadowChrome("ComboBoxTemplate");
AddDropShadowChrome("ComboBoxEditableTemplate");
-
-#if FALSE && (NET452_OR_GREATER || NETCOREAPP)
- AddVirtualizingCondition("ComboBoxTemplate");
- AddVirtualizingCondition("ComboBoxEditableTemplate");
-#endif
}
private void AddDropShadowChrome(string resourceName)
@@ -189,40 +183,6 @@ namespace MPF
triggers.Add(hasItems);
triggers.Add(canContentScroll);
}
-
-#if NET452_OR_GREATER || NETCOREAPP
- private void AddVirtualizingCondition(string resourceName)
- {
- // Get the template resource
- if (Resources[resourceName] is not ControlTemplate controlTemplate)
- return;
-
- // Get the triggers
- var triggers = controlTemplate.Triggers;
- if (triggers == null)
- return;
-
- // Get the multitrigger
- if (triggers.FirstOrDefault(t => t is MultiTrigger) is not MultiTrigger multiTrigger)
- return;
-
- // Set the virtualizing condition
- var isVirtualizing = new Condition
- {
- Property = VirtualizingPanel.IsVirtualizingWhenGroupingProperty,
- Value = "false",
- };
-
- var currentConditions = multiTrigger.Conditions.ToList();
- multiTrigger.Conditions.Clear();
- foreach (var condition in currentConditions)
- {
- multiTrigger.Conditions.Add(condition);
- }
- multiTrigger.Conditions.Add(isVirtualizing);
- }
-#endif
-
#endif
}
}
diff --git a/MPF/MPF.csproj b/MPF/MPF.csproj
index ebf9fe7b..d5006563 100644
--- a/MPF/MPF.csproj
+++ b/MPF/MPF.csproj
@@ -2,7 +2,7 @@
- net452;net462;net472;net48;netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows
+ net40;net452;net462;net472;net48;netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows
win-x86;win-x64
WinExe
Images\Icon.ico