App.xaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <Application x:Class="DemoProb.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:DemoProb"
  5. StartupUri="MainWindow.xaml">
  6. <Application.Resources>
  7. <Style x:Key="ButtonMain" TargetType="Button">
  8. <Setter Property="Background" Value="#FF04A0FF"/>
  9. <Setter Property="Foreground" Value="White"/>
  10. <Setter Property="Width" Value="200"/>
  11. <Setter Property="Height" Value="30"/>
  12. <Setter Property="Template">
  13. <Setter.Value>
  14. <ControlTemplate TargetType="Button">
  15. <Border x:Name="Border" Background="{TemplateBinding Background}" CornerRadius="10">
  16. <ContentPresenter x:Name="Content" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  17. </Border>
  18. <ControlTemplate.Triggers>
  19. <Trigger Property="IsEnabled" Value="True">
  20. <Setter Property="Cursor" Value="Hand"/>
  21. </Trigger>
  22. </ControlTemplate.Triggers>
  23. </ControlTemplate>
  24. </Setter.Value>
  25. </Setter>
  26. </Style>
  27. <Style x:Key="ButtonNavigation" TargetType="Button">
  28. <Setter Property="Background" Value="#FF04A0FF"/>
  29. <Setter Property="Foreground" Value="Black"/>
  30. <Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
  31. <Setter Property="HorizontalAlignment" Value="Left"/>
  32. <Setter Property="Width" Value="90"/>
  33. <Setter Property="Height" Value="30"/>
  34. <Setter Property="Template">
  35. <Setter.Value>
  36. <ControlTemplate TargetType="Button">
  37. <Border x:Name="Border" Background="{TemplateBinding Background}" CornerRadius="4">
  38. <ContentPresenter x:Name="Content" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  39. </Border>
  40. <ControlTemplate.Triggers>
  41. <Trigger Property="IsEnabled" Value="True">
  42. <Setter Property="Cursor" Value="Hand"/>
  43. </Trigger>
  44. </ControlTemplate.Triggers>
  45. </ControlTemplate>
  46. </Setter.Value>
  47. </Setter>
  48. </Style>
  49. </Application.Resources>
  50. </Application>