Blame view
sources/RoboforkApp/Style/LabelStyle.xaml
13.3 KB
6312cbd86
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style TargetType="{x:Type Label}"></Style> <Style x:Key="BaseLabel" TargetType="Label"> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="Foreground" Value="White"/> </Style> <Style x:Key="BaseLabelHeader" TargetType="Label"> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="Foreground" Value="White"/> <Setter Property="Background" Value="#0c386f"/> </Style> <Style x:Key="MessageBoxTitle" TargetType="{x:Type Label}"> <Setter Property="FontWeight" Value="Bold" /> <Setter Property="Foreground" Value="{DynamicResource MessageBoxTitleBrush}" /> </Style> <Style x:Key="DensoLabel" TargetType="{x:Type Label}"> <Setter Property="Height" Value="28"/> <Setter Property="Background" Value="#0c386f"/> <Setter Property="BorderBrush" Value="#7795bd" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Foreground" Value="White" /> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> </Style> <Style x:Key="DensoLabelSetting" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Height" Value="28"/> </Style> <Style x:Key="DensoLabelNoBorder" TargetType="{x:Type Label}"> <Setter Property="Background" Value="#0c386f"/> <Setter Property="Foreground" Value="White" /> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> </Style> <Style x:Key="DensoBorderLabel" TargetType="{x:Type Border}"> <Setter Property="Background" Value="#0c386f"/> <Setter Property="BorderBrush" Value="#7795bd" /> <Setter Property="BorderThickness" Value="1" /> </Style> <Style x:Key="DensoLabelExtendHeight" TargetType="{x:Type Label}"> <Setter Property="Background" Value="#0c386f"/> <Setter Property="BorderBrush" Value="#7795bd" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Foreground" Value="White" /> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Padding" Value="1"/> </Style> <Style x:Key="DensoLabelTransparent" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderThickness" Value="0" /> </Style> <Style x:Key="DensoLabelTransparentSmall" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabelTransparent}"> <Setter Property="Height" Value="15"/> <Setter Property="FontSize" Value="10" /> <Setter Property="Padding" Value="0" /> </Style> <Style x:Key="DensoCommonLabel" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Margin" Value="5,1"/> </Style> <Style x:Key="DensoTransparentLabel" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoCommonLabel}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderBrush" Value="Transparent"/> </Style> <Style x:Key="DensoLabelRegistrationGridHeader" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Height" Value="30"/> <Setter Property="FontSize" Value="15"></Setter> </Style> <Style x:Key="DensoLabelRegistration" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Width" Value="140"/> </Style> <Style x:Key="DensoLabelReportHeader" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Height" Value="40"/> <!--<Setter Property="Width" Value="400"/>--> <Setter Property="FontSize" Value="20"></Setter> </Style> <!--20150629 quyennk add--> <Style x:Key="DensoLabelReportSetting" TargetType="{x:Type Label}" > <Setter Property="FontSize" Value="15"/> <Setter Property="Foreground" Value="White" /> <Setter Property="HorizontalAlignment" Value="Left" /> </Style> <Style x:Key="SettingHeader" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="FontSize" Value="16"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="Height" Value="40"/> </Style> <Style x:Key="DensoGridTextBoxStyle" TargetType="{x:Type TextBox}"> <Setter Property="KeyboardNavigation.TabNavigation" Value="None" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="White"/> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="BorderThickness" Value="1" /> <Setter Property="Foreground" Value="Black"/> <Setter Property="BorderBrush" Value="#FFAAAAAA" /> <Setter Property="Padding" Value="2"/> <Setter Property="FontSize" Value="12"/> <Setter Property="Padding" Value="0pt,0pt,0pt,0pt"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <ControlTemplate.Resources> <Storyboard x:Key="FocusedOn"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)"> <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1" /> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="FocusedOff"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)"> <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" /> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="DisabledOn"> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000" Value="{x:Static Visibility.Visible}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="DisabledOff"> <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Visibility)"> <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000" Value="{x:Static Visibility.Collapsed}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </ControlTemplate.Resources> <Grid> <Border Margin="1" x:Name="BorderBase" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" /> <Border Margin="0" Background="#FFECF5FD" x:Name="FocusVisualElement" BorderBrush="#FFECF5FD" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="7" IsHitTestVisible="False" Opacity="0" > <Border Background="#FFE3F1FC" x:Name="InnerFocusVisualElement" BorderBrush="#FFE3F1FC" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5" IsHitTestVisible="False" Opacity="1" > <Border Background="#FFD9ECFA" x:Name="InnerFocusVisualElement2" BorderBrush="#FFD9ECFA" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="1" > <Border Background="{TemplateBinding Background}" x:Name="InnerFocusVisualElement3" BorderBrush="#FF7DBEF1" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Opacity="1" > </Border> </Border> </Border> </Border> <Label Foreground="Black" Grid.Column="1" Margin="1" x:Name="TextPrompt" Content="{TemplateBinding Tag}" Visibility="Collapsed" Focusable="False"></Label> <ScrollViewer Margin="1" x:Name="PART_ContentHost" Foreground="{TemplateBinding Foreground}" /> <Border Margin="1" x:Name="DisabledVisualElement" Background="#A5FFFFFF" BorderBrush="#59C0C0C0" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" IsHitTestVisible="False" Visibility="Collapsed" /> <Border Margin="1" x:Name="ReadOnlyVisualElement" Background="#66FFFFFF" CornerRadius="2.75" Visibility="Collapsed" /> </Grid> <ControlTemplate.Triggers> <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsFocused" Value="False"></Condition> <Condition Property="Text" Value=""></Condition> </MultiTrigger.Conditions> <MultiTrigger.Setters> <Setter Property="Visibility" TargetName="TextPrompt" Value="Visible"></Setter> </MultiTrigger.Setters> </MultiTrigger> <Trigger Property="IsFocused" Value="True"> <Trigger.ExitActions> <BeginStoryboard Storyboard="{StaticResource FocusedOff}" x:Name="FocusedOff_BeginStoryboard" /> </Trigger.ExitActions> <Trigger.EnterActions> <BeginStoryboard Storyboard="{StaticResource FocusedOn}" x:Name="FocusedOn_BeginStoryboard" /> </Trigger.EnterActions> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Trigger.EnterActions> <BeginStoryboard Storyboard="{StaticResource DisabledOn}" x:Name="DisabledOn_BeginStoryboard" /> </Trigger.EnterActions> <Setter Property="Foreground" Value="Black" /> </Trigger> <Trigger Property="IsEnabled" Value="True"> <Trigger.EnterActions> <BeginStoryboard Storyboard="{StaticResource DisabledOff}" /> </Trigger.EnterActions> <Setter Property="Foreground" Value="Black" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!--Region New Style--> <Style x:Key="DensoSmallHeaderLabel" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Focusable" Value="false"></Setter> <Setter Property="FontSize" Value="15"/> <Setter Property="FontWeight" Value="Bold"></Setter> <Setter Property="VerticalAlignment" Value="Center"></Setter> <Setter Property="Height" Value="30"></Setter> </Style> <Style x:Key="DensoSmallHeaderLabelNoBorder" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabelNoBorder}"> <Setter Property="Focusable" Value="false"></Setter> <Setter Property="FontSize" Value="15"/> <Setter Property="FontWeight" Value="Bold"></Setter> <Setter Property="VerticalAlignment" Value="Center"></Setter> <Setter Property="Height" Value="30"></Setter> <Setter Property="BorderBrush" Value="#7795bd"></Setter> <Setter Property="BorderThickness" Value="0 0 0 1"></Setter> </Style> <Style x:Key="DensoLabelRegistration2" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Width" Value="150"/> <Setter Property="FontSize" Value="14"/> <Setter Property="Height" Value="30"></Setter> </Style> <Style x:Key="TopLabelHeader" TargetType="{x:Type Label}"> <Setter Property="Foreground" Value="White"/> <Setter Property="FontSize" Value="14"/> </Style> <Style x:Key="DensoLabelReportHeader2" TargetType="{x:Type Label}"> <Setter Property="Height" Value="30"/> <Setter Property="FontSize" Value="15"></Setter> </Style> <Style x:Key="DensoGroupboxHeader" TargetType="{x:Type Label}" BasedOn="{StaticResource DensoLabel}"> <Setter Property="Height" Value="30"/> <Setter Property="FontSize" Value="15"></Setter> <Setter Property="FontWeight" Value="Medium"/> </Style> <!--endregion--> </ResourceDictionary> |