<UserControl
    x:Class="BPA.SingleDevice.View.AddMaterialDialogView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:bpa="http://BPAUIControl.io/winfx/xaml/toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:BPA.SingleDevice.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:BPA.SingleDevice.ViewModel"
    d:DesignHeight="300"
    d:DesignWidth="800"
    mc:Ignorable="d">

    <UserControl.DataContext>
        <vm:AddMaterialViewModel />
    </UserControl.DataContext>

    <Grid Margin="10" bpa:PanelHelper.Spacing="10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock
            Grid.Row="0"
            Grid.Column="0"
            HorizontalAlignment="Right"
            FontSize="40"
            Foreground="#ddd"
            Text="物料名称：" />
        <TextBox
            Grid.Row="0"
            Grid.Column="1"
            Width="350"
            Height="70"
            FontSize="40"
            Style="{StaticResource DarkTextBox}"
            Text="{Binding MaterialInfo.Name}" />
        <TextBlock
            Grid.Row="1"
            Grid.Column="0"
            HorizontalAlignment="Right"
            FontSize="40"
            Foreground="#ddd"
            Text="物料编码：" />
        <TextBox
            Grid.Row="1"
            Grid.Column="1"
            Width="350"
            Height="70"
            FontSize="40"
            Style="{StaticResource DarkTextBox}"
            Text="{Binding MaterialInfo.MaterialCode}" />
        <TextBlock
            Grid.Row="2"
            Grid.Column="0"
            HorizontalAlignment="Right"
            FontSize="40"
            Foreground="#ddd"
            Text="物料描述：" />
        <TextBox
            Grid.Row="2"
            Grid.Column="1"
            Width="350"
            Height="70"
            FontSize="40"
            Style="{StaticResource DarkTextBox}"
            Text="{Binding MaterialInfo.Description}" />

        <Grid
            Grid.Row="3"
            Grid.ColumnSpan="2"
            Height="70"
            Margin="0,5"
            bpa:PanelHelper.Spacing="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Button
                Grid.Column="0"
                Command="{Binding SaveCommand}"
                Content="确认"
                FontSize="40" />
            <Button
                Grid.Column="1"
                Command="{Binding CancelCommand}"
                Content="取消"
                FontSize="40" />
        </Grid>
    </Grid>
</UserControl>
