1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
<ControlTemplate x:Key="WindowTemplate" TargetType="{x:Type Window}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition />
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderThickness="2,2,2,2" BorderBrush="Gray" CornerRadius="10,10,0,0">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#050C21" Offset=" 0"/>
<GradientStop Color="#BBBBAA" Offset=" 1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<Grid>
<TextBlock Text="{TemplateBinding Title}" Foreground="White" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Center" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" >
<Button Content=" _ " Foreground="White" Margin="1" />
<Button Content=" X " Foreground="White" Style="{StaticResource BoutonRouge}" Margin="1" />
</StackPanel>
</Grid>
</Border>
<Border Grid.Row="2" BorderBrush="Gray" BorderThickness="2,0,2,2"
CornerRadius="0,0,10,10" >
<!--MouseLeftButtonDown="{TemplateBinding DragMove}"-->
<Border.Background>
<LinearGradientBrush StartPoint=" 1,0">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#E5F3FF" Offset=" 0"/>
<GradientStop Color="#052E63" Offset=" 1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Border.Background>
<AdornerDecorator>
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" />
</AdornerDecorator>
</Border>
</Grid>
</ControlTemplate> |
Partager