|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267 |
- <Window
- x:Class="BPASmartClient.Academy.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.Academy.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.Academy.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>
|