Skip to content

Commit

Permalink
fix: 扩展内容到标题以便显示完整背景图片到标题
Browse files Browse the repository at this point in the history
  • Loading branch information
Shizuku-Nanami committed Oct 18, 2024
1 parent a4e411d commit ea88a80
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
27 changes: 21 additions & 6 deletions SYSTools/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,34 @@
muxc:TitleBar.IsBackButtonVisible="False"
muxc:TitleBar.ButtonGlyphStyle="Fluent"
muxc:TitleBar.Height="48"
Height="670" Width="1100" MinWidth="1100" MinHeight="670" Loaded="Window_Loaded" Closed="Window_Closed" Deactivated="Window_Deactivated">

muxc:TitleBar.ExtendViewIntoTitleBar="True"
Loaded="Window_Loaded"
Closed="Window_Closed"
Deactivated="Window_Deactivated"
Height="670" Width="1100" MinWidth="1100" MinHeight="670" >

<Grid>
<!--设定为预设无背景图片-->
<Image x:Name="BackImage" Stretch="UniformToFill" Source="/Resources/NoBackImage.png">
<Image.Effect>
<BlurEffect/>
</Image.Effect>
</Image>

<Border x:Name="AppTitleBar" Grid.Column="1" VerticalAlignment="Top" Height="24" Margin="50,12,0,0">
<TextBlock x:Name="AppTitle" Text="" VerticalAlignment="Top" Margin="0,8,0,0"/>
</Border>

<Grid x:Name="AppTitleBar"
Height="48" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="LeftPaddingColumn" Width="0"/>
<ColumnDefinition/>
<ColumnDefinition x:Name="RightPaddingColumn" Width="0"/>
</Grid.ColumnDefinitions>
<TextBlock x:Name="TitleBarTextBlock"
FontWeight="Regular"
FontSize="12"
Grid.Column="1"
VerticalAlignment="Center"
Margin="16,0,0,0"/>
</Grid>

<muxc:NavigationView x:Name="Sidebar"
IsBackButtonVisible="Collapsed"
Expand Down
2 changes: 1 addition & 1 deletion SYSTools/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void Window_Loaded(object sender, RoutedEventArgs e)
);
Close();
}
Title = "SYSTools Ver" + (Application.ResourceAssembly.GetName().Version.ToString());
TitleBarTextBlock.Text = "SYSTools Ver" + (Application.ResourceAssembly.GetName().Version.ToString());
// 设置默认启动Page页
CurrentPage.Navigate(Home_Page, new DrillInNavigationTransitionInfo());
}
Expand Down
2 changes: 1 addition & 1 deletion SYSTools/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.7.*")]
[assembly: AssemblyVersion("0.7.2.*")]
//[assembly: AssemblyFileVersion("0.7.1.0")]

0 comments on commit ea88a80

Please sign in to comment.