Common.xaml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <Style TargetType="{x:Type Button}">
  4. <Setter Property="IsEnabled"
  5. Value="true" />
  6. <Setter Property="IsTabStop"
  7. Value="true" />
  8. <Setter Property="Foreground"
  9. Value="#FF313131" />
  10. <Setter Property="MinWidth"
  11. Value="5" />
  12. <Setter Property="MinHeight"
  13. Value="5" />
  14. <Setter Property="Width"
  15. Value="80"></Setter>
  16. <Setter Property="Height"
  17. Value="auto"></Setter>
  18. <Setter Property="Margin"
  19. Value="5" />
  20. <Setter Property="HorizontalAlignment"
  21. Value="Center"></Setter>
  22. <Setter Property="VerticalAlignment"
  23. Value="Center"></Setter>
  24. <Setter Property="HorizontalContentAlignment"
  25. Value="Center" />
  26. <Setter Property="VerticalContentAlignment"
  27. Value="Center" />
  28. <Setter Property="Cursor"
  29. Value="Arrow" />
  30. <Setter Property="FontSize"
  31. Value="11" />
  32. <Setter Property="Height"
  33. Value="25" />
  34. <Setter Property="Foreground"
  35. Value="#FF2300FF" />
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type Button}">
  39. <Grid>
  40. <Border x:Name="SEL"
  41. Opacity="0"
  42. BorderBrush="Green"
  43. CornerRadius="3"
  44. BorderThickness="1"
  45. Background="Transparent" />
  46. <Border x:Name="IND"
  47. Opacity="1"
  48. CornerRadius="3"
  49. BorderBrush="Green"
  50. BorderThickness="1"
  51. Background="{TemplateBinding Background}" />
  52. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  53. Margin="{TemplateBinding Padding}"
  54. RecognizesAccessKey="True"
  55. SnapsToDevicePixels="true"
  56. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  57. </Grid>
  58. <ControlTemplate.Triggers>
  59. <Trigger Property="IsMouseOver"
  60. Value="true">
  61. <Setter Property="Cursor"
  62. Value="Hand" />
  63. </Trigger>
  64. <Trigger Property="IsPressed"
  65. Value="true">
  66. <Setter Property="Opacity"
  67. TargetName="SEL"
  68. Value="1" />
  69. <Setter Property="Opacity"
  70. TargetName="IND"
  71. Value="0.8"></Setter>
  72. <Setter Property="BorderThickness"
  73. TargetName="SEL"
  74. Value="3"></Setter>
  75. </Trigger>
  76. <Trigger Property="IsEnabled"
  77. Value="false">
  78. <Setter Property="Foreground"
  79. Value="#ADADAD" />
  80. </Trigger>
  81. </ControlTemplate.Triggers>
  82. </ControlTemplate>
  83. </Setter.Value>
  84. </Setter>
  85. </Style>
  86. <Style TargetType="{x:Type DockPanel}">
  87. <Setter Property="MinWidth" Value="500" />
  88. <Setter Property="Margin" Value="5" />
  89. </Style>
  90. <Style TargetType="ComboBox">
  91. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  92. <Setter Property="Margin" Value="5"></Setter>
  93. <Setter Property="Height" Value="25" />
  94. </Style>
  95. <Style TargetType="TextBox">
  96. <Setter Property="HorizontalAlignment" Value="Stretch"></Setter>
  97. <Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
  98. <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
  99. <Setter Property="Margin" Value="5"></Setter>
  100. </Style>
  101. <Style x:Key="MultiLine.Style" TargetType="TextBox"
  102. BasedOn="{StaticResource {x:Type TextBox}}">
  103. <Setter Property="VerticalContentAlignment" Value="Top"></Setter>
  104. <Setter Property="AcceptsReturn" Value="True"></Setter>
  105. <Setter Property="TextWrapping" Value="Wrap"></Setter>
  106. <Setter Property="VerticalScrollBarVisibility" Value="Auto"></Setter>
  107. </Style>
  108. <Style TargetType="CheckBox">
  109. <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
  110. <Setter Property="Cursor" Value="Hand"></Setter>
  111. <Setter Property="Margin" Value="5"></Setter>
  112. </Style>
  113. <Style TargetType="DatePicker">
  114. <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
  115. <Setter Property="Height" Value="24"></Setter>
  116. <Setter Property="Margin" Value="5"></Setter>
  117. <Setter Property="Padding" Value="0" />
  118. </Style>
  119. <Style TargetType="ToolTip">
  120. <Setter Property ="IsOpen" Value="False" />
  121. <Setter Property ="ContentTemplate">
  122. <Setter.Value>
  123. <DataTemplate>
  124. <Border BorderThickness="1"
  125. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  126. <TextBlock Text="{TemplateBinding Content}"
  127. Margin="2" Height="15" />
  128. </Border>
  129. </DataTemplate>
  130. </Setter.Value>
  131. </Setter>
  132. <Style.Triggers>
  133. <Trigger Property="IsOpen" Value="True">
  134. <Trigger.EnterActions>
  135. <BeginStoryboard>
  136. <Storyboard>
  137. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Duration="0:0:3">
  138. <DiscreteObjectKeyFrame KeyTime ="0:0:0">
  139. <DiscreteObjectKeyFrame.Value>
  140. <Visibility>Visible</Visibility>
  141. </DiscreteObjectKeyFrame.Value>
  142. </DiscreteObjectKeyFrame>
  143. <DiscreteObjectKeyFrame KeyTime ="0:0:3">
  144. <DiscreteObjectKeyFrame.Value>
  145. <Visibility>Hidden</Visibility>
  146. </DiscreteObjectKeyFrame.Value>
  147. </DiscreteObjectKeyFrame>
  148. </ObjectAnimationUsingKeyFrames>
  149. </Storyboard>
  150. </BeginStoryboard>
  151. </Trigger.EnterActions>
  152. </Trigger>
  153. </Style.Triggers>
  154. </Style>
  155. </ResourceDictionary>