Common.xaml 7.3 KB

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