加可拉窗口
This commit is contained in:
40
Ramitta/Themes/CustomWindowStyle.xaml
Normal file
40
Ramitta/Themes/CustomWindowStyle.xaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Ramitta="clr-namespace:Ramitta"
|
||||
xmlns:ui="clr-namespace:Ramitta.Utils"
|
||||
>
|
||||
<Style TargetType="{x:Type Window}" x:Key="ShellWindow">
|
||||
<Setter Property="Background" Value="#FF1A1A1D"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
|
||||
<Setter Property="WindowStyle" Value="None"/>
|
||||
<Setter Property="AllowsTransparency" Value="True"/>
|
||||
<Setter Property="FontFamily" Value="Segoe UI"/>
|
||||
|
||||
<Setter Property="Template" >
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Window">
|
||||
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}, FallbackValue=AliceBlue}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<ui:WindowTopArea>
|
||||
<Ramitta:winTitleBar Title="{Binding Title, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" Icon="{Binding Icon, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"/>
|
||||
</ui:WindowTopArea>
|
||||
<AdornerDecorator Grid.Row="1">
|
||||
<ContentPresenter/>
|
||||
</AdornerDecorator>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user