App.xaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <Application x:Class="CatProject.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:CatProject"
  5. StartupUri="MainWindow.xaml">
  6. <Application.Resources>
  7. <Style TargetType="Button">
  8. <Setter Property="Width" Value="200"/>
  9. <Setter Property="Height" Value="25"/>
  10. <Setter Property="Background" Value="#C71585"/>
  11. <Setter Property="Foreground" Value="White"/>
  12. <Setter Property="HorizontalAlignment" Value="Right"/>
  13. <Setter Property="Margin" Value="3"/>
  14. <Setter Property="OverridesDefaultStyle" Value="True"/>
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="Button">
  18. <Border Name="border"
  19. BorderThickness="1"
  20. Padding="4,2"
  21. BorderBrush="#C71585"
  22. CornerRadius="3"
  23. Background="{TemplateBinding Background}">
  24. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
  25. </Border>
  26. <ControlTemplate.Triggers>
  27. <Trigger Property="IsMouseOver" Value="True">
  28. <Setter TargetName="border" Property="BorderBrush" Value="Black"/>
  29. <Setter Property="Foreground" Value="Black"/>
  30. </Trigger>
  31. </ControlTemplate.Triggers>
  32. </ControlTemplate>
  33. </Setter.Value>
  34. </Setter>
  35. </Style>
  36. </Application.Resources>
  37. </Application>