App.xaml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <Application x:Class="coffe.App"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:coffe"
  5. StartupUri="MainWindow.xaml">
  6. <Application.Resources>
  7. <FontFamily x:Key="hitterlove">pack://appliction;,,,FolderFont/Hitterlove.otf#Hitterlove</FontFamily>
  8. <FontFamily x:Key="vpch2">pack://appliction;,,,FolderFont/VPCH2.otf#VPCH2</FontFamily>
  9. <Style x:Key="CustomWindowChrome" TargetType="{x:Type Window}">
  10. <Setter Property="AllowsTransparency" Value="True"></Setter>
  11. <Setter Property="WindowStyle" Value="None"></Setter>
  12. <Setter Property="Background" Value="Transparent"></Setter>
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="Window">
  16. <Border Name="newBorder" CornerRadius="100" Background="#e07a5f" BorderBrush="#9A381D" BorderThickness="1 1 10 15">
  17. <Grid>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="Auto" />
  20. <RowDefinition />
  21. <RowDefinition Height="Auto" />
  22. </Grid.RowDefinitions>
  23. <!--Заголовок-->
  24. <!--Основное содержание-->
  25. <Border Grid.Row="1">
  26. <AdornerDecorator>
  27. <ContentPresenter />
  28. </AdornerDecorator>
  29. </Border>
  30. <!--Элемент захвата и изменения размера - работает только для прямоугольных окон-->
  31. <ResizeGrip Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Visibility="Collapsed" IsTabStop="False" />
  32. </Grid>
  33. </Border>
  34. </ControlTemplate>
  35. </Setter.Value>
  36. </Setter>
  37. </Style>
  38. </Application.Resources>
  39. </Application>