CustomWindowStyle.xaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:ui="clr-namespace:CyberX8_Themes.CustomControls"
  4. xmlns:local="CyberX8_Themes.Style">
  5. <Style TargetType="{x:Type Window}" x:Key="ShellWindow">
  6. <Setter Property="Background" Value="#2B5A97"></Setter>
  7. <Setter Property="WindowStyle" Value="None"></Setter>
  8. <Setter Property="AllowsTransparency" Value="False"></Setter>
  9. <Setter Property="Template" >
  10. <Setter.Value>
  11. <ControlTemplate TargetType="Window">
  12. <Border BorderBrush="#333" BorderThickness="1" Background="#eee">
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="25"></RowDefinition>
  16. <RowDefinition Height="*"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <ui:WindowTopArea Background="#1E7FC3">
  19. <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  20. <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Center">
  21. <Path Data="{StaticResource Icon_Auto}" Stretch="Fill" Stroke="White" Width="12" Height="12"></Path>
  22. <TextBlock Text="{TemplateBinding Title}" Foreground="White" Margin="5 2" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="12"></TextBlock>
  23. </StackPanel>
  24. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  25. <ui:WindowButtonMin Background="Transparent" BorderThickness="0">
  26. <TextBlock Text="➖" Foreground="White" Width="16" Height="16"/>
  27. </ui:WindowButtonMin>
  28. <ui:WindowButtonClose>
  29. <TextBlock Text="✖" Foreground="White" Width="16" Height="16"/>
  30. </ui:WindowButtonClose>
  31. </StackPanel>
  32. </Grid>
  33. </ui:WindowTopArea>
  34. <AdornerDecorator Grid.Row="1">
  35. <ContentPresenter></ContentPresenter>
  36. </AdornerDecorator>
  37. </Grid>
  38. </Border>
  39. </ControlTemplate>
  40. </Setter.Value>
  41. </Setter>
  42. </Style>
  43. </ResourceDictionary>