mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-09 21:04:59 +00:00
refactor<*>: add Controls.Window to replace System.Windows.Window
This commit is contained in:
parent
31dd0eb832
commit
4b9923b84c
15 changed files with 842 additions and 879 deletions
|
@ -1,97 +1,91 @@
|
|||
<Window x:Class="SourceGit.Views.About"
|
||||
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:controls="clr-namespace:SourceGit.Views.Controls"
|
||||
mc:Ignorable="d"
|
||||
UseLayoutRounding="True"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Title="{StaticResource Text.About}"
|
||||
Height="280" Width="400"
|
||||
ResizeMode="NoResize">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome UseAeroCaptionButtons="False" CornerRadius="0" CaptionHeight="28" ResizeBorderThickness="1"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<controls:Window
|
||||
x:Class="SourceGit.Views.About"
|
||||
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:controls="clr-namespace:SourceGit.Views.Controls"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Title="{StaticResource Text.About}"
|
||||
Height="280" Width="400"
|
||||
ResizeMode="NoResize">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="1"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<controls:WindowBorder>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="1"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title bar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Icon -->
|
||||
<Path Grid.Column="0" Margin="6,0" Width="16" Height="16" Data="{StaticResource Icon.Help}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock Grid.Column="1" Text="{StaticResource Text.About}"/>
|
||||
|
||||
<!-- Close -->
|
||||
<controls:IconButton
|
||||
Grid.Column="3"
|
||||
Click="Quit"
|
||||
Width="28"
|
||||
Padding="8"
|
||||
Icon="{StaticResource Icon.Close}"
|
||||
HoverBackground="Red"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True"/>
|
||||
</Grid>
|
||||
<!-- Title bar -->
|
||||
<Grid Grid.Row="0" Background="{StaticResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Rectangle
|
||||
Grid.Row="1"
|
||||
Height="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Fill="{StaticResource Brush.Border0}"/>
|
||||
<!-- Icon -->
|
||||
<Path Grid.Column="0" Margin="6,0" Width="16" Height="16" Data="{StaticResource Icon.Help}"/>
|
||||
|
||||
<!-- Content -->
|
||||
<StackPanel Grid.Row="2" Orientation="Vertical">
|
||||
|
||||
<!-- LOGO -->
|
||||
<Path
|
||||
Margin="0,16,0,0"
|
||||
Width="64" Height="64"
|
||||
Data="{StaticResource Icon.Git}"
|
||||
Fill="{StaticResource Brush.Logo}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock
|
||||
Margin="0,24,0,8"
|
||||
Text="{StaticResource Text.About.Title}"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18" FontWeight="Bold"/>
|
||||
|
||||
<!-- Version -->
|
||||
<TextBlock
|
||||
x:Name="version"
|
||||
Margin="0,0,0,8"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="11"
|
||||
Text="VERSION: v1.0 .NET: v5.0"/>
|
||||
|
||||
<!-- Official site -->
|
||||
<TextBlock HorizontalAlignment="Center" Margin="0,16,0,4">
|
||||
<!-- Title -->
|
||||
<TextBlock Grid.Column="1" Text="{StaticResource Text.About}"/>
|
||||
|
||||
<!-- Close -->
|
||||
<controls:IconButton
|
||||
Grid.Column="3"
|
||||
Click="Quit"
|
||||
Width="28"
|
||||
Padding="8"
|
||||
Icon="{StaticResource Icon.Close}"
|
||||
HoverBackground="Red"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True"/>
|
||||
</Grid>
|
||||
|
||||
<Rectangle
|
||||
Grid.Row="1"
|
||||
Height="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Fill="{StaticResource Brush.Border0}"/>
|
||||
|
||||
<!-- Content -->
|
||||
<StackPanel Grid.Row="2" Orientation="Vertical">
|
||||
|
||||
<!-- LOGO -->
|
||||
<Path
|
||||
Margin="0,16,0,0"
|
||||
Width="64" Height="64"
|
||||
Data="{StaticResource Icon.Git}"
|
||||
Fill="{StaticResource Brush.Logo}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock
|
||||
Margin="0,24,0,8"
|
||||
Text="{StaticResource Text.About.Title}"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18" FontWeight="Bold"/>
|
||||
|
||||
<!-- Version -->
|
||||
<TextBlock
|
||||
x:Name="version"
|
||||
Margin="0,0,0,8"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="11"
|
||||
Text="VERSION: v1.0 .NET: v5.0"/>
|
||||
|
||||
<!-- Official site -->
|
||||
<TextBlock HorizontalAlignment="Center" Margin="0,16,0,4">
|
||||
<Hyperlink NavigateUri="https://gitee.com/sourcegit/sourcegit.git" RequestNavigate="OnRequestNavigate">
|
||||
<Run Text="https://gitee.com/sourcegit/sourcegit.git"/>
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
|
||||
<!-- Copyrights -->
|
||||
<TextBlock
|
||||
Margin="0,4"
|
||||
Text="Copyright © sourcegit 2021. All rights reserved."
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</controls:WindowBorder>
|
||||
</Window>
|
||||
</TextBlock>
|
||||
|
||||
<!-- Copyrights -->
|
||||
<TextBlock
|
||||
Margin="0,4"
|
||||
Text="Copyright © sourcegit 2021. All rights reserved."
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</controls:Window>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue