mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
add aero
This commit is contained in:
parent
fa53c2cc72
commit
4119792514
@ -9,5 +9,6 @@
|
|||||||
FluentDialog,
|
FluentDialog,
|
||||||
ByfronDialog,
|
ByfronDialog,
|
||||||
ProgressFluentDialog,
|
ProgressFluentDialog,
|
||||||
|
ProgressFluentAeroDialog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,14 +11,14 @@
|
|||||||
Width="520"
|
Width="520"
|
||||||
Height="280"
|
Height="280"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
d:DataContext="{d:DesignInstance vms:BootstrapperDialogViewModel,
|
d:DataContext="{d:DesignInstance vms:ProgressFluentDialogViewModel,
|
||||||
IsDesignTimeCreatable=True}"
|
IsDesignTimeCreatable=True}"
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
Closing="UiWindow_Closing"
|
Closing="UiWindow_Closing"
|
||||||
ExtendsContentIntoTitleBar="True"
|
ExtendsContentIntoTitleBar="True"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
WindowBackdropType="Acrylic"
|
WindowBackdropType="{Binding Path=WindowBackdropType, Mode=OneTime}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
WindowStyle="None"
|
WindowStyle="None"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
@ -85,12 +85,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public ProgressFluentDialog()
|
public ProgressFluentDialog(bool aero)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ApplyTheme();
|
ApplyTheme();
|
||||||
|
|
||||||
_viewModel = new FluentDialogViewModel(this);
|
_viewModel = new ProgressFluentDialogViewModel(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();
|
||||||
|
@ -57,7 +57,8 @@ namespace Bloxstrap.UI
|
|||||||
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
|
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
|
||||||
BootstrapperStyle.FluentDialog => new FluentDialog(),
|
BootstrapperStyle.FluentDialog => new FluentDialog(),
|
||||||
BootstrapperStyle.ByfronDialog => new ByfronDialog(),
|
BootstrapperStyle.ByfronDialog => new ByfronDialog(),
|
||||||
BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(),
|
BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(false),
|
||||||
|
BootstrapperStyle.ProgressFluentAeroDialog => new ProgressFluentDialog(true),
|
||||||
_ => new FluentDialog()
|
_ => new FluentDialog()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Wpf.Ui.Appearance;
|
||||||
|
|
||||||
|
namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
||||||
|
{
|
||||||
|
public class ProgressFluentDialogViewModel : BootstrapperDialogViewModel
|
||||||
|
{
|
||||||
|
public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
|
||||||
|
|
||||||
|
[Obsolete("Do not use this! This is for the designer only.", true)]
|
||||||
|
public ProgressFluentDialogViewModel() : base()
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public ProgressFluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog)
|
||||||
|
{
|
||||||
|
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user