You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
7.9 KiB
XML

<UserControl x:Class="Aucma.Core.PalletizCX1.Views.PalletizPageView"
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:Aucma.Core.PalletizCX1.Views"
mc:Ignorable="d" Background="#1152AC"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20" />
</Style>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="#dddddd"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type DatePickerTextBox}">
<Setter Property="Background" Value="#0288d1" />
</Style>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.6*"/>
<!--<RowDefinition Height="0.6*"/>-->
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Margin="1,1,5,5" >
<TextBlock Text="分垛库设置" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--<Grid Grid.Row="1">
<Button Content="设置货道" Width="200" Command="{Binding AddStoreCommand}" VerticalAlignment="Stretch" HorizontalAlignment="Left" Margin="5" FontSize="18"/>
</Grid>-->
<Border Grid.Row="1" x:Name="HeightHelperPanel" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="5">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Left">
<DataGrid Grid.Row="0" ItemsSource="{Binding Spaces}"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" SelectedItem="{Binding SelectedDataItem}" MouseLeftButtonDown="dataGrid_MouseLeftButtonDown" >
<!--修改选中字体颜色-->
<DataGrid.Columns>
<!--<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="0.5*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />-->
<DataGridTextColumn Binding="{Binding SpaceCode}" Header="货道编号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding SpaceName}" Header="货道名称" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding StoreCode}" Header="仓库编号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialType}" Header="产品编码" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding typeNameA}" Header="产品名称" Width="3*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding RotationRange}" Header="转向角度" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<!--<DataGridTextColumn Binding="{Binding IsTwoSpace}" Header="是否大产品(占两道)" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<!--<DataGridTextColumn Binding="{Binding LastSpace}" Header="上次入货道" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<DataGridTemplateColumn Header="是否大产品(占两道)" Width="0.8*" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<!--<WrapPanel>
<TextBlock Width="10" Height="10" />
</WrapPanel>-->
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellStyle>
<Style TargetType="{x:Type DataGridCell}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsTwoSpace}" Value="1">
<Setter Property="Background" Value="Red"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsTwoSpace}" Value="0">
<Setter Property="Background" Value="YellowGreen"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGridTemplateColumn.CellStyle>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Border>
</Grid>
</UserControl>