<Window x:Class="Env.MainWindow"
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:Env"
mc:Ignorable="d"
Title="MainWindow" Height="330" Width="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<TextBox Name="textBox0" Margin="15"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Name="textBox_gamma_name" Margin="15"/>
<TextBox Grid.Column="1" Name="textBox_gamma" Margin="15"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Name="textBox_pumpspeed_name" Margin="15"/>
<TextBox Grid.Column="1" Name="textBox_pumpSpeed" Margin="15"/>
</Grid>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0" Name="textBox1" Margin="15"/>
<TextBox Grid.Column="1" Name="textBox2" Margin="15"/>
</Grid>
<Grid Grid.Row="4">
<Button Grid.Row="1" Name="button1" Content="Calculate working point" Margin="15,15,15,15" Click="CalWordingPoint"/>
</Grid>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="295"/>
<ColumnDefinition Width="295"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Name="button_fpCurveCal" Content="Calculate FP-Curve" Margin="15,15,15,15" Click="CalFPCurve"/>
<Button Grid.Column="1" Name="button_fpCurveWindow" Content="Open FP-Curve Window" Margin="15,15,15,15" Click="OpenFPCurveWindow"/>
</Grid>
</Grid>
</Window>
先定义行,在每一行中定义列