<Window x:Class="CollaborativePlatformMain.Form.MessageSubPage.CreatLevel.CreatLevelForm"
        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:CollaborativePlatformMain.Form.MessageSubPage"
        mc:Ignorable="d" Title="标高表创建"  Loaded="Window_Loaded" WindowStartupLocation="CenterScreen"
        SizeToContent="WidthAndHeight"  ResizeMode="NoResize" >

    <Grid>
        <StackPanel>
            <DockPanel>
                <DataGrid x:Name="dataGrid1"  CanUserResizeColumns="False"  CanUserResizeRows="False" AutoGenerateColumns="False"  SelectionUnit="FullRow" ColumnWidth="*" RowHeight="25"  CanUserAddRows="False" Height="300">
                    <DataGrid.ContextMenu>
                        <ContextMenu VerticalAlignment="Center"  Width="180" DataContext="{Binding}" x:Name="contextMenu1">
                            <MenuItem Header="修改层号" Click="MenuItem_Click"/>
                            <MenuItem Header="修改结构高度" Click="MenuItem_Click_1"/>
                            <MenuItem Header="修改层高" Click="MenuItem_Click_2"/>
                            <!--<MenuItem Header="删除" Click="MenuItem_Click_3"/>-->
                        </ContextMenu>
                    </DataGrid.ContextMenu>
                    <DataGrid.Columns>

                        <DataGridTextColumn Header="层号" Binding="{Binding LevelNmae}"  Width="120"  IsReadOnly="True"  >
                        </DataGridTextColumn>

                        <DataGridTextColumn Header="结构标高"  Binding="{Binding StructuralElevation}"   IsReadOnly="True"  Width="120" >
                        </DataGridTextColumn>

                        <DataGridTextColumn Header="层高"  Binding="{Binding FloorHeight}"   Width="120"  IsReadOnly="True" >
                        </DataGridTextColumn>

                    </DataGrid.Columns>
                </DataGrid>
            </DockPanel>
            <DockPanel Margin="10,10,10,10">
                <GroupBox  Header="添加层高" Height="160"  Width="160" >
                    <StackPanel >

                        <DockPanel>
                            <Label DockPanel.Dock="Left"  HorizontalContentAlignment ="Center"    MinWidth="60"  Content="层高:"/>
                            <TextBox Name="LevelHight" HorizontalAlignment="Left" Height="23"  TextWrapping="Wrap" Text="3000" VerticalAlignment="Top" Width="90" LostFocus="LevelHight_LostFocus"/>
                        </DockPanel>

                        <DockPanel>
                            <Label DockPanel.Dock="Left" HorizontalContentAlignment ="Center"   MinWidth="60"  Content="层数:" />
                            <TextBox Name="num" HorizontalAlignment="Left" Height="23"  TextWrapping="Wrap" Text="2" VerticalAlignment="Top" Width="90" LostFocus="num_LostFocus"/>
                        </DockPanel>

                        <DockPanel>
                            <Label DockPanel.Dock="Left" HorizontalContentAlignment ="Center"   MinWidth="60"  Content="位置:"/>
                            <ComboBox HorizontalAlignment="Left" FontSize="12" Name="ComboBox_levelAdd" IsEditable="True" SelectedIndex="0" Background="White"  Width="90"  Height="20"/>
                        </DockPanel>

                        <Button    Name="Button_add" Background="WhiteSmoke" FontSize="12" Content="确认" Width="140" Height="25"  Margin="0,0,4,0" Click="Button_add_Click"/>

                    </StackPanel>

                </GroupBox>

                <Grid Width="150" >
                    <Grid.RowDefinitions>
                        <RowDefinition  Height="3*"></RowDefinition>
                        <RowDefinition  Height="3*"></RowDefinition>
                        <RowDefinition  Height="3*"></RowDefinition>
                    </Grid.RowDefinitions>

                    <StackPanel>

                        <!--<DockPanel>
                            <CheckBox Margin=" 0,10,0,5" Content="顶部转换" HorizontalAlignment="Left"  VerticalAlignment="Center" Checked="CheckBox_Checked"/>
                            <TextBox Name="TopConversion" IsEnabled="False" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="详平面" VerticalAlignment="Center" Width="66" RenderTransformOrigin="0.542,0.435"/>
                        </DockPanel>
                        <DockPanel>
                            <CheckBox Margin=" 0,10,0,10" Content="底部转换" HorizontalAlignment="Left"  VerticalAlignment="Center" Checked="CheckBox_Checked_1"/>
                            <TextBox Name="dowConversion" IsEnabled="False"  HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="基础顶" VerticalAlignment="Center" Width="66" RenderTransformOrigin="0.542,0.435"/>
                        </DockPanel>-->
                        <Button Grid.Row="0" Margin="9,10,15,65"  Name="Button_clean"  Background="WhiteSmoke" Width="80" Content="全部清除" Click="Button_clean_Click_1"/>
                        <Button Grid.Row="2" Margin="9,0,15,10"   Name="Button_CreateLevel" Background="WhiteSmoke" Width="80" Content="创建"  Click="Button_CreateLevel_Click" />
                    </StackPanel>


                </Grid>

            </DockPanel>
        </StackPanel>

    </Grid>
</Window>
