mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Fix Windows 11 titlebars (#92)
also fixed the fluent style not changing the taskbar icon
This commit is contained in:
parent
9a90488575
commit
467f55c4b2
@ -7,9 +7,9 @@
|
|||||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Width="420"
|
Width="420"
|
||||||
Height="178"
|
Height="192"
|
||||||
MinHeight="178"
|
MinHeight="191"
|
||||||
MaxHeight="178"
|
MaxHeight="192"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||||
ExtendsContentIntoTitleBar="True"
|
ExtendsContentIntoTitleBar="True"
|
||||||
@ -17,7 +17,7 @@
|
|||||||
WindowCornerPreference="Round"
|
WindowCornerPreference="Round"
|
||||||
WindowStartupLocation="CenterScreen">
|
WindowStartupLocation="CenterScreen">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Margin="16,16,8,0" Text="Bloxstrap" Foreground="{DynamicResource TextFillColorPrimaryBrush}" />
|
<ui:TitleBar Background="{ui:ThemeResource ApplicationBackgroundBrush}" Padding="15,15,0,10" x:Name="RootTitleBar" Grid.Row="0" ForceShutdown="False" MinimizeToTray="False" ShowHelp="False" UseSnapLayout="False" ShowClose="False" ShowMinimize="False" ShowMaximize="False" Title="Bloxstrap" />
|
||||||
<Grid Margin="16,0,16,0">
|
<Grid Margin="16,0,16,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
@ -1,20 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
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 System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
using Bloxstrap.Enums;
|
using Bloxstrap.Enums;
|
||||||
|
using Bloxstrap.Helpers.Extensions;
|
||||||
using Bloxstrap.ViewModels;
|
using Bloxstrap.ViewModels;
|
||||||
|
|
||||||
using Wpf.Ui.Appearance;
|
using Wpf.Ui.Appearance;
|
||||||
using Wpf.Ui.Mvvm.Contracts;
|
using Wpf.Ui.Mvvm.Contracts;
|
||||||
using Wpf.Ui.Mvvm.Services;
|
using Wpf.Ui.Mvvm.Services;
|
||||||
@ -79,6 +70,7 @@ namespace Bloxstrap.Dialogs
|
|||||||
_viewModel = new FluentDialogViewModel(this);
|
_viewModel = new FluentDialogViewModel(this);
|
||||||
DataContext = _viewModel;
|
DataContext = _viewModel;
|
||||||
Title = App.ProjectName;
|
Title = App.ProjectName;
|
||||||
|
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();
|
||||||
|
|
||||||
_themeService.SetTheme(App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Dark ? ThemeType.Dark : ThemeType.Light);
|
_themeService.SetTheme(App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Dark ? ThemeType.Dark : ThemeType.Light);
|
||||||
_themeService.SetSystemAccent();
|
_themeService.SetSystemAccent();
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ui:TitleBar x:Name="RootTitleBar" Grid.Row="0" ForceShutdown="False" MinimizeToTray="False" ShowHelp="False" UseSnapLayout="True" Title="Bloxstrap Menu" Icon="pack://application:,,,/Bloxstrap.ico" />
|
<ui:TitleBar Background="{ui:ThemeResource ApplicationBackgroundBrush}" Padding="15,15,0,10" x:Name="RootTitleBar" Grid.Row="0" ForceShutdown="False" MinimizeToTray="False" ShowHelp="False" UseSnapLayout="True" Title="Bloxstrap Menu" Icon="pack://application:,,,/Bloxstrap.ico" />
|
||||||
|
|
||||||
<Grid x:Name="RootGrid" Grid.Row="1" Margin="13,0,0,0" Visibility="Visible">
|
<Grid x:Name="RootGrid" Grid.Row="1" Margin="13,5,0,0" Visibility="Visible">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
|
Loading…
Reference in New Issue
Block a user