|
- <Window
- x:Class="BPASmartClient.DosingSystem.View.NewMaterialView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- Title="NewMateritalView"
- Width="600"
- Height="350"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
- <Window.DataContext>
- <vm:NewMaterialViewModel />
- </Window.DataContext>
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
-
- <ResourceDictionary>
-
- <SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
- <!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
- <SolidColorBrush x:Key="bordColor" Color="#332AB2E7" />
-
- <Style x:Key="ControlButtonStyle" TargetType="Button">
- <Setter Property="Margin" Value="0" />
- <Setter Property="FontSize" Value="18" />
- <Setter Property="Foreground" Value="#FFF53F62" />
- <Setter Property="FontWeight" Value="SemiBold" />
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="Button">
- <Border
- Name="TitleBarBr"
- BorderBrush="#00c2f4"
- BorderThickness="0"
- CornerRadius="0"
- Opacity="0.8">
-
- <ContentPresenter
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- <Border.Background>
- <ImageBrush
- ImageSource="/BPASmartClient.CustomResource;component/Image/组合边框1.1.png"
- Opacity="0.8"
- Stretch="Fill" />
- </Border.Background>
-
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="TitleTextblockStyle" TargetType="TextBlock">
- <Setter Property="FontSize" Value="16" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Foreground" Value="{StaticResource tabColor}" />
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="FontWeight" Value="SemiBold" />
- </Style>
-
- <!--#region ListBox样式-->
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="BorderBrush" Value="{x:Null}" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="border" CornerRadius="8">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Window.Resources>
-
- <Border Name="br" BorderThickness="1">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/容器边框.png" />
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="55" />
- <RowDefinition Height="20" />
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="25"
- Foreground="#FF2AB2E7"
- Text="本地原料创建" />
-
- <Grid Grid.Row="2" Margin="10,0">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="150" />
- </Grid.ColumnDefinitions>
-
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- HorizontalAlignment="Left"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="请输入原料名称:" />
-
- <TextBox
- Grid.Column="1"
- Height="30"
- FontSize="16"
- Text="{Binding MaterialName}" />
-
- </Grid>
-
- <StackPanel Grid.Column="1" Orientation="Horizontal">
- <Button
- Width="80"
- Height="30"
- Margin="5,0"
- Command="{Binding SaveCommand}"
- Content="添加"
- Cursor="Hand" />
-
- <Button
- Name="btClose"
- Width="70"
- Height="30"
- Click="btClose_Click"
- Content="取消" />
- </StackPanel>
-
-
- </Grid>
- <TextBlock
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="16"
- Foreground="Red"
- Text="{Binding ErrorInfo}" />
-
- <Grid Grid.Row="4" Margin="10,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
-
- <Grid Margin="0,10,0,0" Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="150" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="原料名称" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="功能操作" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="2"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
- </Grid>
-
- <ScrollViewer
- Grid.Row="1"
- BorderBrush="#FF2AB2E7"
- BorderThickness="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding Materials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="150" />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Grid.Column="0"
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Foreground="{StaticResource TitleBorderColor}"
- Text="{Binding RawMaterialName}" />
-
- <Grid Grid.Column="1">
- <Button
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialId}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
- <Border BorderBrush="{StaticResource bordColor}" BorderThickness="1,0,1,0" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="2"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,1" />
-
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- <!--</Border>-->
- </Grid>
-
- </Grid>
-
- </Border>
- </Window>
|