CHANGE.
parent
b7bca5fe07
commit
54ddcbfb9a
@ -0,0 +1,195 @@
|
||||
<Window x:Class="Aucma.Core.OldBoxFoam.Views.SelectType"
|
||||
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d" FontFamily="Microsoft YaHei"
|
||||
Name="window" Background="#1254AB" d:DesignHeight="800" d:DesignWidth="1200">
|
||||
<Window.Resources>
|
||||
<Style TargetType="{x:Type Slider}">
|
||||
<Style.Resources>
|
||||
<!-- 重写重复触发按钮的样式 -->
|
||||
<Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="Focusable" Value="false" />
|
||||
<Setter Property="IsTabStop" Value="false" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Width" Value="30" />
|
||||
</Style>
|
||||
</Style.Resources>
|
||||
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
|
||||
<Setter Property="SmallChange" Value="1" />
|
||||
</Style>
|
||||
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
|
||||
<!--<Setter Property="Height" Value="40"/>-->
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
</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="VerticalContentAlignment" Value="Center"/>-->
|
||||
<!--<Setter Property="Background" Value="#dddddd"/>
|
||||
<Setter Property="Foreground" Value="Black"/>-->
|
||||
<!--<Setter Property="BorderThickness" Value="1" />-->
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="BorderBrush" Value="#dddddd" />
|
||||
<Setter Property="Height" Value="48"/>
|
||||
<Setter Property="FontSize" Value="18"/>
|
||||
<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="Left" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#4285DE"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Border Margin="5" Background="#1254AB" CornerRadius="1">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" Grid.Column="0">
|
||||
<TextBox Width="200" Height="25" Margin="10 0 0 0" Text="{Binding SearchText}" Foreground="White" VerticalAlignment="Center" FontSize="18"/>
|
||||
<Button Content="查 询" Command="{Binding QueryCommand}" Background="#007DFA" BorderBrush="#007DFA" VerticalAlignment="Center" Foreground="White" Height="30" Width="100" Margin="0 0 50 0"/>
|
||||
<Button Content="清除型号" Command="{Binding deleteCommand}" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" VerticalAlignment="Center" Height="30" Width="100" />
|
||||
</StackPanel>
|
||||
<!--计划列表-->
|
||||
<Border Grid.Row="1" Grid.Column="0" BorderThickness="0" CornerRadius="5" Margin="1,1,5,5" >
|
||||
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
|
||||
HorizontalAlignment="Left" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
|
||||
ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
|
||||
SelectedItem="{Binding SelectedDataItem}" SelectionChanged="DataGrid_SelectionChanged">
|
||||
<!--resourceStyle 399行修改选中字体颜色-->
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Binding="{Binding MaterialCode}" Width="*" Header="产品编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
||||
<DataGridTextColumn Binding="{Binding MaterialName}" Width="2*" Header="产品名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
|
||||
</Border.Effect>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
|
||||
<TextBlock Text="产品编码:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<TextBox x:Name="MaterialCode" Text="{Binding PlanInfo.MaterialCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
|
||||
<TextBlock Text="产品型号:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<TextBox x:Name="MaterialName" Text="{Binding PlanInfo.MaterialName}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="350"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="60,0,0,0" >
|
||||
<!--单选框样式-->
|
||||
<StackPanel.Resources>
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Grid Width="20" Height="20">
|
||||
<Ellipse x:Name="BulletRadio" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
|
||||
</Grid>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="BulletRadio" Property="Fill" Value="Green"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="Green"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Resources>
|
||||
|
||||
<!--<TextBlock Text="选择型号: " FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<RadioButton Content="型号1" GroupName="Direction" IsChecked="{Binding IsSelectedOptionA, Mode=TwoWay}" Foreground="white" BorderBrush="White" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" />
|
||||
<RadioButton Content="型号2" GroupName="Direction" IsChecked="{Binding IsSelectedOptionB, Mode=TwoWay}" Foreground="white" BorderBrush="White" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" />-->
|
||||
<!--<RadioButton Content="型号3" GroupName="Direction" IsChecked="{Binding IsSelectedOptionC, Mode=TwoWay}" Margin="10 0 0 0"/>-->
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button Content="保 存" FontSize="20" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="100" />
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</Window>
|
Loading…
Reference in New Issue