<Window x:Class="WhileSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="使用While循环计算整数和" Height="202" Width="419" FontSize="14">
    <Grid>
        <Label Content="请输入结束的数字：" Height="38" HorizontalAlignment="Left" Margin="12,32,0,0" Name="label1" VerticalAlignment="Top" Width="154" />
        <TextBox Height="28" HorizontalAlignment="Left" Margin="154,34,0,0" Name="txtNumber" VerticalAlignment="Top" Width="120" />
        <Button Content="开始计算" Height="30" HorizontalAlignment="Right" Margin="0,32,15,0" Name="btnCalculate" VerticalAlignment="Top" Width="89" Click="btnCalculate_Click" />
        <TextBlock Height="68" HorizontalAlignment="Left" Margin="12,76,0,0" Name="tbResult" VerticalAlignment="Top" Width="373" TextWrapping="Wrap" />
    </Grid>
</Window>
