EquipmentAdd.xaml 3.03 KB
<Window x:Class="HHECS.DAQClient.View.EquipmentView.EquipmentAddView"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:HHECS.DAQClient.ViewModel.EquipmentVM"
        xmlns:hc="https://handyorg.github.io/handycontrol"
        mc:Ignorable="d"
        xmlns:viewmodel="clr-namespace:HHECS.DAQClient.ViewModel.EquipmentVM"
        d:DataContext="{d:DesignInstance Type=viewmodel:EquipmentAddVM}"
        Title="新增设备" Height="500" Width="400" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <hc:UniformSpacingPanel  Grid.Row="0" Spacing="5" Orientation="Vertical" HorizontalAlignment="Center">
            <hc:ElementGroup VerticalAlignment="Center" Height="30" Margin="0,1" Layout="Stack">
                <Border Style="{StaticResource BorderRegion}" Padding="6,0">
                    <TextBlock Text="编号" Width="50" VerticalAlignment="Center"/>
                </Border>
                <TextBox Text="{Binding WorkNo,UpdateSourceTrigger=PropertyChanged}" MinWidth="150"/>
            </hc:ElementGroup>
            <hc:ElementGroup VerticalAlignment="Center" Height="30" Margin="0,1" Layout="Stack">
                <Border Style="{StaticResource BorderRegion}" Padding="6,0">
                    <TextBlock Text="名称" Width="50" VerticalAlignment="Center"/>
                </Border>
                <TextBox Text="{Binding WorkNo,UpdateSourceTrigger=PropertyChanged}" MinWidth="150"/>
            </hc:ElementGroup>
            <hc:ElementGroup VerticalAlignment="Center" Height="30" Margin="0,1" Layout="Stack">
                <Border Style="{StaticResource BorderRegion}" Padding="6,0">
                    <TextBlock Text="设备类型" Width="50" VerticalAlignment="Center"/>
                </Border>
                <TextBox Text="{Binding WorkNo,UpdateSourceTrigger=PropertyChanged}" MinWidth="150"/>
            </hc:ElementGroup>
            <hc:ElementGroup VerticalAlignment="Center" Height="30" Margin="0,1" Layout="Stack">
                <Border Style="{StaticResource BorderRegion}" Padding="6,0">
                    <TextBlock Text="IP地址" Width="50" VerticalAlignment="Center"/>
                </Border>
                <TextBox Text="{Binding WorkNo,UpdateSourceTrigger=PropertyChanged}" MinWidth="150"/>
            </hc:ElementGroup>
        </hc:UniformSpacingPanel>

        <hc:UniformSpacingPanel  Grid.Row="1" Spacing="80" HorizontalAlignment="Center">
            <Button Content="保存" Command="{Binding SaveCommand}" Style="{StaticResource ButtonPrimary}"/>
            <Button Content="取消" Command="{Binding CancelCommand}" Style="{StaticResource ButtonDefault}"/>
        </hc:UniformSpacingPanel>
    </Grid>
</Window>