<Window x:Class="XHandler.View.MethodProperty.SetBarcodeDlgForAddConsumables"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:local="clr-namespace:XHandler.View.MethodProperty"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
mc:Ignorable="d" WindowStartupLocation = "CenterOwner"
|
Height="650" Width="800" WindowStyle="None" AllowsTransparency="True" ResizeMode="NoResize" Background="#00FFFFFF"
|
Loaded="Window_Loaded">
|
|
<Window.Resources>
|
<Style TargetType="DataGridRow">
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="Background" Value="White" />
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="FontSize" Value="16" />
|
<Setter Property="Foreground" Value="Black" />
|
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
|
</Trigger>
|
</Style.Triggers>
|
|
</Style>
|
|
<Style x:Key="cellStyle" TargetType="DataGridCell">
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="DataGridCell">
|
<Border BorderBrush="LightGray" BorderThickness="0 0 0 1" Background="{TemplateBinding Background}">
|
<Grid>
|
<TextBlock TextAlignment="Center" VerticalAlignment="Center" >
|
<ContentPresenter />
|
</TextBlock>
|
|
<Path Fill="LightGray" Data="M8,0 L8,8 0,8z" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
|
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsSelected" Value="true"/>
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="DataGridCellStyle" TargetType="{x:Type DataGridCell}">
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Height" Value="40"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
<Border BorderBrush="LightGray" BorderThickness="0 0 0 1" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<Grid>
|
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
<Path Fill="LightGray" Data="M12,0 L12,8 0,8z" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
|
</Grid>
|
</Border>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
<EventSetter Event="PreviewMouseMove" Handler="DataGridCell_PreviewMouseMove"/>
|
<!--<EventSetter Event="PreviewMouseLeftButtonDown" Handler="DataGridCell_PreviewMouseLeftButtonDown"/>-->
|
|
<EventSetter Event="PreviewMouseDoubleClick" Handler="DataGridCell_PreviewMouseDoubleClick"/>
|
<Style.Triggers>
|
<Trigger Property="IsMouseOver" Value="True">
|
<Setter Property="Background" Value="{DynamicResource lightBlueBrush}"/>
|
<Setter Property="Foreground" Value="Black"/>
|
</Trigger>
|
<Trigger Property="IsSelected" Value="True">
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</Trigger>
|
<Trigger Property="IsKeyboardFocusWithin" Value="True">
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static DataGrid.FocusBorderBrushKey}}"/>
|
</Trigger>
|
<MultiTrigger>
|
<MultiTrigger.Conditions>
|
<Condition Property="IsSelected" Value="true"/>
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
</MultiTrigger.Conditions>
|
<Setter Property="Background" Value="{DynamicResource blueBrush}"/>
|
<Setter Property="Foreground" Value="White"/>
|
</MultiTrigger>
|
<Trigger Property="IsEnabled" Value="false">
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
</Trigger>
|
</Style.Triggers>
|
</Style>
|
|
<Style x:Key="eidtTextBoxStyle" TargetType="TextBox">
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="Template">
|
<Setter.Value>
|
<ControlTemplate >
|
<Grid>
|
<Border x:Name="BackBorder" SnapsToDevicePixels="true" Background="{TemplateBinding Background}"
|
BorderThickness="0" BorderBrush="{TemplateBinding BorderBrush}" Height="40">
|
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
</Border>
|
</Grid>
|
<ControlTemplate.Triggers>
|
<!--<Trigger Property="IsFocused" Value="True" >
|
<Setter Property="Background" TargetName="BackBorder" Value="#FFE5E6EB"/>
|
</Trigger>-->
|
<Trigger Property="IsEnabled" Value="False">
|
<Setter Property="TextBox.Foreground" Value="Gray"/>
|
</Trigger>
|
</ControlTemplate.Triggers>
|
</ControlTemplate>
|
</Setter.Value>
|
</Setter>
|
</Style>
|
</Window.Resources>
|
|
<Grid Background="White">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="0" MouseDown="Grid_MouseDown">
|
<Border Grid.Row="0" Background="{DynamicResource blueBrush}" CornerRadius="10 10 0 0" BorderThickness="0">
|
<Grid>
|
<TextBlock Text="{x:Static str:Resources.strTips}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="20 0" FontSize="20"
|
Foreground="White" FontWeight="Bold" Width="450"/>
|
<Button Content="×" HorizontalAlignment="Right" VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="10 0" FontSize="28" Width="40" Height="40"
|
FontWeight="Bold" Foreground="Gray" Style="{DynamicResource BlueButtonStyle}" Background="White" Click="btnClose_Click"/>
|
</Grid>
|
</Border>
|
</Grid>
|
|
<Border Grid.Row="1" Background="White" CornerRadius="0 0 10 10" BorderThickness="0">
|
<Grid Margin="50 0">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="100"/>
|
<RowDefinition Height="*"/>
|
<RowDefinition Height="40"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Margin="0 20 0 0" HorizontalAlignment="Center">
|
<TextBlock x:Name="textblockMsg" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 0 0 0" FontSize="16"/>
|
</StackPanel>
|
|
<DataGrid x:Name="dgInputBarcode" Grid.Row="1" Grid.Column="0" AutoGenerateColumns="False" BorderThickness="0" FontSize="14"
|
RowHeaderWidth="0" BorderBrush="LightGray" CanUserResizeColumns="False" CanUserResizeRows="False" Margin="50 10" Background="White"
|
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserAddRows="False" ColumnHeaderStyle="{DynamicResource dataGridColumnHeaderStyle}"
|
GridLinesVisibility="None" SelectionUnit="Cell" SelectionMode="Extended"
|
CellEditEnding="dgCoatingData_CellEditEnding">
|
|
<DataGrid.Columns>
|
<DataGridTextColumn Width="*" Binding="{Binding lattice_num}" Header="{x:Static str:Resources.strTargetBoard}"
|
CellStyle="{StaticResource cellStyle}" IsReadOnly="True"/>
|
<DataGridTextColumn Width="*" Binding="{Binding targetplate_barcode}" Header="{x:Static str:Resources.strDestBoardBarcode}"
|
CellStyle="{StaticResource DataGridCellStyle}"
|
EditingElementStyle="{StaticResource eidtTextBoxStyle}" IsReadOnly="True"/>
|
</DataGrid.Columns>
|
</DataGrid>
|
|
|
<Button Grid.Row="2" Grid.Column="0" x:Name="btnOK" Content="{x:Static str:Resources.btnOK}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 0 0" FontSize="16" Width="80" Height="40"
|
Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="{DynamicResource blueBrush}" Click="btnOK_Click"/>
|
<Button Grid.Row="2" Grid.Column="0" Content="{x:Static str:Resources.btnCancel}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 120 0" FontSize="16" Width="80" Height="40"
|
Foreground="White" Style="{DynamicResource BlueButtonStyle}" Background="LightGray" Click="btnClose_Click"/>
|
</Grid>
|
</Border>
|
</Grid>
|
|
|
|
</Window>
|