diff --git a/CHANGELIST.md b/CHANGELIST.md index 891ebb6b..8cea73e6 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -37,6 +37,7 @@ - Get UI building with Framework 4.0 - Temporarily remove .NET Framework 4.0 from UI - Get UI building with Framework 4.0 again +- Support .NET Framework 3.5 in UI ### 3.0.0 (2023-11-14) diff --git a/MPF.Core/UI/ViewModels/OptionsViewModel.cs b/MPF.Core/UI/ViewModels/OptionsViewModel.cs index 6e4f71ec..6b1ae5d3 100644 --- a/MPF.Core/UI/ViewModels/OptionsViewModel.cs +++ b/MPF.Core/UI/ViewModels/OptionsViewModel.cs @@ -11,7 +11,7 @@ namespace MPF.Core.UI.ViewModels /// /// Constructor /// - public class OptionsViewModel(Options baseOptions) : INotifyPropertyChanged + public class OptionsViewModel : INotifyPropertyChanged { #region Fields @@ -32,7 +32,7 @@ namespace MPF.Core.UI.ViewModels /// /// Current set of options /// - public Options Options { get; } = new Options(baseOptions); + public Options Options { get; } /// /// Flag for if settings were saved or not @@ -58,6 +58,22 @@ namespace MPF.Core.UI.ViewModels #endregion + /// + /// Constructor for pure view model + /// + public OptionsViewModel() + { + Options = new Options(); + } + + /// + /// Constructor for in-code + /// + public OptionsViewModel(Options baseOptions) + { + Options = new Options(baseOptions); + } + #region Population /// diff --git a/MPF.UI.Core/Windows/OptionsWindow.xaml b/MPF.UI.Core/Windows/OptionsWindow.xaml index 96a94241..4ece2e01 100644 --- a/MPF.UI.Core/Windows/OptionsWindow.xaml +++ b/MPF.UI.Core/Windows/OptionsWindow.xaml @@ -5,11 +5,15 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:core="clr-namespace:MPF.UI.Core" xmlns:coreWindows="clr-namespace:MPF.UI.Core.Windows" + xmlns:viewModels="clr-namespace:MPF.Core.UI.ViewModels;assembly=MPF.Core" mc:Ignorable="d" Width="515.132" WindowStyle="None" WindowStartupLocation="CenterOwner" ResizeMode="CanMinimize" SizeToContent="Height" BorderBrush="DarkGray" BorderThickness="2"> + + + @@ -27,14 +31,8 @@ -