Application.xaml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <Application x:Class="Application"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  5. xmlns:my="clr-namespace:pcl"
  6. xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
  7. StartupUri="formStart.xaml"
  8. ShutdownMode="OnMainWindowClose">
  9. <Application.Resources>
  10. <!--Label-->
  11. <Style TargetType="Label">
  12. <Setter Property="OverridesDefaultStyle" Value="True"/>
  13. <Setter Property="Padding" Value="5"/>
  14. <!--防止Alt-->
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="Label">
  18. <Border Background="{TemplateBinding Background}">
  19. <ContentPresenter
  20. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  21. Margin="{TemplateBinding Padding}"
  22. RecognizesAccessKey="False"
  23. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
  24. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  25. </Border>
  26. </ControlTemplate>
  27. </Setter.Value>
  28. </Setter>
  29. </Style>
  30. <!--TextBox-->
  31. <Style TargetType="TextBox">
  32. <!--防止指向动画-->
  33. <Setter Property="Template">
  34. <Setter.Value>
  35. <ControlTemplate TargetType="TextBox">
  36. <Themes:ListBoxChrome x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  37. <Grid>
  38. <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  39. </Grid>
  40. </Themes:ListBoxChrome>
  41. </ControlTemplate>
  42. </Setter.Value>
  43. </Setter>
  44. <!--样式-->
  45. <Setter Property="Background" Value="Transparent"/>
  46. <Setter Property="Height" Value="27" />
  47. <Setter Property="VerticalContentAlignment" Value="Center" />
  48. <Setter Property="SelectionOpacity" Value="0.2" />
  49. <Setter Property="SelectionBrush" Value="{DynamicResource Color3}" />
  50. <Setter Property="FontSize" Value="14" />
  51. <Setter Property="Padding" Value="3,0,0,0" />
  52. <Setter Property="BorderBrush" Value="{DynamicResource Color4}" />
  53. </Style>
  54. <!--主题-->
  55. <SolidColorBrush x:Key="Color1">#FFD5E9FF</SolidColorBrush>
  56. <SolidColorBrush x:Key="Color2">#FF6AB1FF</SolidColorBrush>
  57. <SolidColorBrush x:Key="Color3">#FF0079FF</SolidColorBrush>
  58. <SolidColorBrush x:Key="Color4">#FF0051AA</SolidColorBrush>
  59. <SolidColorBrush x:Key="Color5">#FF002855</SolidColorBrush>
  60. <Color x:Key="ColorE1">#FFD5E9FF</Color>
  61. <Color x:Key="ColorE2">#FF6AB1FF</Color>
  62. <Color x:Key="ColorE3">#FF0079FF</Color>
  63. <Color x:Key="ColorE4">#FF0051AA</Color>
  64. <Color x:Key="ColorE5">#FF002855</Color>
  65. </Application.Resources>
  66. </Application>