Files

82 lines
4.4 KiB
Plaintext
Raw Permalink Normal View History

2026-02-23 14:58:05 +08:00
<Application
x:Class="IFCReader.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:IFCReader"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style x:Key="MainWindow" TargetType="Window">
<Setter Property="ShowInTaskbar" Value="False" />
<Setter Property="FontSize" Value="14" />
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome />
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<Grid>
<!-- Title Panel -->
<DockPanel LastChildFill="True">
<Border
x:Name="titlebar"
Height="{x:Static SystemParameters.CaptionHeight}"
DockPanel.Dock="Top">
<Border.Background>
<!--<SolidColorBrush Color="Black" />-->
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.0" Color="#0F1E69" />
<GradientStop Offset="1.0" Color="DarkGray" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<Grid>
<!-- Title text only -->
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Top"
Background="Transparent"
Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title}" />
</Grid>
</Border>
<!-- Provides the actual content control -->
<Border Margin="0">
<AdornerDecorator>
<ContentPresenter Content="{TemplateBinding Content}" />
</AdornerDecorator>
</Border>
</DockPanel>
<!-- Provides the actual window border -->
<Border
Margin="0,0,0,0"
Background="#F4F4F4"
BorderBrush="White"
BorderThickness="1,1,1,1"
Grid.ZIndex="-1" />
<!-- This is the top left system button -->
<!--<Button
Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(WindowChrome.WindowChrome).ResizeBorderThickness}"
Padding="1"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Command="{x:Static SystemCommands.ShowSystemMenuCommand}"
CommandParameter="{Binding ElementName=CalcWindow}"
WindowChrome.IsHitTestVisibleInChrome="True">
<Image
Width="16"
Height="16"
Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Icon}"
WindowChrome.IsHitTestVisibleInChrome="True" />
</Button>-->
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>