|
- <Window
- x:Class="BPASmartClient.FoodStationTest.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.FoodStationTest.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.FoodStationTest.ViewModel"
- Title="NewMateritalView"
- Width="600"
- Height="600"
- 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>
-
- <!--#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/bg.png" />
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="5" />
- <RowDefinition Height="*" />
- <RowDefinition Height="40" />
- <RowDefinition Height="5" />
- <RowDefinition Height="5*" />
- </Grid.RowDefinitions>
- <StackPanel
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- Margin="10,0,0,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="请输入原料名称:" />
-
-
-
- <TextBox
- Grid.Column="1"
- Width="200"
- Height="30"
- Margin="10"
- FontSize="16"
- Text="{Binding MaterialName}" />
-
- <Button
- Width="80"
- Height="30"
- Margin="10"
- Command="{Binding SaveCommand}"
- Content="保存"
- Cursor="Hand" />
- <Button
- Name="btClose"
- Width="80"
- Height="30"
- Margin="10"
- Click="btClose_Click"
- Content="取消" />
-
- </StackPanel>
- <TextBlock
- Grid.Row="2"
- Margin="0,0,5,0"
- HorizontalAlignment="Center"
- Background="Transparent"
- FontSize="16"
- Foreground="Red"
- Text="{Binding ErrorInfo}" />
- <Grid Grid.Row="4">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <TextBlock
- HorizontalAlignment="Center"
- FontSize="25"
- Foreground="#FF2AB2E7"
- Text="本地原料" />
- <Border
- Grid.Row="1"
- Margin="100,10"
- BorderBrush="#FF2AB2E7"
- BorderThickness="1">
- <ScrollViewer
- Grid.Row="1"
- BorderBrush="#FF2AB2E7"
- BorderThickness="1">
- <ItemsControl Margin="10" ItemsSource="{Binding Materials}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton GroupName="all">
- <RadioButton.Template>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Height="40">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <TextBlock
- Name="tb"
- Grid.Column="0"
- Width="150"
- Height="29"
- Margin="3,1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Text="{Binding RawMaterialName}" />
-
- <Button
- Grid.Column="1"
- Margin="10,0,10,0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialId}"
- Content="删除" />
- </Grid>
-
-
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Border>
- </Grid>
-
- </Grid>
-
- </Border>
- </Window>
|