实际上这个代码和不断输出”a“的代码基本没有多大的变化
就是加了两个Data类的两个数据data2 和 data3
实现结果如下:
前台代码:
<Window x:Class="makeact.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<ScrollViewer Height="232" HorizontalAlignment="Left" Margin="6,12,0,0" Name="scrollViewer1" VerticalAlignment="Top" Width="489">
<TextBlock Height="auto" Name="textBlock1" Text="" Width="auto" Background="AliceBlue"/>
</ScrollViewer>
<Button Content="开始不停打印“a”、“b”、“c”" Height="25" HorizontalAlignment="Left" Margin="160,250,0,0" Name="button1" VerticalAlignment="Top" Width="185" Background=