Blame view
sources/RoboforkApp/Style/BaseStyler.xaml
12.6 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 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:base="clr-namespace:DensoPackageWindowAP.View.Base" > <!--#region Window Style--> <ControlTemplate x:Key="BaseTemplate" TargetType="{x:Type base:BaseWindow}"> <DockPanel LastChildFill="True"> <Border BorderBrush="#176299" BorderThickness="1"> <!--<Border.Effect> <DropShadowEffect ShadowDepth="0" Color="White" Opacity="1" BlurRadius="8"/> </Border.Effect>--> <!--Border--> <Grid Name="MainGrid"> <Grid.RowDefinitions> <RowDefinition Height="25" x:Name="BorderHeightDefine"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Border Grid.Row="0" Background="#4190c6"> <!--CornerRadius="4,4,0,0">--> <Grid x:Name="BorderTitle" Background="#4190c6"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Column="0"> <TextBlock Text="{Binding BaseTitle}" x:Name="TxtTitle" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,0,0,0" FontFamily="MS UI Gothic" FontSize="13" FontWeight="Bold"></TextBlock> </StackPanel> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1"> <!--CongNC : Remove clock on title <Label Name="ClockLabel" Width="160" Style="{DynamicResource TopLabelHeader}"/>--> <!--ButtonMin--> <Button Name="ButtonMin" Width="35" Height="23" IsTabStop="False" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"> <Image Name="MinImage" Source="/DensoPackageWindowAP;component/Assets/Image/Others/Min.png" Width="13" /> </Button> <!--ButtonMax--> <Button x:Name="ButtonMax" Width="35" Height="23" IsTabStop="False" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" > <Image Name="MaxImage" Source="/DensoPackageWindowAP;component/Assets/Image/Others/Max.png" Width="13" /> </Button> <!--ButtonClose--> <Button x:Name="ButtonClose" Width="35" Height="23" IsTabStop="False" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"> <Image Name="CloseImage" Source="/DensoPackageWindowAP;component/Assets/Image/Others/Close.png" Width="13"/> </Button> </StackPanel> </Grid> </Border> <Border Grid.Row="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Width="Auto" Height="Auto" Padding="1,1,1,1"> <!--CornerRadius="0,0,4,4">--> <AdornerDecorator> <ContentPresenter Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}"/> <!--HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>--> </AdornerDecorator> </Border> </Grid> </Border> </DockPanel> </ControlTemplate> <Style x:Key="BaseStyler" TargetType="{x:Type base:BaseWindow}"> <Setter Property="Template" Value="{StaticResource BaseTemplate}"/> <Setter Property="Width" Value="1000"/> <Setter Property="Height" Value="700"/> <Setter Property="WindowStyle" Value="None" /> <Setter Property="Foreground" Value="White" /> <Setter Property="Background"> <Setter.Value> <ImageBrush ImageSource="/DensoPackageWindowAP;component/Assets/Image/bg.jpg"/> </Setter.Value> </Setter> <Setter Property="FontFamily" Value="Meiryo" /> <Setter Property="FontSize" Value="12" /> <Setter Property="BorderBrush" Value="#0c386f" /> <Setter Property="BorderThickness" Value="0" /> <!--<Setter Property="ToolTip"> <Setter.Value> <TextBlock> <TextBlock.Text> <Binding Path="HeaderLabel"/> --> <!--<Binding Path="HeaderLabel" StringFormat="{resx:Resx ResxName=Core.Presentation.Resources.MasterDetail, Key=Item_Edit_Label}"/>--> <!-- </TextBlock.Text> </TextBlock> </Setter.Value> </Setter>--> <!--<Style.Triggers> <Trigger Property="ResizeMode" Value="CanResizeWithGrip"> <Setter Property="Template" Value="{StaticResource WindowTemplateKey}" /> </Trigger> </Style.Triggers>--> </Style> <Style TargetType="{x:Type Control}" x:Key="BaseStyle"> <Setter Property="FontFamily" Value="Meiryo" /> <Setter Property="FontSize" Value="12" /> </Style> <Style x:Key="WhiteLine" TargetType="{x:Type Border}"> <Setter Property="BorderBrush" Value="White"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Opacity" Value="0.5"/> </Style> <Style x:Key="DensoBorder" TargetType="{x:Type Border}"> <Setter Property="BorderBrush" Value="#93b4d4"/> <Setter Property="BorderThickness" Value="1"/> </Style> <Style x:Key="DensoFocusVisualStyle"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle Margin="0" StrokeThickness="1" Stroke="#60c5e3"/> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="DensoComboBoxFocusVisualStyle"> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle Margin="-1" StrokeThickness="1" Stroke="Black" StrokeDashArray="1 2"/> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseStyle}"></Style> <Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource BaseStyle}"></Style> <Style TargetType="{x:Type DataGrid}" BasedOn="{StaticResource BaseStyle}"></Style> <Style TargetType="{x:Type CheckBox}" BasedOn="{StaticResource BaseStyle}"></Style> <Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource BaseStyle}"></Style> <Style TargetType="{x:Type TabControl}" BasedOn="{StaticResource BaseStyle}"></Style> <Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource BaseStyle}"></Style> <!--endregion--> <Style x:Key="LogoDenso" TargetType="{x:Type Image}"> <Setter Property="Source" Value="/DensoPackageWindowAP;component/Assets/Image/logo_denso.png"/> <Setter Property="Width" Value="200"/> <Setter Property="Height" Value="40"/> </Style> <!--Begin Listbox Style--> <Style x:Key="MyListBox" TargetType="{x:Type ListBox}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderBrush" Value="White"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Opacity" Value="0.5"/> </Style> <!--End ListBox Style--> <!--#Region quyennk add: Tab item for ReportDisplay screen--> <Style x:Key="DailyReportDisplayTabItem" TargetType="{x:Type TabItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabItem}"> <Grid> <Border Name="Border" Background="Transparent" BorderBrush="White" BorderThickness="1" Margin="15,0,0,0" CornerRadius="2" Width="120" Height="35" > <ContentPresenter x:Name="ContentSite" VerticalAlignment="Top" HorizontalAlignment="Center" ContentSource="Header" Margin="9"/> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Foreground" Value="White"/> <Setter TargetName="Border" Property="Background" Value="#0c386f" /> <Setter TargetName="ContentSite" Property="Margin" Value="0,25,0,0" /> </Trigger> <Trigger Property="IsSelected" Value="False"> <Setter TargetName="Border" Property="Background" Value="Transparent" /> <Setter TargetName="ContentSite" Property="Margin" Value="0,25,0,0" /> <Setter Property="Cursor" Value="Hand"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!--#endregion--> <!--#Region fsvbv add: Tab item for ReportDisplayMaintenance screen--> <Style x:Key="ReportDisplayMaintenanceTabItem" TargetType="{x:Type TabItem}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabItem}"> <Grid> <Border Name="Border" Background="Transparent" BorderBrush="White" BorderThickness="1" Margin="15,0,0,0" CornerRadius="2" Width="100" Height="20" > <ContentPresenter x:Name="ContentSite" VerticalAlignment="Top" HorizontalAlignment="Center" ContentSource="Header" Margin="9"/> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Foreground" Value="White"/> <Setter TargetName="Border" Property="Background" Value="#0c386f" /> <Setter TargetName="ContentSite" Property="Margin" Value="0,25,0,0" /> </Trigger> <Trigger Property="IsSelected" Value="False"> <Setter TargetName="Border" Property="Background" Value="Transparent" /> <Setter TargetName="ContentSite" Property="Margin" Value="0,25,0,0" /> <Setter Property="Cursor" Value="Hand"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!--#endregion--> <!--region ListView Style--> <!--<Style x:Key="ListViewHeader" TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type GridViewColumnHeader}"> <TextBlock Text="{TemplateBinding Content}" Padding="5" Width="{TemplateBinding Width}" TextAlignment="Center" Background="#0c386f" Foreground="White"/> </ControlTemplate> </Setter.Value> </Setter> </Style>--> <!--endregion--> <!--region MessageBox Style--> <SolidColorBrush x:Key="CloseButtonBackgroundBrush" Color="White"/> <SolidColorBrush x:Key="CloseButtonBorderBrush" Color="Transparent"/> <SolidColorBrush x:Key="CloseButtonFocusBorderBrush" Color="Transparent"/> <SolidColorBrush x:Key="CloseButtonMouseOverBrush" Color="#5AFFFFFF"/> <SolidColorBrush x:Key="CloseButtonPressedBackgroundBrush" Color="#FF172588"/> <SolidColorBrush x:Key="CloseButtonPressedHighlightBrush" Color="#2BA5A5A5"/> <SolidColorBrush x:Key="CloseButtonShineBrush" Color="#3FFFFFFF"/> <SolidColorBrush x:Key="MessageBoxBackgroundBrush" Color="#FFFFFFFF"/> <SolidColorBrush x:Key="MessageBoxBorderBrush" Color="#1a6296"/> <LinearGradientBrush x:Key="MessageBoxHeaderBrush" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF214F18" Offset="0"/> <GradientStop Color="#FF20361C" Offset="1"/> </LinearGradientBrush> <SolidColorBrush x:Key="MessageBoxTitleBrush" Color="White" /> <Style x:Key="MessageBox" TargetType="{x:Type Window}"> <Setter Property="Margin" Value="5" /> <Setter Property="ResizeMode" Value="NoResize" /> <Setter Property="WindowStyle" Value="None" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Window}"> <Border BorderThickness="2" BorderBrush="#9fd8eb"> <Border BorderThickness="2" Background="{DynamicResource MessageBoxBackgroundBrush}" BorderBrush="{DynamicResource MessageBoxBorderBrush}"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="30" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid> <Grid.Background> <ImageBrush ImageSource="/DensoPackageWindowAP;component/Assets/Image/Denso_msgbox_title.jpg" /> </Grid.Background> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="30" /> </Grid.ColumnDefinitions> <Label Style="{DynamicResource MessageBoxTitle}" Content="{TemplateBinding Title}" /> <Button x:Name="PART_Close" Content="{x:Null}" Grid.Column="1" Style="{DynamicResource CloseButton}" Padding="4" /> </Grid> <AdornerDecorator Grid.Row="1"> <ContentPresenter Content="{TemplateBinding Content}" Margin="{TemplateBinding Margin}" /> </AdornerDecorator> </Grid> </Border> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> <!--endregion--> <!--region Checkbox--> <Style x:Key="MyFocusVisualStyte" > <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate> <Rectangle x:Name="FocusStyle" StrokeDashArray="4 4" RadiusX="5" RadiusY="5" Fill="Transparent" Stroke="#81d2eb" StrokeThickness="1" /> </ControlTemplate> </Setter.Value> </Setter> </Style> <!--endregion--> </ResourceDictionary> |