diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml index bd965f78..47c9b664 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml +++ b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml @@ -3,9 +3,12 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper" mc:Ignorable="d" Width="600" Height="400" + d:DataContext="{d:DesignInstance vms:ByfronDialogViewModel, + IsDesignTimeCreatable=True}" ResizeMode="NoResize" WindowStyle="None" WindowStartupLocation="CenterScreen" diff --git a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml index 46d1ca79..ac42f366 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml +++ b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml @@ -6,9 +6,12 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper" mc:Ignorable="d" Width="420" MinHeight="0" + d:DataContext="{d:DesignInstance vms:FluentDialogViewModel, + IsDesignTimeCreatable=True}" SizeToContent="Height" ResizeMode="NoResize" Background="{ui:ThemeResource ApplicationBackgroundBrush}" diff --git a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml index ad731786..1fc8b0b8 100644 --- a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml +++ b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml @@ -8,11 +8,14 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" Title="{x:Static resources:Strings.Menu_Title}" MinWidth="960" Width="960" Height="580" + d:DataContext="{d:DesignInstance vms:MainWindowViewModel, + IsDesignTimeCreatable=True}" Background="{ui:ThemeResource ApplicationBackgroundBrush}" ExtendsContentIntoTitleBar="True" WindowBackdropType="Mica" diff --git a/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml index 4d9a7762..822231cb 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml @@ -7,8 +7,11 @@ xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:AboutViewModel, + IsDesignTimeCreatable=True}" Title="AboutPage" Scrollable="True"> diff --git a/Bloxstrap/UI/Elements/Menu/Pages/AppearancePage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/AppearancePage.xaml index ec89f427..27eb4391 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/AppearancePage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/AppearancePage.xaml @@ -6,8 +6,11 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="520" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:AppearanceViewModel, + IsDesignTimeCreatable=True}" Title="AppearancePage" Scrollable="True"> diff --git a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml index 53c0ae10..674d879c 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml @@ -6,11 +6,12 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Menu.Pages" xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls" - xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels.Menu" xmlns:resources="clr-namespace:Bloxstrap.Resources" - d:DataContext="{d:DesignInstance Type=models:BehaviourViewModel}" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:BehaviourViewModel, + IsDesignTimeCreatable=True}" Title="BehaviourPage" Scrollable="True"> diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml index ca359435..cb8cc5a6 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml @@ -7,8 +7,11 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:resources="clr-namespace:Bloxstrap.Resources" xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="1000" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:FastFlagsViewModel, + IsDesignTimeCreatable=True}" Title="FastFlagsPage" Scrollable="True" Loaded="Page_Loaded"> diff --git a/Bloxstrap/UI/Elements/Menu/Pages/InstallationPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/InstallationPage.xaml index d92fafd3..a60ed66b 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/InstallationPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/InstallationPage.xaml @@ -6,11 +6,12 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Menu.Pages" xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels" - xmlns:viewmodels="clr-namespace:Bloxstrap.UI.ViewModels.Menu" xmlns:resources="clr-namespace:Bloxstrap.Resources" - d:DataContext="{d:DesignInstance Type=viewmodels:InstallationViewModel}" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:InstallationViewModel, + IsDesignTimeCreatable=True}" Title="InstallationPage"> diff --git a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml index 8eb76658..6efe240c 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml @@ -8,8 +8,11 @@ xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels" xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls" xmlns:resources="clr-namespace:Bloxstrap.Resources" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:IntegrationsViewModel, + IsDesignTimeCreatable=True}" Title="IntegrationsPage" Scrollable="True"> diff --git a/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml index 1236e37c..9d6245c4 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml @@ -7,8 +7,11 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:resources="clr-namespace:Bloxstrap.Resources" xmlns:controls="clr-namespace:Bloxstrap.UI.Elements.Controls" + xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Menu" mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="800" + d:DataContext="{d:DesignInstance vms:ModsViewModel, + IsDesignTimeCreatable=True}" Title="ModsPage" Scrollable="True"> diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs index 27e21da8..6cd74e29 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs @@ -23,10 +23,8 @@ public class BootstrapperDialogViewModel : NotifyPropertyChangedViewModel public Visibility CancelButtonVisibility => CancelEnabled ? Visibility.Visible : Visibility.Collapsed; [Obsolete("Do not use this! This is for the designer only.", true)] - public BootstrapperDialogViewModel() - { - _dialog = null!; - } + public BootstrapperDialogViewModel() : this(null!) + { } public BootstrapperDialogViewModel(IBootstrapperDialog dialog) { diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs index f652499c..f9b2a376 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs @@ -7,7 +7,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper public class ByfronDialogViewModel : BootstrapperDialogViewModel { // Using dark theme for default values. - public ImageSource ByfronLogoLocation { get; set; } = new BitmapImage(new Uri("pack://application:,,,/Resources/BootstrapperStyles/ByfronDialog/ByfronLogoDark.jpg")); + public ImageSource ByfronLogoLocation { get; set; } = new BitmapImage(new Uri("pack://application:,,,/Bloxstrap;component/Resources/BootstrapperStyles/ByfronDialog/ByfronLogoDark.jpg")); public Thickness DialogBorder { get; set; } = new Thickness(0); public Brush Background { get; set; } = Brushes.Black; public Brush Foreground { get; set; } = new SolidColorBrush(Color.FromRgb(239, 239, 239)); @@ -18,6 +18,10 @@ public class ByfronDialogViewModel : BootstrapperDialogViewModel public string VersionText { get; init; } + [Obsolete("Do not use this! This is for the designer only.", true)] + public ByfronDialogViewModel() : this(null!, "0.611.0.6110432") + { } + public ByfronDialogViewModel(IBootstrapperDialog dialog, string version) : base(dialog) { VersionText = version; diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/FluentDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/FluentDialogViewModel.cs index fd1a4ae8..d68077e2 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/FluentDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/FluentDialogViewModel.cs @@ -8,6 +8,10 @@ public class FluentDialogViewModel : BootstrapperDialogViewModel { public double FooterOpacity => Environment.OSVersion.Version.Build >= 22000 ? 0.4 : 1; + [Obsolete("Do not use this! This is for the designer only.", true)] + public FluentDialogViewModel() : this(null!) + { } + public FluentDialogViewModel(IBootstrapperDialog dialog) : base(dialog) { } diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs index 92907148..592e1e4b 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs @@ -14,7 +14,7 @@ public class ProgressFluentDialogViewModel : BootstrapperDialogViewModel public SolidColorBrush BackgroundColourBrush { get; set; } = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)); [Obsolete("Do not use this! This is for the designer only.", true)] - public ProgressFluentDialogViewModel() : base() + public ProgressFluentDialogViewModel() : this(null!, false) { } public ProgressFluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog) diff --git a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs index 2d8c94c3..cd66e862 100644 --- a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs @@ -45,6 +45,10 @@ private void BrowseCustomIconLocation() OnPropertyChanged(nameof(CustomIconLocation)); } + [Obsolete("Do not use this! This is for the designer only.", true)] + public AppearanceViewModel() : this(null!) + { } + public AppearanceViewModel(Page page) { _page = page; diff --git a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs index c5965192..fc02a9dc 100644 --- a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs @@ -15,6 +15,10 @@ public class FastFlagsViewModel : NotifyPropertyChangedViewModel { private readonly Page _page; + [Obsolete("Do not use this! This is for the designer only.", true)] + public FastFlagsViewModel() : this(null!) + { } + public FastFlagsViewModel(Page page) { _page = page; diff --git a/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs index c51ae9ae..d98bc570 100644 --- a/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs @@ -22,6 +22,10 @@ public class MainWindowViewModel : NotifyPropertyChangedViewModel public string ConfirmButtonText => App.IsFirstRun ? Resources.Strings.Menu_Install : Resources.Strings.Menu_Save; public bool ConfirmButtonEnabled { get; set; } = true; + [Obsolete("Do not use this! This is for the designer only.", true)] + public MainWindowViewModel() : this(null!) + { } + public MainWindowViewModel(Window window) { _window = window;