Finalize/rearrange new progress dialog naming

This commit is contained in:
pizzaboxer 2024-06-11 20:28:43 +01:00
parent a3033474b8
commit a194bf937e
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
13 changed files with 242 additions and 229 deletions

View File

@ -6,9 +6,9 @@
LegacyDialog2008, LegacyDialog2008,
LegacyDialog2011, LegacyDialog2011,
ProgressDialog, ProgressDialog,
FluentDialog, ClassicFluentDialog,
ByfronDialog, ByfronDialog,
ProgressFluentDialog, FluentDialog,
ProgressFluentAeroDialog FluentAeroDialog
} }
} }

View File

@ -7,9 +7,10 @@
public static IReadOnlyCollection<BootstrapperStyle> Selections => new BootstrapperStyle[] public static IReadOnlyCollection<BootstrapperStyle> Selections => new BootstrapperStyle[]
{ {
BootstrapperStyle.FluentDialog, BootstrapperStyle.FluentDialog,
BootstrapperStyle.ProgressFluentDialog, BootstrapperStyle.FluentAeroDialog,
BootstrapperStyle.ProgressFluentAeroDialog, BootstrapperStyle.ClassicFluentDialog,
BootstrapperStyle.ByfronDialog, BootstrapperStyle.ByfronDialog,
BootstrapperStyle.ProgressDialog,
BootstrapperStyle.LegacyDialog2011, BootstrapperStyle.LegacyDialog2011,
BootstrapperStyle.LegacyDialog2008, BootstrapperStyle.LegacyDialog2008,
BootstrapperStyle.VistaDialog BootstrapperStyle.VistaDialog

View File

@ -803,6 +803,33 @@ namespace Bloxstrap.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Fluent (Classic).
/// </summary>
public static string Enums_BootstrapperStyle_ClassicFluentDialog {
get {
return ResourceManager.GetString("Enums.BootstrapperStyle.ClassicFluentDialog", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Fluent (Aero).
/// </summary>
public static string Enums_BootstrapperStyle_FluentAeroDialog {
get {
return ResourceManager.GetString("Enums.BootstrapperStyle.FluentAeroDialog", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Fluent (Classic).
/// </summary>
public static string Enums_BootstrapperStyle_FluentClassicDialog {
get {
return ResourceManager.GetString("Enums.BootstrapperStyle.FluentClassicDialog", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Fluent. /// Looks up a localized string similar to Fluent.
/// </summary> /// </summary>
@ -839,24 +866,6 @@ namespace Bloxstrap.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Fluent Progress (Aero).
/// </summary>
public static string Enums_BootstrapperStyle_ProgressFluentAeroDialog {
get {
return ResourceManager.GetString("Enums.BootstrapperStyle.ProgressFluentAeroDialog", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Fluent Progress.
/// </summary>
public static string Enums_BootstrapperStyle_ProgressFluentDialog {
get {
return ResourceManager.GetString("Enums.BootstrapperStyle.ProgressFluentDialog", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Vista (2008 - 2011). /// Looks up a localized string similar to Vista (2008 - 2011).
/// </summary> /// </summary>

View File

@ -370,6 +370,15 @@ Your ReShade configuration files will still be saved, and you can locate them by
<data name="Enums.BootstrapperStyle.ByfronDialog" xml:space="preserve"> <data name="Enums.BootstrapperStyle.ByfronDialog" xml:space="preserve">
<value>Fake Byfron (2023)</value> <value>Fake Byfron (2023)</value>
</data> </data>
<data name="Enums.BootstrapperStyle.ClassicFluentDialog" xml:space="preserve">
<value>Fluent (Classic)</value>
</data>
<data name="Enums.BootstrapperStyle.FluentAeroDialog" xml:space="preserve">
<value>Fluent (Aero)</value>
</data>
<data name="Enums.BootstrapperStyle.FluentClassicDialog" xml:space="preserve">
<value>Fluent (Classic)</value>
</data>
<data name="Enums.BootstrapperStyle.FluentDialog" xml:space="preserve"> <data name="Enums.BootstrapperStyle.FluentDialog" xml:space="preserve">
<value>Fluent</value> <value>Fluent</value>
</data> </data>
@ -382,12 +391,6 @@ Your ReShade configuration files will still be saved, and you can locate them by
<data name="Enums.BootstrapperStyle.ProgressDialog" xml:space="preserve"> <data name="Enums.BootstrapperStyle.ProgressDialog" xml:space="preserve">
<value>Progress (~2014)</value> <value>Progress (~2014)</value>
</data> </data>
<data name="Enums.BootstrapperStyle.ProgressFluentAeroDialog" xml:space="preserve">
<value>Fluent Progress (Aero)</value>
</data>
<data name="Enums.BootstrapperStyle.ProgressFluentDialog" xml:space="preserve">
<value>Fluent Progress</value>
</data>
<data name="Enums.BootstrapperStyle.VistaDialog" xml:space="preserve"> <data name="Enums.BootstrapperStyle.VistaDialog" xml:space="preserve">
<value>Vista (2008 - 2011)</value> <value>Vista (2008 - 2011)</value>
</data> </data>

View File

@ -0,0 +1,47 @@
<base:WpfUiWindow x:Class="Bloxstrap.UI.Elements.Bootstrapper.ClassicFluentDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
xmlns:resources="clr-namespace:Bloxstrap.Resources"
mc:Ignorable="d"
Width="420"
MinHeight="0"
SizeToContent="Height"
ResizeMode="NoResize"
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
ExtendsContentIntoTitleBar="True"
WindowBackdropType="Mica"
WindowStartupLocation="CenterScreen"
Closing="UiWindow_Closing">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ui:TitleBar Grid.Row="0" x:Name="RootTitleBar" Padding="8" Title="{Binding Title, Mode=OneTime}" ShowMinimize="False" ShowMaximize="False" CanMaximize="False" ShowClose="False" />
<Grid Grid.Row="1" Margin="16,8,16,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Margin="0,12,0,0" Width="48" Height="48" VerticalAlignment="Top" Source="{Binding Icon, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" />
<StackPanel Grid.Column="1">
<TextBlock Margin="16,8,0,0" FontSize="20" Text="{Binding Message, Mode=OneWay}" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<ProgressBar Margin="16,16,0,16" IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}" Maximum="{Binding ProgressMaximum, Mode=OneWay}" Value="{Binding ProgressValue, Mode=OneWay}" />
</StackPanel>
</Grid>
<Border Grid.Row="2" Padding="15">
<Border.Background>
<SolidColorBrush Color="{ui:ThemeResource SolidBackgroundFillColorSecondary}" Opacity="{Binding FooterOpacity, Mode=OneTime}" />
</Border.Background>
<Button Margin="0" Content="{x:Static resources:Strings.Common_Cancel}" Width="120" HorizontalAlignment="Right" IsEnabled="{Binding CancelEnabled, Mode=OneWay}" Command="{Binding CancelInstallCommand}" />
</Border>
</Grid>
</base:WpfUiWindow>

View File

@ -1,31 +1,21 @@
using Bloxstrap.UI.Elements.Bootstrapper.Base; using System.ComponentModel;
using Bloxstrap.UI.ViewModels.Bootstrapper;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media; using Wpf.Ui.Appearance;
using System.Windows.Media.Imaging; using Wpf.Ui.Mvvm.Contracts;
using System.Windows.Shapes; using Wpf.Ui.Mvvm.Services;
using System.Windows.Threading;
using Bloxstrap.UI.ViewModels.Bootstrapper;
using Bloxstrap.UI.Elements.Bootstrapper.Base;
namespace Bloxstrap.UI.Elements.Bootstrapper namespace Bloxstrap.UI.Elements.Bootstrapper
{ {
/// <summary> /// <summary>
/// Interaction logic for ProgressFluentDialog.xaml /// Interaction logic for ClassicFluentDialog.xaml
/// </summary> /// </summary>
public partial class ProgressFluentDialog : IBootstrapperDialog public partial class ClassicFluentDialog : IBootstrapperDialog
{ {
private readonly ProgressFluentDialogViewModel _viewModel; private readonly BootstrapperDialogViewModel _viewModel;
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; } public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
@ -85,12 +75,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
} }
#endregion #endregion
public ProgressFluentDialog(bool aero) public ClassicFluentDialog()
{ {
InitializeComponent(); InitializeComponent();
ApplyTheme(); ApplyTheme();
_viewModel = new ProgressFluentDialogViewModel(this, aero); _viewModel = new ClassicFluentDialogViewModel(this);
DataContext = _viewModel; DataContext = _viewModel;
Title = App.Settings.Prop.BootstrapperTitle; Title = App.Settings.Prop.BootstrapperTitle;
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();

View File

@ -1,47 +1,80 @@
<base:WpfUiWindow x:Class="Bloxstrap.UI.Elements.Bootstrapper.FluentDialog" <base:WpfUiWindow
x:Class="Bloxstrap.UI.Elements.Bootstrapper.FluentDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
xmlns:resources="clr-namespace:Bloxstrap.Resources" xmlns:resources="clr-namespace:Bloxstrap.Resources"
mc:Ignorable="d" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
Width="420" xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper"
Width="500"
Height="280"
MinHeight="0" MinHeight="0"
SizeToContent="Height" d:DataContext="{d:DesignInstance vms:FluentDialogViewModel,
ResizeMode="NoResize" IsDesignTimeCreatable=True}"
AllowsTransparency="True"
Background="{ui:ThemeResource ApplicationBackgroundBrush}" Background="{ui:ThemeResource ApplicationBackgroundBrush}"
Closing="UiWindow_Closing"
ExtendsContentIntoTitleBar="True" ExtendsContentIntoTitleBar="True"
WindowBackdropType="Mica" ResizeMode="NoResize"
WindowBackdropType="{Binding Path=WindowBackdropType, Mode=OneTime}"
WindowStartupLocation="CenterScreen" WindowStartupLocation="CenterScreen"
Closing="UiWindow_Closing"> WindowStyle="None"
<Grid> mc:Ignorable="d">
<!-- Background is for Aero theme only -->
<Grid Background="{Binding Path=BackgroundColourBrush, Mode=OneTime}">
<!-- Allow for drag -->
<ui:TitleBar
VerticalAlignment="Top"
CanMaximize="False"
ShowClose="False"
ShowMaximize="False"
ShowMinimize="False" />
<Grid Margin="32,16">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ui:TitleBar Grid.Row="0" x:Name="RootTitleBar" Padding="8" Title="{Binding Title, Mode=OneTime}" ShowMinimize="False" ShowMaximize="False" CanMaximize="False" ShowClose="False" /> <Image
Grid.Row="0"
Width="80"
Height="80"
Margin="0,30,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
RenderOptions.BitmapScalingMode="HighQuality"
Source="{Binding Icon, Mode=OneWay}" />
<Grid Grid.Row="1" Margin="16,8,16,16"> <TextBlock
<Grid.ColumnDefinitions> Grid.Row="1"
<ColumnDefinition Width="Auto" /> Margin="0,0,0,8"
<ColumnDefinition Width="*" /> HorizontalAlignment="Center"
</Grid.ColumnDefinitions> FontSize="18"
<Image Grid.Column="0" Margin="0,12,0,0" Width="48" Height="48" VerticalAlignment="Top" Source="{Binding Icon, Mode=OneWay}" RenderOptions.BitmapScalingMode="HighQuality" /> Foreground="{DynamicResource TextFillColorPrimaryBrush}"
<StackPanel Grid.Column="1"> Text="{Binding Message, Mode=OneWay}" />
<TextBlock Margin="16,8,0,0" FontSize="20" Text="{Binding Message, Mode=OneWay}" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
<ProgressBar Margin="16,16,0,16" IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}" Maximum="{Binding ProgressMaximum, Mode=OneWay}" Value="{Binding ProgressValue, Mode=OneWay}" /> <ProgressBar
</StackPanel> Grid.Row="2"
Margin="0,0,0,16"
IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}"
Maximum="{Binding ProgressMaximum, Mode=OneWay}"
Value="{Binding ProgressValue, Mode=OneWay}" />
<Button
Grid.Row="3"
Width="120"
Padding="4"
HorizontalAlignment="Center"
Command="{Binding CancelInstallCommand}"
Content="{x:Static resources:Strings.Common_Cancel}"
FontSize="14"
IsEnabled="{Binding CancelEnabled, Mode=OneWay}" />
</Grid> </Grid>
<Border Grid.Row="2" Padding="15">
<Border.Background>
<SolidColorBrush Color="{ui:ThemeResource SolidBackgroundFillColorSecondary}" Opacity="{Binding FooterOpacity, Mode=OneTime}" />
</Border.Background>
<Button Margin="0" Content="{x:Static resources:Strings.Common_Cancel}" Width="120" HorizontalAlignment="Right" IsEnabled="{Binding CancelEnabled, Mode=OneWay}" Command="{Binding CancelInstallCommand}" />
</Border>
</Grid> </Grid>
</base:WpfUiWindow> </base:WpfUiWindow>

View File

@ -1,12 +1,22 @@
using System.ComponentModel; using Bloxstrap.UI.Elements.Bootstrapper.Base;
using System.Windows.Forms;
using Wpf.Ui.Appearance;
using Wpf.Ui.Mvvm.Contracts;
using Wpf.Ui.Mvvm.Services;
using Bloxstrap.UI.ViewModels.Bootstrapper; using Bloxstrap.UI.ViewModels.Bootstrapper;
using Bloxstrap.UI.Elements.Bootstrapper.Base; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
namespace Bloxstrap.UI.Elements.Bootstrapper namespace Bloxstrap.UI.Elements.Bootstrapper
{ {
@ -15,7 +25,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
/// </summary> /// </summary>
public partial class FluentDialog : IBootstrapperDialog public partial class FluentDialog : IBootstrapperDialog
{ {
private readonly BootstrapperDialogViewModel _viewModel; private readonly FluentDialogViewModel _viewModel;
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; } public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
@ -75,12 +85,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
} }
#endregion #endregion
public FluentDialog() public FluentDialog(bool aero)
{ {
InitializeComponent(); InitializeComponent();
ApplyTheme(); ApplyTheme();
_viewModel = new FluentDialogViewModel(this); _viewModel = new FluentDialogViewModel(this, aero);
DataContext = _viewModel; DataContext = _viewModel;
Title = App.Settings.Prop.BootstrapperTitle; Title = App.Settings.Prop.BootstrapperTitle;
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();

View File

@ -1,80 +0,0 @@
<base:WpfUiWindow
x:Class="Bloxstrap.UI.Elements.Bootstrapper.ProgressFluentDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resources="clr-namespace:Bloxstrap.Resources"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper"
Width="500"
Height="280"
MinHeight="0"
d:DataContext="{d:DesignInstance vms:ProgressFluentDialogViewModel,
IsDesignTimeCreatable=True}"
AllowsTransparency="True"
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
Closing="UiWindow_Closing"
ExtendsContentIntoTitleBar="True"
ResizeMode="NoResize"
WindowBackdropType="{Binding Path=WindowBackdropType, Mode=OneTime}"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
<!-- Background is for Aero theme only -->
<Grid Background="{Binding Path=BackgroundColourBrush, Mode=OneTime}">
<!-- Allow for drag -->
<ui:TitleBar
VerticalAlignment="Top"
CanMaximize="False"
ShowClose="False"
ShowMaximize="False"
ShowMinimize="False" />
<Grid Margin="32,16">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image
Grid.Row="0"
Width="80"
Height="80"
Margin="0,30,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
RenderOptions.BitmapScalingMode="HighQuality"
Source="{Binding Icon, Mode=OneWay}" />
<TextBlock
Grid.Row="1"
Margin="0,0,0,8"
HorizontalAlignment="Center"
FontSize="18"
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
Text="{Binding Message, Mode=OneWay}" />
<ProgressBar
Grid.Row="2"
Margin="0,0,0,16"
IsIndeterminate="{Binding ProgressIndeterminate, Mode=OneWay}"
Maximum="{Binding ProgressMaximum, Mode=OneWay}"
Value="{Binding ProgressValue, Mode=OneWay}" />
<Button
Grid.Row="3"
Width="120"
Padding="4"
HorizontalAlignment="Center"
Command="{Binding CancelInstallCommand}"
Content="{x:Static resources:Strings.Common_Cancel}"
FontSize="14"
IsEnabled="{Binding CancelEnabled, Mode=OneWay}" />
</Grid>
</Grid>
</base:WpfUiWindow>

View File

@ -55,11 +55,11 @@ namespace Bloxstrap.UI
BootstrapperStyle.LegacyDialog2008 => new LegacyDialog2008(), BootstrapperStyle.LegacyDialog2008 => new LegacyDialog2008(),
BootstrapperStyle.LegacyDialog2011 => new LegacyDialog2011(), BootstrapperStyle.LegacyDialog2011 => new LegacyDialog2011(),
BootstrapperStyle.ProgressDialog => new ProgressDialog(), BootstrapperStyle.ProgressDialog => new ProgressDialog(),
BootstrapperStyle.FluentDialog => new FluentDialog(), BootstrapperStyle.ClassicFluentDialog => new ClassicFluentDialog(),
BootstrapperStyle.ByfronDialog => new ByfronDialog(), BootstrapperStyle.ByfronDialog => new ByfronDialog(),
BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(false), BootstrapperStyle.FluentDialog => new FluentDialog(false),
BootstrapperStyle.ProgressFluentAeroDialog => new ProgressFluentDialog(true), BootstrapperStyle.FluentAeroDialog => new FluentDialog(true),
_ => new FluentDialog() _ => new FluentDialog(false)
}; };
} }
} }

View File

@ -0,0 +1,15 @@
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Bloxstrap.UI.ViewModels.Bootstrapper
{
public class ClassicFluentDialogViewModel : BootstrapperDialogViewModel
{
public double FooterOpacity => Environment.OSVersion.Version.Build >= 22000 ? 0.4 : 1;
public ClassicFluentDialogViewModel(IBootstrapperDialog dialog) : base(dialog)
{
}
}
}

View File

@ -1,15 +1,32 @@
using System.Windows; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using Wpf.Ui.Appearance;
namespace Bloxstrap.UI.ViewModels.Bootstrapper namespace Bloxstrap.UI.ViewModels.Bootstrapper
{ {
public class FluentDialogViewModel : BootstrapperDialogViewModel public class FluentDialogViewModel : BootstrapperDialogViewModel
{ {
public double FooterOpacity => Environment.OSVersion.Version.Build >= 22000 ? 0.4 : 1; public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
public SolidColorBrush BackgroundColourBrush { get; set; } = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
public FluentDialogViewModel(IBootstrapperDialog dialog) : base(dialog) [Obsolete("Do not use this! This is for the designer only.", true)]
public FluentDialogViewModel() : base()
{ }
public FluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog)
{ {
const int alpha = 128;
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
if (aero)
BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
new SolidColorBrush(Color.FromArgb(alpha, 225, 225, 225)) :
new SolidColorBrush(Color.FromArgb(alpha, 30, 30, 30));
} }
} }
} }

View File

@ -1,32 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using Wpf.Ui.Appearance;
namespace Bloxstrap.UI.ViewModels.Bootstrapper
{
public class ProgressFluentDialogViewModel : BootstrapperDialogViewModel
{
public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
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(IBootstrapperDialog dialog, bool aero) : base(dialog)
{
const int alpha = 128;
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
if (aero)
BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
new SolidColorBrush(Color.FromArgb(alpha, 225, 225, 225)) :
new SolidColorBrush(Color.FromArgb(alpha, 30, 30, 30));
}
}
}