BaseStyler.xaml 12.6 KB
<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>