mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Adjust fluent bootstrapper styles
Fix drag bug, fix sizing (because matt sucks at ui design), fix header colour being shown
This commit is contained in:
parent
a194bf937e
commit
a2261c5e92
@ -1,21 +1,25 @@
|
|||||||
<base:WpfUiWindow x:Class="Bloxstrap.UI.Elements.Bootstrapper.ClassicFluentDialog"
|
<base:WpfUiWindow
|
||||||
|
x:Class="Bloxstrap.UI.Elements.Bootstrapper.ClassicFluentDialog"
|
||||||
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"
|
||||||
|
xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper"
|
||||||
Width="420"
|
Width="420"
|
||||||
|
Height="190"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
SizeToContent="Height"
|
|
||||||
ResizeMode="NoResize"
|
|
||||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
|
Closing="UiWindow_Closing"
|
||||||
ExtendsContentIntoTitleBar="True"
|
ExtendsContentIntoTitleBar="True"
|
||||||
|
ResizeMode="NoResize"
|
||||||
WindowBackdropType="Mica"
|
WindowBackdropType="Mica"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Closing="UiWindow_Closing">
|
WindowStyle="None"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@ -23,9 +27,15 @@
|
|||||||
<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" />
|
<ui:TitleBar
|
||||||
|
Grid.Row="0"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
CanMaximize="False"
|
||||||
|
ShowClose="False"
|
||||||
|
ShowMaximize="False"
|
||||||
|
ShowMinimize="False" />
|
||||||
|
|
||||||
<Grid Grid.Row="1" Margin="16,8,16,16">
|
<Grid Grid.Row="1" Margin="16,0,16,0" VerticalAlignment="Top">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
|
@ -8,12 +8,11 @@
|
|||||||
xmlns:resources="clr-namespace:Bloxstrap.Resources"
|
xmlns:resources="clr-namespace:Bloxstrap.Resources"
|
||||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||||
xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper"
|
xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper"
|
||||||
Width="500"
|
Width="520"
|
||||||
Height="280"
|
Height="320"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
d:DataContext="{d:DesignInstance vms:FluentDialogViewModel,
|
d:DataContext="{d:DesignInstance vms:FluentDialogViewModel,
|
||||||
IsDesignTimeCreatable=True}"
|
IsDesignTimeCreatable=True}"
|
||||||
AllowsTransparency="True"
|
|
||||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
Closing="UiWindow_Closing"
|
Closing="UiWindow_Closing"
|
||||||
ExtendsContentIntoTitleBar="True"
|
ExtendsContentIntoTitleBar="True"
|
||||||
@ -43,17 +42,16 @@
|
|||||||
|
|
||||||
<Image
|
<Image
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Width="80"
|
Width="96"
|
||||||
Height="80"
|
Height="96"
|
||||||
Margin="0,30,0,0"
|
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Center"
|
||||||
RenderOptions.BitmapScalingMode="HighQuality"
|
RenderOptions.BitmapScalingMode="HighQuality"
|
||||||
Source="{Binding Icon, Mode=OneWay}" />
|
Source="{Binding Icon, Mode=OneWay}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="0,0,0,8"
|
Margin="0,0,0,16"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
FontSize="18"
|
FontSize="18"
|
||||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||||
|
@ -94,6 +94,10 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
|||||||
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();
|
||||||
|
|
||||||
|
// setting this to true for mica results in the window being undraggable
|
||||||
|
if (aero)
|
||||||
|
AllowsTransparency = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UiWindow_Closing(object sender, CancelEventArgs e)
|
private void UiWindow_Closing(object sender, CancelEventArgs e)
|
||||||
|
@ -11,6 +11,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
|||||||
public class FluentDialogViewModel : BootstrapperDialogViewModel
|
public class FluentDialogViewModel : BootstrapperDialogViewModel
|
||||||
{
|
{
|
||||||
public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
|
public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
|
||||||
|
|
||||||
public SolidColorBrush BackgroundColourBrush { get; set; } = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
|
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)]
|
[Obsolete("Do not use this! This is for the designer only.", true)]
|
||||||
@ -24,9 +25,11 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
|||||||
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
|
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
|
||||||
|
|
||||||
if (aero)
|
if (aero)
|
||||||
|
{
|
||||||
BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
|
BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
|
||||||
new SolidColorBrush(Color.FromArgb(alpha, 225, 225, 225)) :
|
new SolidColorBrush(Color.FromArgb(alpha, 225, 225, 225)) :
|
||||||
new SolidColorBrush(Color.FromArgb(alpha, 30, 30, 30));
|
new SolidColorBrush(Color.FromArgb(alpha, 30, 30, 30));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user