App.xaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <Application x:Class="N3.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:N3"
  5. StartupUri="MainWindow.xaml">
  6. <Application.Resources>
  7. <Style x:Key="TBusually" TargetType="TextBlock">
  8. <Style.Setters>
  9. <Setter Property="HorizontalAlignment" Value="Right"/>
  10. <Setter Property="VerticalAlignment" Value="Bottom"/>
  11. <Setter Property="Padding" Value="10"/>
  12. <Setter Property="FontSize" Value="16"/>
  13. <Setter Property="FontWeight" Value="DemiBold"/>
  14. </Style.Setters>
  15. </Style>
  16. <Style TargetType="Button">
  17. <Setter Property="FontWeight" Value="DemiBold"/>
  18. <Setter Property="Template">
  19. <Setter.Value>
  20. <ControlTemplate TargetType="{x:Type Button}">
  21. <Border Background="{TemplateBinding Background}" CornerRadius="5" Margin="2">
  22. <ContentPresenter x:Name="contentPresenter"
  23. Focusable="False"
  24. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  25. Margin="{TemplateBinding Padding}"
  26. RecognizesAccessKey="True"
  27. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  28. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  29. </Border>
  30. <ControlTemplate.Triggers>
  31. <Trigger Property="IsMouseOver" Value="True">
  32. <Setter Property="Background" Value="Orange"/>
  33. <Setter Property="Foreground" Value="WhiteSmoke"/>
  34. </Trigger>
  35. <Trigger Property="IsPressed" Value="true">
  36. <Setter Property="Background" Value="Orange"/>
  37. <Setter Property="Foreground" Value="WhiteSmoke"/>
  38. </Trigger>
  39. </ControlTemplate.Triggers>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. </Application.Resources>
  45. </Application>